Update README.md
Browse files
README.md
CHANGED
|
@@ -6,30 +6,50 @@ license: apache-2.0
|
|
| 6 |
<img src="https://github.com/MLP-Lab/KORMo-tutorial/blob/main/tutorial/attachment/kormo_logo.png?raw=true" style="width: 100%; max-width: 1100px;">
|
| 7 |
</p>
|
| 8 |
|
| 9 |
-
# π¦Ύ KORMo-10B
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
**KORMo-10B** is a **10.8B parameter fully open LLM** capable of handling both **Korean and English**.
|
| 12 |
-
The model, training code, and training data are all **fully open**, allowing anyone to reproduce and extend
|
| 13 |
|
| 14 |
- π§ **Model Size**: 10.8B parameters
|
| 15 |
- π£οΈ **Languages**: Korean / English
|
| 16 |
- πͺ **Training Data**: Synthetic data + public datasets
|
| 17 |
- π§ͺ **License**: Apache 2.0 (commercial use permitted)
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
---
|
| 20 |
|
| 21 |
## π Links
|
| 22 |
|
|
|
|
| 23 |
- π€ **Hugging Face**: [π Model Download](https://huggingface.co/KORMo-Team)
|
| 24 |
- π» **GitHub Repository**: [π Training and Inference Code](https://github.com/MLP-Lab/KORMo-tutorial)
|
|
|
|
| 25 |
|
| 26 |
---
|
| 27 |
|
| 28 |
-
|
| 29 |
-
- π **Oct 2025**: Official release of KORMo v1.0!
|
| 30 |
-
|
| 31 |
-
---
|
| 32 |
-
|
| 33 |
## Model Architecture
|
| 34 |
| Item | Description |
|
| 35 |
|:----|:------------|
|
|
@@ -38,7 +58,7 @@ The model, training code, and training data are all **fully open**, allowing any
|
|
| 38 |
| Context Length | 32K |
|
| 39 |
| Languages | Korean, English |
|
| 40 |
| License | Apache 2.0 |
|
| 41 |
-
|
| 42 |
---
|
| 43 |
|
| 44 |
## π Benchmark Performance
|
|
@@ -74,11 +94,10 @@ The model, training code, and training data are all **fully open**, allowing any
|
|
| 74 |
| kr_clinical_qa | 77.32 | 53.97 | 48.33 | 46.22 | 65.84 | 80.00 | 63.54 | 60.00 | 77.22 |
|
| 75 |
| **Korean Avg.** | **58.15** | 47.37 | 35.82 | 39.34 | 60.94 | 63.35 | 49.60 | 49.60 | 60.37 |
|
| 76 |
|
| 77 |
-
---
|
| 78 |
|
| 79 |
-
|
| 80 |
|
| 81 |
-
| Benchmark | KORMo-10B | smolLM3-3B | olmo2-7B | olmo2-13B | kanana1.5-8B | qwen3-8B | llama3.1-8B | exaone3.5-8B
|
| 82 |
|:----------|---------:|----------:|---------:|---------:|------------:|--------:|------------:|-------------:|-----------:|
|
| 83 |
| MT-Bench (EN) | 8.32 | 7.15 | 7.32 | 7.64 | 8.45 | 8.70 | 6.32 | 8.15 | 8.70 |
|
| 84 |
| KO-MT-Bench (KO) | 8.54 | - | - | - | 8.02 | 8.16 | 4.27 | 8.13 | 8.51 |
|
|
@@ -87,8 +106,123 @@ The model, training code, and training data are all **fully open**, allowing any
|
|
| 87 |
|
| 88 |
---
|
| 89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
## Contact
|
| 91 |
- KyungTae Lim, Professor at KAIST. `[email protected]`
|
| 92 |
|
| 93 |
-
|
| 94 |
## Contributor
|
|
|
|
| 6 |
<img src="https://github.com/MLP-Lab/KORMo-tutorial/blob/main/tutorial/attachment/kormo_logo.png?raw=true" style="width: 100%; max-width: 1100px;">
|
| 7 |
</p>
|
| 8 |
|
|
|
|
| 9 |
|
| 10 |
+
|
| 11 |
+
## π Update News
|
| 12 |
+
- π **2025-10-09 (νκΈλ )**: Official release of KORMo-10B-base (Be aware that it's not an SFT model!!).
|
| 13 |
+
---
|
| 14 |
+
## π¦Ύ About KORMo
|
| 15 |
**KORMo-10B** is a **10.8B parameter fully open LLM** capable of handling both **Korean and English**.
|
| 16 |
+
The model, training code, and training data are all **fully open**, allowing anyone to reproduce and extend them.
|
| 17 |
|
| 18 |
- π§ **Model Size**: 10.8B parameters
|
| 19 |
- π£οΈ **Languages**: Korean / English
|
| 20 |
- πͺ **Training Data**: Synthetic data + public datasets
|
| 21 |
- π§ͺ **License**: Apache 2.0 (commercial use permitted)
|
| 22 |
|
| 23 |
+
```bash
|
| 24 |
+
KORMoλ λΉμμ΄κΆ μ΅μ΄μ Fully Open Source LLMμΌλ‘, 곡μ΅μ νμ©μ λͺ©νλ‘ νμνμ΅λλ€.
|
| 25 |
+
μ°λ¦¬λ λꡬλ μΈκ³ μμ€μ μΈμ΄λͺ¨λΈμ μ§μ λ§λ€κ³ λ°μ μν¬ μ μλ νκ²½μ λ§λ€κ³ μ ν©λλ€.
|
| 26 |
+
KORMoμ μ£Όμ νΉμ§μ λ€μκ³Ό κ°μ΅λλ€:
|
| 27 |
+
|
| 28 |
+
1. From scratch νμ΅μΌλ‘ μ€κ³λ 10BκΈ νβμ μΆλ‘ μΈμ΄λͺ¨λΈμ
λλ€.
|
| 29 |
+
2. νμ΅ λ°μ΄ν°, μ½λ, λͺ¨λ μ€κ° λͺ¨λΈκ³Ό νν 리μΌμ 100% 곡κ°νμ¬, λꡬλ SOTAμ κ·Όμ ν λͺ¨λΈμ μ§μ μ¬ννκ³ νμ₯ν μ μμ΅λλ€.
|
| 30 |
+
3. μ΄ 3.7T ν ν° κ·λͺ¨μ νμ΅ λ°μ΄ν°λ₯Ό 곡κ°ν©λλ€. νΉν μ§κΈκΉμ§ ν λ²λ 곡κ°λ μ μλ μ΄κ³ νμ§ μ μ£ΌκΈ° νκ΅μ΄ λ°μ΄ν°(μ¬μ νμ΅, μ¬ννμ΅, μΌλ°ν, μΆλ‘ ν, κ°ννμ΅ λ±)λ₯Ό μ 곡ν©λλ€.
|
| 31 |
+
4. μ΄ λͺ¨λ μμ
μ KAIST λ¬ΈνκΈ°μ λνμ MLPμ°κ΅¬μ€μ νλΆΒ·μμ¬μ 8λͺ
μ΄ νλ ₯νμ¬ μ§ννμΌλ©°, 45μ₯μ λ¬νλ λ
Όλ¬ΈμΌλ‘ μ 리νμ΅λλ€.
|
| 32 |
+
|
| 33 |
+
μ§κΈκΉμ§ νκ΅μ΄ λͺ¨λΈμ μ¨λ³΄λ©΄, λ²€μΉλ§ν¬ μ μλ μ’μλ° μ€μ¬μ©μμλ μ΄λκ° μ΄μνκ±°λ,
|
| 34 |
+
νλλ§ νλ©΄ λͺ¨λΈμ΄ λ§κ°μ§λ κ²½νμ νμ
¨μ κ²λλ€. λ΅λ΅νμ
¨μ£ ?
|
| 35 |
+
|
| 36 |
+
KORMoλ κ·Έλ° λ¬Έμ λ₯Ό μ λ©΄μΌλ‘ ν΄κ²°ν©λλ€.
|
| 37 |
+
λͺ¨λ μ€κ° λͺ¨λΈκ³Ό μ¬ννμ΅ λ°μ΄ν°λ₯Ό ν¨κ» 곡κ°νκΈ° λλ¬Έμ, μ¬μ©μλ λ² μ΄μ€ λͺ¨λΈ μμ μμ λ§μ λ°μ΄ν°λ₯Ό μΉμ΄ μνλ λ°©ν₯μΌλ‘ κ°ννμ΅Β·νλμ μ§νν μ μμ΅λλ€.
|
| 38 |
+
π βμ’μ νκ΅μ΄ λͺ¨λΈμ κ°κ³ μΆλ€λ©΄, μ΄μ μ§μ λ§λ€μ΄λ³΄μΈμ. μ½λ© λ¬΄λ£ GPUλ‘λ νλλ©λλ€! π€β
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
---
|
| 42 |
|
| 43 |
## π Links
|
| 44 |
|
| 45 |
+
- π **Technical Report**: [π Archive](https://huggingface.co/KORMo-Team)
|
| 46 |
- π€ **Hugging Face**: [π Model Download](https://huggingface.co/KORMo-Team)
|
| 47 |
- π» **GitHub Repository**: [π Training and Inference Code](https://github.com/MLP-Lab/KORMo-tutorial)
|
| 48 |
+
- π **Tutorial**: [π Instruction Tuning over google colab](https://colab.research.google.com/github/MLP-Lab/KORMo-tutorial/blob/main/tutorial/02.sft_qlora.ipynb) [π Youtube Tutorial](https://www.youtube.com/@MLPLab)
|
| 49 |
|
| 50 |
---
|
| 51 |
|
| 52 |
+
<!--
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
## Model Architecture
|
| 54 |
| Item | Description |
|
| 55 |
|:----|:------------|
|
|
|
|
| 58 |
| Context Length | 32K |
|
| 59 |
| Languages | Korean, English |
|
| 60 |
| License | Apache 2.0 |
|
| 61 |
+
-->
|
| 62 |
---
|
| 63 |
|
| 64 |
## π Benchmark Performance
|
|
|
|
| 94 |
| kr_clinical_qa | 77.32 | 53.97 | 48.33 | 46.22 | 65.84 | 80.00 | 63.54 | 60.00 | 77.22 |
|
| 95 |
| **Korean Avg.** | **58.15** | 47.37 | 35.82 | 39.34 | 60.94 | 63.35 | 49.60 | 49.60 | 60.37 |
|
| 96 |
|
|
|
|
| 97 |
|
| 98 |
+
### π Qualitative Evaluation (LLM-as-a-Judge)
|
| 99 |
|
| 100 |
+
| Benchmark | KORMo-10B | smolLM3-3B | olmo2-7B | olmo2-13B | kanana1.5-8B | qwen3-8B | llama3.1-8B | exaone3.5-8B | gemma3-12B |
|
| 101 |
|:----------|---------:|----------:|---------:|---------:|------------:|--------:|------------:|-------------:|-----------:|
|
| 102 |
| MT-Bench (EN) | 8.32 | 7.15 | 7.32 | 7.64 | 8.45 | 8.70 | 6.32 | 8.15 | 8.70 |
|
| 103 |
| KO-MT-Bench (KO) | 8.54 | - | - | - | 8.02 | 8.16 | 4.27 | 8.13 | 8.51 |
|
|
|
|
| 106 |
|
| 107 |
---
|
| 108 |
|
| 109 |
+
## π¦ Installation
|
| 110 |
+
|
| 111 |
+
### 1. Clone the repository
|
| 112 |
+
```bash
|
| 113 |
+
git clone https://github.com/MLP-Lab/KORMo-tutorial.git
|
| 114 |
+
cd KORMo-tutorial
|
| 115 |
+
```
|
| 116 |
+
### 2. Create and activate a virtual environment (optional but recommended)
|
| 117 |
+
```bash
|
| 118 |
+
uv venv
|
| 119 |
+
source .venv/bin/activate
|
| 120 |
+
```
|
| 121 |
+
### 3. Install KORMo
|
| 122 |
+
```bash
|
| 123 |
+
uv pip install -e .
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
---
|
| 127 |
+
## π Inference Example
|
| 128 |
+
|
| 129 |
+
```python
|
| 130 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 131 |
+
import torch
|
| 132 |
+
|
| 133 |
+
model_name = "KORMo-Team/KORMo-10B-sft"
|
| 134 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 135 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 136 |
+
model_name,
|
| 137 |
+
torch_dtype=torch.bfloat16,
|
| 138 |
+
device_map="auto",
|
| 139 |
+
trust_remote_code=True
|
| 140 |
+
)
|
| 141 |
+
|
| 142 |
+
messages = [
|
| 143 |
+
{"role": "user", "content": "What happens inside a black hole?"}
|
| 144 |
+
]
|
| 145 |
+
|
| 146 |
+
chat_prompt = tokenizer.apply_chat_template(
|
| 147 |
+
messages,
|
| 148 |
+
tokenize=False,
|
| 149 |
+
add_generation_prompt=True,
|
| 150 |
+
enable_thinking=False
|
| 151 |
+
)
|
| 152 |
+
|
| 153 |
+
inputs = tokenizer(chat_prompt, return_tensors="pt").to(model.device)
|
| 154 |
+
|
| 155 |
+
with torch.no_grad():
|
| 156 |
+
output_ids = model.generate(
|
| 157 |
+
**inputs,
|
| 158 |
+
max_new_tokens=1024,
|
| 159 |
+
)
|
| 160 |
+
|
| 161 |
+
response = tokenizer.decode(output_ids[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
|
| 162 |
+
print("Assistant:", response)
|
| 163 |
+
```
|
| 164 |
+
|
| 165 |
+
## π§ Enabling Thinking Mode
|
| 166 |
+
|
| 167 |
+
If you want to enable the **thinking** mode, simply set `enable_thinking=True`:
|
| 168 |
+
|
| 169 |
+
```python
|
| 170 |
+
chat_prompt = tokenizer.apply_chat_template(
|
| 171 |
+
messages,
|
| 172 |
+
tokenize=False,
|
| 173 |
+
add_generation_prompt=True,
|
| 174 |
+
enable_thinking=True
|
| 175 |
+
)
|
| 176 |
+
```
|
| 177 |
+
---
|
| 178 |
+
|
| 179 |
+
## πͺ Using Specific Revisions (Training Checkpoints)
|
| 180 |
+
|
| 181 |
+
KORMo provides multiple model revisions corresponding to different training stages and checkpoints.
|
| 182 |
+
You can load a specific revision with the `revision` parameter in `from_pretrained`.
|
| 183 |
+
|
| 184 |
+
### π Stage 1 Model (sft-stage1)
|
| 185 |
+
|
| 186 |
+
```python
|
| 187 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 188 |
+
import torch
|
| 189 |
+
|
| 190 |
+
model_name = "KORMo-Team/KORMo-10B-sft"
|
| 191 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 192 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 193 |
+
model_name,
|
| 194 |
+
revision="sft-stage1", # Load Stage 1 checkpoint
|
| 195 |
+
torch_dtype=torch.bfloat16,
|
| 196 |
+
device_map="auto",
|
| 197 |
+
trust_remote_code=True
|
| 198 |
+
)
|
| 199 |
+
```
|
| 200 |
+
|
| 201 |
+
### π Main Model (Final Checkpoint: sft-stage2-ckpt2)
|
| 202 |
+
|
| 203 |
+
```python
|
| 204 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 205 |
+
import torch
|
| 206 |
+
|
| 207 |
+
model_name = "KORMo-Team/KORMo-10B-sft"
|
| 208 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 209 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 210 |
+
model_name,
|
| 211 |
+
revision="sft-stage2-ckpt2", # Load Final Main Checkpoint
|
| 212 |
+
torch_dtype=torch.bfloat16,
|
| 213 |
+
device_map="auto",
|
| 214 |
+
trust_remote_code=True
|
| 215 |
+
)
|
| 216 |
+
```
|
| 217 |
+
|
| 218 |
+
> π‘ **Tip**:
|
| 219 |
+
> - Use `sft-stage1` for ablation studies or comparison experiments.
|
| 220 |
+
> - Use `sft-stage2-ckpt2` as the **main production model**.
|
| 221 |
+
|
| 222 |
+
---
|
| 223 |
+
|
| 224 |
+
|
| 225 |
## Contact
|
| 226 |
- KyungTae Lim, Professor at KAIST. `[email protected]`
|
| 227 |
|
|
|
|
| 228 |
## Contributor
|