VoyagerX × KRAFTON · Language-model pretraining
Korean GPT
Investigating why a high-scoring language model repeated itself.
I pretrained a 13B-parameter Korean language model as part of a three-person team. The model predicted the next token—a piece of text—with high accuracy, yet repeated phrases when generating text. I investigated the mismatch.
- Period
- Dec 2021 — Apr 2022
- Team
- Three-person team working with KRAFTON
- My role
- ML Engineer · Pretraining, data processing, and evaluation
01 / Diagnosis
Inspect the text behind the score.
The discrepancy between the metric and the generated text prompted me to look beyond the overall score. I started with a small-data overfitting check, then broke prediction accuracy down by source and text chunk.
- Check the training pipeline
The model could overfit a small dataset. That checked basic training behavior; it did not rule out every implementation issue.
- Separate the sources and chunks
The crawled corpus contained many unusually high-accuracy chunks. An aggregate score obscured which text was easy to predict.
- Open the high-scoring text
I found repeated headers, footers, and tables of contents across related pages. Predictable page structure was being mixed with useful language content.
The crawler followed links between related pages, repeatedly collecting the same page elements. I worked with the existing crawl and re-parsed the documents to preserve their main content.
Keeping a record
Put a small observation into words. Over time, connections emerge between otherwise scattered notes.
Starting with a question
Set a familiar answer aside. Looking at what we do not know can be the beginning of a new question.
02 / Data decisions
Filter repeated and low-quality text.
I built a six-stage pipeline covering personal information, toxic and low-quality text, HTML parsing issues, and length and token-diversity filters. The later filters also examined unusually high-accuracy documents.
The tradeoff was what to retain. For unusually high-accuracy documents, I combined length and token-diversity criteria instead of using high accuracy alone as a reason to discard them. I used higher-quality news data as a reference while trying to preserve substantive content.
Stage 1 · Personal-information filter 1.3 TB
I also searched for and added approximately 15 GB of higher-quality public data to supplement the filtered corpus. That addition is separate from the 160 GB filtering endpoint above.
03 / Results and attribution
Results after training on the revised data.
- My contribution
- I initiated the diagnosis, inspected the underlying text, built the filtering pipeline, added public data, and worked on pretraining and evaluation.
- Team model result
- Training on the final revised corpus improved accuracy on NSMC, a Korean sentiment-classification benchmark, by 3 percentage points.
- Generation quality
- I observed less repetition and better generated text after training on the revised data. This is a qualitative observation, separate from the NSMC result.
The revised corpus combined filtering and added public data, so these results do not isolate the effect of either change.
04 / Engineering follow-through
Monitor sources and make new tasks easier to add.
I introduced accuracy tracking by data source so later runs would be easier to inspect. I also designed a modular fine-tuning and evaluation framework: teammates could add a task through its data-loading and validation components without rewriting the training framework.
Monitor by source
Extend by task
Source-level monitoring helped us trace an overall score back to the text behind it. The task-specific components made it easier for teammates to extend evaluation as the project continued.
Earlier teaching material
My 2021 guest lecture for KAIST CS475 explains GPT architecture and training through tensor shapes and PyTorch operations. It predates this later 13B project.
GPT lecture & slides →