Korean 1B hybrid base model (Gated DeltaNet + GQA), trained from scratch
A 1.0B-parameter Korean language model pretrained from random initialisation on 25.17B tokens (89% Korean). Architecture, tokenizer, Gated DeltaNet Triton kernels, Muon optimizer and training loop are our own code (PyTorch + Triton).
Model
| parameters | 1.002B |
| layers | 20, interleaved 3:1 ratio of Gated DeltaNet to attention layers |
| width | d_model 2048, SwiGLU FFN 4352, RMSNorm (pre-norm) |
| attention layers | GQA, 16 query / 4 KV heads Γ 128, RoPE (ΞΈ=10000), QK-norm |
| Gated DeltaNet layers | 16 heads, d_k = d_v = 128, short causal conv (k=4), L2-normalised q/k, output gate; chunkwise (C=64) WY-form kernel in Triton |
| vocabulary | 48,000 (byte-level BPE trained on this corpus) |
| context | 2048 tokens |
Training corpus
| source | Hugging Face dataset | tokenized size after filtering | tokens seen in training |
|---|---|---|---|
FineWeb-2, Korean (kor_Hang, train split) |
HuggingFaceFW/fineweb-2 |
38.28B (52.65M of 60.87M docs) | 21.62B (β0.56 epochs) |
| Korean Wikipedia (2023-11-01 dump) | wikimedia/wikipedia, 20231101.ko |
0.28B (455k articles) | 0.82B (β2.9 epochs) |
FineWeb-Edu, English (sample-10BT, 5 of its files) |
HuggingFaceFW/fineweb-edu |
4.42B (3.66M docs) | 2.73B (β0.62 epochs) |
- Mixture. 88% FineWeb-2 / 2% Wikipedia / 10% English during the stable phase; 78% / 8% / 14% during the final learning-rate decay. The English share keeps some English ability and adds educational content.
- Filtering. FineWeb-2 documents shorter than 200 characters (1.57M) or without Hangul (0.18M) were dropped.
- Decontamination. Before any training, a held-out set was frozen: 2,000 FineWeb-2 test-split documents and 500 Wikipedia articles, the latter removed from training. Training documents were dropped if they shared any 13-word n-gram with a held-out document, or any 8-word n-gram with KoBEST (all splits), the KMMLU test set or our chat eval prompts. This removed 6.47M FineWeb-2 documents (10.6%), mostly template boilerplate shared with held-out pages.
- Tokenizer. Byte-level BPE, 48,000 tokens, trained on a 2 GB sample (1.55 GB FineWeb-2, 0.25 GB
Wikipedia, 0.2 GB English), NFC normalisation, single-digit splitting, 16 reserved special tokens
(
<|endoftext|>, chat-role tokens, β¦). 5.03 bytes per token on the held-out Korean text.
Training method
- Objective. Next-token prediction on packed 2048-token sequences; each document is followed by
<|endoftext|>. - Batch. 512 Γ 2048 = 1.05M tokens per step (gradient accumulation), 24,000 steps, 25.17B tokens in total (β25 tokens per parameter).
- Optimizer. Muon (NewtonβSchulz-5 orthogonalised momentum, 0.95 Nesterov, with the RMS-matching update scale of Moonlight so one learning rate serves both optimizers) for all 2-D weight matrices; AdamW (Ξ² = 0.9/0.95) for embeddings, norms and scalar parameters. Weight decay 0.1, gradient clipping 1.0. In a short ablation (150M model) Muon reached 0.024 lower BPB than AdamW after 1,000 steps (0.5B tokens).
- Learning-rate schedule. Warmupβstableβdecay: linear warmup over 1,500 steps to 0.0015, constant until step 19,000, then a 1βsqrt decay to 0 over the last 5,000 steps (21% of training). Most of the late improvement comes in that decay: held-out FineWeb-2 BPB went from 0.786 at its start to 0.738 at the end (Wikipedia 0.837 β 0.755).
- Precision. bf16 autocast with fp32 master weights; the Gated DeltaNet triangular inverse and state recurrence run in fp32/TF32.
- Hardware. NVIDIA RTX A6000 48 GB (PCIe), plain data parallel: 4 GPUs for the first 13k steps, then 2 GPUs (same global batch). About 680 GPU-hours.
Evaluation
Held-out bits per byte (lower is better; tokenizer-independent, sliding window, stride 512) and KoBEST 0-shot accuracy, all models run through the same harness:
| model | BPB all / FineWeb-2 / Wikipedia | COPA | HellaSwag | SentiNeg | BoolQ | WiC |
|---|---|---|---|---|---|---|
| this model (1.0B) | 0.729 / 0.727 / 0.735 | 0.690 | 0.418 | 0.599 | 0.496 | 0.487 |
| EleutherAI/polyglot-ko-1.3b | 1.052 / 1.008 / 1.200 | 0.711 | 0.408 | 0.703 | 0.499 | 0.487 |
| skt/kogpt2-base-v2 (125M) | 1.092 / 1.073 / 1.157 | 0.584 | 0.318 | 0.615 | 0.502 | 0.490 |
KMMLU 0-shot: 0.255 (chance 0.25; zero-shot letter scoring is dominated by answer-letter bias at this scale, so it is reported for reference only).
Sample completions
One sample per prompt (seed 0, temperature 0.8, top-p 0.95, repetition penalty 1.1, up to 120 new tokens), unedited. The completions are fluent but contain factual errors (e.g. wrong population figures and an invented history of Hangul), so do not read them as facts.
λνλ―Όκ΅μ μλλ λνλ―Όκ΅μ μλμ΄λ€.
λνλ―Όκ΅
λνλ―Όκ΅μ μλ(ι¦ι½) λλ μ½μΉμΌλ‘ μλλ₯Ό κ·μ νλ λ²λ Ήμ μ§λ°©μμΉλ² μ 164μ‘°μ λλ² μνλ Ή μ 32μ‘°λ€. λ¨, μλμ κ°λ μ ν¬ν¨νμ§ μλ λμλ λ§λ€. μ΄λ€ λμλ€μ κ΄μμμΉλ¨μ²΄λ₯Ό μ€μΉνκ±°λ κ΄μμκΈ νμ λ¨μλ‘μ νΉλ³μΒ·κ΄μμΒ·νΉλ³μμΉμ λ° λ λ±μ΄ μ‘΄μ¬νλ€.μΈμ²κ΄μμλ λνλ―Όκ΅ μ΅λμ λμμ΄λ€. 70λ§ λͺ μ λκ° κ±°μ£Όνκ³ μμΌλ©° μλκΆ μΈκ΅¬μ μ½ μ λ°μ μ°¨μ§νκ³ μλ€. λνλ―Όκ΅ 5λ κ΄μμ μ€μ νλμ΄λ€.
μμΈνΉλ³μμλ 2μ²λ§ λͺ μ΄ κ±°μ£Όνλ©° μ£Όλ‘ μμΈ
μ‘°μ μλμ κ³Όκ±° μ λλ ν¬κ² λ¬Έκ³Όμ 무과(ζ¦η§)λ‘ κ΅¬λΆλμλλ°, μ‘°μ μ κΈ° κ΄μ μ κ°μ₯ ν° νΉμ§μ κ³Όκ±° μ λκ° μ§λ°©κ΄μ μΆμΈ μλ¨μΌλ‘ μ¬μ©λμλ€λ μ¬μ€μ΄λ€. μ΄λ μ§λ°©κ΄μ΄ μ€μμ λΆμλ₯Ό μ₯μ ν¨μΌλ‘μ¨ μ€μμ§κΆμ 체μ λ₯Ό ꡬμΆνκ³ μ νλ κ²κ³Ό λ°μ ν κ΄λ ¨μ΄ μλ€. κ·Έ κ²°κ³Ό, μ§λ°©μλ μ€μμμ μλͺ λ κ΄λ¦¬κ° ν견λ¨μΌλ‘μ¨ μ€μκ³Όμ μ κΈ°μ κ΄κ³κ° νμ±λμλ€.
무과λ μ λμ΄ λΉλ²νλ νκΈ°λΆν° μ ν΄κΈ°μ κ±Έμ³ μνλμμΌλ©°, κ΅κ°μμ νμλ‘ νλ μ λ¬Έ μΈλ ₯μ μμ±νλ λ° λͺ©μ μ΄ μμλ€. 무과μ μ£Όμ κ³Όλͺ©μ μ‘ν΄κ³΅ κ° 3κ° κ³Όλͺ©μΌλ‘ ꡬμ±λμκ³ , κΈμ νλ©΄ 무과μ μμ
κ΄ν©μ±μ μλ¬Όμ΄ νμ μλμ§λ₯Ό ν‘μνμ¬ νμνλ¬Όμ ν©μ±νλ κ³Όμ μ΄λ€. κ΄ν©μ± κ³Όμ μμ μλ¬Ό μΈν¬λ μ½λ‘체λ₯Ό ν΅ν΄ κ΄μ μ μλμ§μΈ μ μ μμ©μ²΄(electron acceptor)λ₯Ό ν‘μνλ€.
μ μμμ©μ²΄κ° ν¬ν¨λ λ¬Ό λΆμλ₯Ό ν‘μν μ΄ν, μ½λ‘체λ μ½λ‘체μμ λ°©μΆλλ κ΄μ μλμ§μμΌλ‘λΆν° μλμ§λ₯Ό μ»λλ€. κ΄μλ₯Ό ν‘μνμ¬ μ μκ° κ²°ν©νκ² λλ©΄ μ΄ κ²°ν©μ μ κΈ°μ μΌλ‘ μ€μ±μΈ μ μ μμ©μ²΄μ 곡μ ν¨μΌλ‘μ¨ μ μμ κ²°ν©λ μλμ§κ° λ΄λΆ ν©μ±μ ν΅ν 무기 μΈμ° μμ±μΌλ‘ μ νλλ€. μμ±λ μ κΈ°λ¬Όμ΄ λ°λ‘ νμμ΄λ€. λ°λΌμ κ΄ν©μ±μ ν΅μ¬μ λΉμ μν΄ μ
κΉμΉμ°κ°λ₯Ό λ§μκ² λμ΄λ €λ©΄ λ¨Όμ μ¬λ£λ₯Ό μ€λΉν΄μΌ νλ€.
μ°μ λνμ μνλ₯Ό μ°κ³ , λΌμ§κ³ κΈ° λͺ©μ΄μ ν μ ν¬κΈ°λ‘ μλ₯΄κ³ , λν°ν μλ€λ¦¬ μ΄κ³Ό λΆκ³ κΈ°κ° μκ³ κΈ°λ₯Ό μ€λΉνλ€.
κΉμΉλ λ¬΄μ° λ°°μΆμ 3μ μ λ, λ§μ μ΄λ μμ£Ό μ½κ°μ μμ΄μ μ°μ΄μ€λ€. κ·Έλ¦¬κ³ κ³ κΈ°λ μλ€λ¦¬μ΄μ μ€λΉνκ³ , κΈ°λ¦μ κ±·μ΄λ΄κ³ λ¨ΉκΈ° μ’μ ν¬κΈ°λ‘ μλΌ λλλ€. λλΉμ κ³ κΈ°λ₯Ό λ£κ³ , λ¬Όμ λΆκ³ λμ₯ λ° ν°μ μ λ£κ³ νΉ μΆμ μ€λ€. μ°κ°κ° λκΈ° μμνλ©΄ λ€μλ§ μ‘μμ κ³ μΆμ₯μΌλ‘ κ°μ λ§μΆλ€.
κ·Έλ¦¬κ³ λΌμ§κ³ κΈ°μ μ μ΅μ κΉμΉλ ν¨κ»
μ€λ μμΈμ μμΉ¨λΆν° λΉκ° λ΄λ¦¬λ©΄μ λκΈ°κ° λΆμμ ν΄μ Έ κ³³κ³³μ λλ‘κ° κ³³κ³³μμ ν΅μ λκ³ μμ΅λλ€.
μ€λ μ€ν 4μμ―€λΆν° μΈμ² κ°ν, κ²½κΈ°λ κΉν¬ λ± μλκΆκ³Ό μν΄μ μ§μμ νΈμ° νΉλ³΄κ° λ°ν¨λμ΅λλ€.
νΉν μμΈκ³Ό κ²½κΈ° λ¨λΆμ μκ°λΉ μ΅λ 20mm μνμΌλ‘ κ°νκ² λ΄λ¦¬λ κ³³μ΄ μκ² μ΅λλ€.
λ λΉκ΅¬λ¦ λ€λ‘ μ°λ°μ μΈ λΉλ°©μΈμ΄ λ¨μ΄μ§λ κ³³λ μκ² κ³ μ.
κ³³κ³³μμ μ²λ₯ λ²κ°λ₯Ό λλ°ν κ°ν μλκΈ°λ μμμ§ κ²μΌλ‘ 보μ λλ€.
μμλλ κ°μ°λμ μμΈ λ¨μ λ΄λ₯μμ λ§κ²λ 150mm μ΄μ μμλ©λλ€.
λΉμ μμ μ€λΆμ λ¨λΆ μ§λ°© λͺ¨λ 30~
μΈκ³΅μ§λ₯ κΈ°μ μ΄ λ°μ νλ©΄μ μΌμ리μ λ―ΈμΉλ μν₯μ λμ± μ»€μ§κ³ μμ΅λλ€. μΈκ³΅μ§λ₯μ΄ μΈκ°μ λ체ν κ²μ΄λΌλ μ λ§μ΄ λμ€λ κ°μ΄λ°, μ΄λ¬ν λ³νμ λ§μκΈ° μν λ Έλ ₯μ΄ μ΄λ£¨μ΄μ§κ³ μμ΅λλ€. νΉν, λ―Έλμλ μΈκ³΅μ§λ₯ κΈ°μ μ΄ λ λ°μ ν κ²μΌλ‘ μμλλ©΄μ μ΄μ λν λλΉκ° λμ± μ€μν΄μ§κ³ μλλ°μ. κ·Έλ λ€λ©΄ λ―Έλμ λλΉνλ κ΅μ‘μ μ΄λ€ λ°©ν₯μΌλ‘ μ§νλ κΉμ? μ€λ IBKκΈ°μ μνμμλ λ―Έλ μ¬νμ μΈμ¬μμ κ³ λ €ν κ΅μ‘ λ°©ν₯μ±μ μ΄ν΄λ³΄κ² μ΅λλ€. 4μ°¨ μ°μ νλͺ μλλ₯Ό μ΄μκ°λ μ°λ¦¬μκ² νμν μλμ 무μμΌκΉμ? μ€λμ λ―Έλλ₯Ό μ€λΉνλ κ΅μ‘μμ μ€μνκ² μκ°νλ μλμ μ΄ν΄λ³΄λ €κ³ ν©λλ€. β 4μ°¨μ°μ νλͺ ..
κΈμ΅μ μλ‘μ΄ μμμΈ νν ν¬ μ€ννΈμ ! νν ν¬ μ°μ μ κΈμ΅κ³Ό ITκΈ°μ μ μ΅ν©μΌλ‘ νμν μλ‘μ΄ μμ₯μΌλ‘, κΈ°μ‘΄ μν λ°
The history of the Korean alphabet, Hangul, begins with the vowel-numbering system in 1440 CE (Korean: Kyeonggisan Jujipunsil). The first consonant-vowel-picture script was the alphabetic writing system introduced by Samgak (Samgyecheok) and is based on the nodal point between throat and tongue. The first important stage in the development of Korean alphabetic writing system began when the Joseon Dynasty (1392β1897) changed from
Usage
Requires a CUDA GPU, PyTorch, Triton, tokenizers and safetensors (tested with PyTorch 2.8 + Triton 3.4). The model is not a transformers
architecture; load it with the included code:
import sys
from huggingface_hub import snapshot_download
path = snapshot_download("shopkeeper/kor-finewiki-1b-base")
sys.path.insert(0, path)
from kollm.load import load_model
from kollm.generate import generate, special_ids
model, tok, _ = load_model(path) # bf16 on cuda
eot = special_ids(tok)["endoftext"]
ids = [eot] + tok.encode("λνλ―Όκ΅μ μλλ").ids # documents start after <|endoftext|>
out = generate(model, ids, max_new_tokens=100, temperature=0.8, top_p=0.95, stop_ids={eot})
print(tok.decode(out))
Or interactively: python complete.py inside the downloaded folder.
License and data attribution
Model weights and code: apache-2.0. Training data: FineWeb-2 and FineWeb-Edu (ODC-By 1.0, subject to Common Crawl's terms of use) and Wikipedia (CC BY-SA 4.0).
- Downloads last month
- 430
