Skip to content

Latest commit

ย 

History

History
114 lines (79 loc) ยท 4.72 KB

File metadata and controls

114 lines (79 loc) ยท 4.72 KB
language ko
tags
kogpt2
gpt2
text-generation
license MIT
datasets
custom
metrics
none

This model is no longer actively in training due to lack of computing resources. NIPA์ธก์˜ ์ •์ฑ… ๋ณ€๊ฒฝ์œผ๋กœ ๊ณ ์„ฑ๋Šฅ์ปดํ“จํŒ… ์ง€์›๋Œ€์ƒ์—์„œ ์ œ์™ธ๋จ์— ๋”ฐ๋ผ, ๋ชจ๋ธ ํ›ˆ๋ จ์„ ๋” ์ด์ƒ ์ง„ํ–‰ํ•  ์ˆ˜ ์—†๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

Model name

KoGPT2

Buy Me A Coffee

Open In Colab

Demo NOT available at : ์•„๋ฌด๋ง ๋Œ€์ž”์น˜

Model description

GPT2 and GPT3 trained on ~40GB of Korean datasets. see the included json files for hyperparameter details.

Available models (Training ATM):

  • KoGPT2-base(117M)
  • KoGPT2-medium(345M)
  • KoGPT2-large(774M)
  • KoGPT2-xlarge(1.5B)
  • KoGPT2-2.7B TBA

Models are available as TF checkpoint files Training script or Huggingface transformers compatible ones

n_ctx available : 1024 2048 384

Intended uses & limitations

Intended for Korean text generation for ai-text-adventure(https://github.com/ksjae/ai-text-adventure) with PPLM.

Downloads

Download files from links at the Releases tab. Alternatively, it is available from my own server(wget-friendly)

How to use

Try out on colab

or go to KoGPT2-train and use scripts/demo.py

Limitations and bias

v0.1 may have faulty tokenizers, producing bad outputs.

v0.2+ be GPT2 with n_ctx of 2048. True form of GPT-3 implementation(alternating layers) will not be available within the year.

If other limitations or errors are found, please open an issue.

Training data

Initialized with GPT(774M,https://github.com/openai/gpt-2/blob/master/model_card.md).

The following data was used, and is available for redistribution here:

  • Namuwiki database dump, Early 2020
  • KCC(Kookmin University Corpus)
  • Dump of Korean Wikipedia
  • NAVER movie reviews
  • Korean news(about 1GB) from Leipzig(a German university)
  • Context data from KorSQUAD questions
  • Parsed Korean CommonCrawl data(WIP)

Please note the completed dataset includes <|endoftext|> tags.

The following data were used, but is unavailable for redistribution:

  • Sejong Corpus
  • '๋ชจ๋‘์˜ ๋ง๋ญ‰์น˜' from corpus.korean.go.kr
  • A PRIVATE collection of korean novels
  • Webcrawl of modern, uploaded text novels('ํ…๋ณธ' - If you want to prevent your novel from going in the training set, please contact me and I will blacklist it)
  • Game storylines (with authors' approval)

Training procedure

All hyperparameters are the same as GPT2-large One paragraph per line(TextDataset)

Early models(GPT2-large v0.2 and prior) are trained on 2xTesla V100 for 3~4 weeks. Models up to XL size are trained on v3-8 TPUs.

Eval results

prompt >>> ๋‚˜๋Š” ์–ด๋‘์šด ์ˆฒ ์†์„ ๊ฑฐ๋‹๊ณ  ์žˆ๋‹ค.

v0.1 (xl)

์–ด๋А์ƒˆ ๋‚˜๋Š” ๊ทธ ์ž‘์€ ์‚ฐ๋“ค์„ ํ–ฅํ•ด ๋›ฐ๊ธฐ ์‹œ์ž‘ํ–ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‚ด ์‹œ์•ผ์—๋Š” ์ด ๊ณจ์งœ๊ธฐ์— ๋Œ€ํ•œ ์–ด๋–ค ๋™๊ฒฝ๋„, ํ˜น์€ ๋™๊ฒฝ๊ณผ ํ™˜ํฌ์กฐ์ฐจ ์—ฟ๋ณด์˜€๋‹ค๊ฐ€ ์‚ฌ๋ผ์กŒ๋‹ค๊ฐ€๋Š” ์‚ฌ๋ผ์ ธ ๋ฒ„๋ฆฌ๊ณ  ๋ง์•˜ ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๋‚˜ ์—ญ์‹œ ๊ทธ๊ฒƒ์„ ๋ฏฟ์ง€ ์•Š์•˜๋‹ค. ์•„๋‹ˆ ๊ทธ๊ฒƒ๋„ ๋ชจ๋ฅธ๋‹คโ€ฆโ€ฆ. ๊ทธ๋ ‡๋‹ค๋ฉด ๊ทธ๊ฒƒ์€ ๋˜ ๋ฌด์Šจ ๋ง์ธ๊ฐ€? ๋‚ด๊ฐ€ ์ด๋ ‡๊ฒŒ ๋งํ•ด๋„ ์ข‹์„ ํ…๋ฐโ€ฆโ€ฆ ํ•˜์ง€๋งŒ ์–ด์จŒ๋“  ์ด๊ณณ์—” ์™œ ๊ทธ๋ฆฌ ๋จผ ๊ณณ์—์„œ๋ถ€ํ„ฐ ์ฐพ์•„์˜ฌ๊นŒ ํ•˜๊ณ  ์ƒ๊ฐํ•ด ๋ณด์•˜๋‹ค. ๊ทธ๋ž˜์„œ ๊ทธ๋Š” ์ง€๊ธˆ ์–ด๋А ํ•œ ๊ณณ๋งŒ์„ ํ—ค๋งค๋ฉด์„œ ์ž ๊พธ๋งŒ ๊ฑธ์–ด์˜ค๋Š” ๊ฒƒ์ผ๊นŒ?

v0.2-WEB (xl)

๋‚˜๋Š” ์–ด๋‘์šด ์ˆฒ ์†์„ ๊ฑฐ๋‹๊ณ  ์žˆ๋‹ค. #์•จ๋ฆฌ๊ฑดํŠธํ…Œ์ด๋ธ” ์˜ #์ฝ”์ฝ”๋„›์ ค๋ฆฌ ์ƒ‰์ด ๋„˜ ์˜ˆ์˜๊ณ  ๋ง›๋‚˜๋‹ค. #๊ทธ๋ฆญ์š”๊ฑฐํŠธ ์›๋ฌผ์ด ๋“ค์–ด๊ฐ„ ๋งˆ์ง€๋ง‰ ๋ฒ ์ด์ปค๋ฆฌ #๋ง์ฐจ์ดˆ์ฝ”์ผ€์ดํฌ ๋„ ๋ง›๋‚˜๊ณ  ๊ฒ‰์— ์ดˆ์ฝ”๋„ ๋‘๊ป๊ฒŒ ์”นํžˆ๊ณ ..โœจ๐Ÿ’•๐Ÿ’•๐Ÿ‘๐Ÿป . . #์•จ๋ฆฌ๊ฑดํŠธํ…Œ์ด๋ธ” @eleganttable_ #๊ฐ„์‹ #์นดํŽ˜์–ด๋‹ˆ์–ธ๋ฒ ์ด์ปค๋ฆฌ๋ฒ ์ด์ปค #์ฝฉ์ฝฉ๋ณผ #์ฟ ํ‚ค #๋””์ €ํŠธ๋ง›์ง‘ #๋””์ €ํŠธ์นดํŽ˜ #dessert #์นดํŽ˜์Šคํƒ€๊ทธ๋žจ #๋ง›์Šคํƒ€๊ทธ๋žจ #๋จน์Šคํƒ€ ๊ทธ๋žจ #๋จน๋ฐฉ #์ผ์ƒ #daily

v0.2-story (xl)

๋‚˜๋Š” ์–ด๋‘์šด ์ˆฒ ์†์„ ๊ฑฐ๋‹๊ณ  ์žˆ๋‹ค. ์ •๋ช…์ด ์“ด์›ƒ์Œ์„ ์ง€์€ ์ฑ„ ๊ณณ์— ๊ฑธ์–ด๋‚˜์™”๋‹ค. ... ... ... ... ์‚ฌ๋งํƒ‘ ๋†’์ด๊นŒ์ง€ ์˜ฌ๋ผ๊ฐ€์•ผํ•˜๋‚˜?

BibTeX entry and citation info

@unpublished{CitekeyUnpublished,
      author = "Seungjae Kim",
      title  = "Introducing larger KoGPT2",
      year   = 2020
    }