shlee5784 commited on
Commit
b485e50
·
verified ·
1 Parent(s): fea1f8c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +304 -0
README.md CHANGED
@@ -1,3 +1,307 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ library_name: transformers
4
+ pipeline_tag: translation
5
+ language:
6
+ - ko
7
+ - en
8
+ - vi
9
  ---
10
+
11
+ # DMTLLM Translation Research
12
+
13
+ > **Research Release**
14
+
15
+ **DMTLLM Translation Research** is an open-weight multilingual language model developed by **DMTLabs** as part of the foundational research for DMTLLM.
16
+
17
+ The model is a compact **~50M parameter decoder-only Transformer** based on a Llama-style architecture. It was **trained from scratch with randomly initialized weights** using Korean, English, and Vietnamese monolingual corpora.
18
+
19
+ No pretrained Llama model weights were used.
20
+
21
+ Following base language model pretraining, the model was further specialized for machine translation through **full-parameter supervised fine-tuning (SFT)** using Korean–English and Korean–Vietnamese parallel translation data.
22
+
23
+ This release represents an intermediate research milestone in the development of DMTLLM and is intended primarily for research and experimentation.
24
+
25
+ ---
26
+
27
+ ## Model Overview
28
+
29
+ | Item | Description |
30
+ |---|---|
31
+ | Developer | DMTLabs |
32
+ | Model size | **~50M parameters** |
33
+ | Model type | Decoder-only Transformer |
34
+ | Implementation | `LlamaForCausalLM` |
35
+ | Architecture | Llama-style Causal Language Model |
36
+ | Initialization | Random initialization |
37
+ | Base pretraining | Causal Language Modeling |
38
+ | Pretraining languages | Korean, English, Vietnamese |
39
+ | Post-training | Full-parameter Supervised Fine-Tuning |
40
+ | Translation data | Korean–English, Korean–Vietnamese |
41
+ | Specialization | Machine Translation |
42
+ | Model status | Research / Experimental |
43
+ | License | Apache License 2.0 |
44
+
45
+ > Although the model implementation is based on the `LlamaForCausalLM` architecture provided by Hugging Face Transformers, **no pretrained Llama weights were used**. All model parameters were initialized randomly and trained from scratch.
46
+
47
+ ---
48
+
49
+ ## Model Architecture
50
+
51
+ The model uses a compact Llama-style decoder-only Transformer architecture designed at approximately the **50M parameter scale**.
52
+
53
+ | Specification | Value |
54
+ |---|---:|
55
+ | Parameters | ~50M |
56
+ | Vocabulary size | 48,000 |
57
+ | Hidden size | 512 |
58
+ | Transformer layers | 8 |
59
+ | Attention heads | 8 |
60
+ | Key-value heads | 4 |
61
+ | Attention type | Grouped Query Attention (GQA) |
62
+ | Attention head dimension | 64 |
63
+ | Intermediate size | 1,376 |
64
+ | Maximum context length | 1,024 tokens |
65
+ | Positional encoding | Rotary Position Embeddings (RoPE) |
66
+ | RoPE theta | 10,000 |
67
+ | Normalization | RMSNorm |
68
+ | RMSNorm epsilon | 1e-5 |
69
+ | Activation | SiLU / SwiGLU-style |
70
+ | Attention bias | No |
71
+ | MLP bias | No |
72
+ | Attention dropout | 0.0 |
73
+ | Input/output embeddings | Tied |
74
+ | Checkpoint parameter dtype | FP32 |
75
+
76
+ The architecture includes:
77
+
78
+ - Rotary Position Embeddings (RoPE)
79
+ - RMSNorm
80
+ - Grouped Query Attention (GQA)
81
+ - SwiGLU-style feed-forward layers
82
+ - tied input and output embeddings
83
+ - decoder-only causal self-attention
84
+
85
+ ---
86
+
87
+ ## Training Pipeline
88
+
89
+ The model was developed in two stages:
90
+
91
+ ```text
92
+ Random Initialization
93
+
94
+
95
+ Base Language Model Pretraining
96
+ (Korean / English / Vietnamese)
97
+
98
+
99
+ Scratch-pretrained Base Model
100
+
101
+
102
+ Full-parameter Translation SFT
103
+ (Korean–English / Korean–Vietnamese)
104
+
105
+
106
+ Translation-specialized Research Model
107
+ ```
108
+
109
+ ### Stage 1: Base Pretraining
110
+
111
+ The base language model was trained entirely from scratch.
112
+
113
+ No pretrained language model checkpoint was used. The model parameters were randomly initialized and optimized using the standard causal language modeling objective.
114
+
115
+ Conceptually, the model learns next-token prediction:
116
+
117
+ ```text
118
+ token₁ token₂ token₃ ... tokenₙ
119
+ ↓ ↓ ↓ ↓
120
+ token₂ token₃ token₄ ... tokenₙ₊₁
121
+ ```
122
+
123
+ The pretraining corpus consists of monolingual Korean, English, and Vietnamese text.
124
+
125
+ Training utilizes:
126
+
127
+ - Causal Language Modeling / Next Token Prediction
128
+ - BF16 mixed-precision computation
129
+ - AdamW optimization
130
+ - gradient accumulation
131
+ - gradient clipping
132
+ - linear learning-rate warmup
133
+ - cosine learning-rate decay
134
+ - optional gradient checkpointing
135
+
136
+ ### Base Pretraining Data
137
+
138
+ The monolingual corpus contains approximately **27.6 million training records** after preprocessing and filtering.
139
+
140
+ | Language | Training | Validation | Test |
141
+ |---|---:|---:|---:|
142
+ | Korean | 13,738,080 | 140,019 | 140,843 |
143
+ | English | 7,723,537 | 79,102 | 79,150 |
144
+ | Vietnamese | 6,169,183 | 62,694 | 62,914 |
145
+ | **Total** | **27,630,800** | **281,815** | **282,907** |
146
+
147
+ The records were tokenized and packed into fixed-length sequences for causal language model pretraining.
148
+
149
+ ### Monolingual Data Filtering
150
+
151
+ Duplicate and invalid samples were removed during preprocessing.
152
+
153
+ | Language | Removed Duplicates | Other Filtered Samples |
154
+ |---|---:|---:|
155
+ | Korean | 623,012 | 79 |
156
+ | English | 191,233 | 4 |
157
+ | Vietnamese | 274,093 | 123 |
158
+ | **Total** | **1,088,338** | **206** |
159
+
160
+ ---
161
+
162
+ ## Stage 2: Translation Supervised Fine-Tuning
163
+
164
+ Following base pretraining, the entire model was further optimized for machine translation using **full-parameter supervised fine-tuning**.
165
+
166
+ No LoRA, adapter, or other parameter-efficient fine-tuning method was used.
167
+
168
+ The SFT corpus consists of Korean–English and Korean–Vietnamese parallel translation pairs.
169
+
170
+ Each training example contains:
171
+
172
+ ```text
173
+ [ Translation Prompt ] [ Target Translation ]
174
+ ```
175
+
176
+ During SFT, the prompt portion is excluded from the language modeling loss.
177
+
178
+ ```text
179
+ [ Translation Prompt ] [ Target Translation ]
180
+ masked loss
181
+ ```
182
+
183
+ Only target translation tokens contribute to the training objective, while all model parameters are updated.
184
+
185
+ ### Translation SFT Data
186
+
187
+ Approximately **14.1 million parallel sentence pairs** were used for translation SFT.
188
+
189
+ | Language Pair | Training | Validation | Test |
190
+ |---|---:|---:|---:|
191
+ | Korean–English | 7,907,787 | 80,562 | 81,229 |
192
+ | Korean–Vietnamese | 6,200,497 | 63,509 | 63,319 |
193
+ | **Total** | **14,108,284** | **144,071** | **144,548** |
194
+
195
+ ### Parallel Data Filtering
196
+
197
+ Parallel data preprocessing included duplicate removal, source–target length-ratio filtering, text validation, and identical-pair filtering where applicable.
198
+
199
+ | Language Pair | Raw Pairs | Duplicates | Ratio Filter | Text Filter | Identical Pair Filter |
200
+ |---|---:|---:|---:|---:|---:|
201
+ | Korean–English | 8,073,026 | 1,636 | 1,769 | 43 | — |
202
+ | Korean–Vietnamese | 6,569,007 | 238,995 | 1,343 | 154 | 1,190 |
203
+
204
+ The remaining examples were divided into training, validation, and test sets.
205
+
206
+ ---
207
+
208
+ ## Research Objectives
209
+
210
+ This model was developed as part of the foundational research for the **DMTLLM** project.
211
+
212
+ The primary objectives of this work are to investigate:
213
+
214
+ - training a decoder-only language model entirely from scratch;
215
+ - building an independent base model without relying on pretrained model weights;
216
+ - learning multilingual representations from Korean, English, and Vietnamese monolingual corpora;
217
+ - adapting a scratch-pretrained language model to machine translation;
218
+ - evaluating full-parameter SFT for translation specialization;
219
+ - investigating Korean–English and Korean–Vietnamese translation using a unified decoder-only architecture;
220
+ - establishing a reproducible research foundation for future DMTLLM models.
221
+
222
+ This model should therefore be considered a **research artifact rather than a production-ready DMTLLM release**.
223
+
224
+ ---
225
+
226
+ ## Languages
227
+
228
+ The base pretraining stage includes:
229
+
230
+ - Korean (`ko`)
231
+ - English (`en`)
232
+ - Vietnamese (`vi`)
233
+
234
+ The translation specialization stage uses parallel data for:
235
+
236
+ - Korean–English
237
+ - Korean–Vietnamese
238
+
239
+ Translation capabilities may vary depending on translation direction, domain, sentence complexity, and prompt format.
240
+
241
+ ---
242
+
243
+ ## Evaluation
244
+
245
+ Comprehensive quantitative evaluation results are being prepared.
246
+
247
+ Planned evaluation includes:
248
+
249
+ - translation quality evaluation;
250
+ - language-pair-specific performance analysis;
251
+ - comparison between the scratch-pretrained base model and the translation-SFT model;
252
+ - analysis of translation specialization after full-parameter SFT;
253
+ - qualitative analysis of generated translations.
254
+
255
+ Evaluation results will be added in future updates.
256
+
257
+ ---
258
+
259
+ ## Intended Use
260
+
261
+ This model is primarily intended for:
262
+
263
+ - machine translation research;
264
+ - multilingual language model research;
265
+ - research on language models trained from scratch;
266
+ - experiments involving translation-oriented supervised fine-tuning;
267
+ - decoder-only Transformer translation experiments;
268
+ - Korean–English and Korean–Vietnamese translation research;
269
+ - foundational research for future DMTLLM models.
270
+
271
+ ---
272
+
273
+ ## Limitations
274
+
275
+ This is an experimental research model.
276
+
277
+ The model may generate:
278
+
279
+ - inaccurate translations;
280
+ - incomplete translations;
281
+ - hallucinated content;
282
+ - unexpected outputs;
283
+ - outputs that differ depending on prompt format or decoding configuration.
284
+
285
+ The model has not yet undergone comprehensive evaluation across languages, domains, safety scenarios, or production environments.
286
+
287
+ Its relatively compact model scale may also limit linguistic knowledge, reasoning ability, contextual understanding, and translation quality compared with substantially larger language models.
288
+
289
+ Performance may vary depending on:
290
+
291
+ - language pair;
292
+ - translation direction;
293
+ - input domain;
294
+ - sentence length;
295
+ - prompt format;
296
+ - context length;
297
+ - decoding parameters.
298
+
299
+ This model should not be used for safety-critical or other high-stakes applications without additional evaluation and validation.
300
+
301
+ ---
302
+
303
+ ## License
304
+
305
+ The released model weights and accompanying materials are provided under the **Apache License 2.0**, unless otherwise noted.
306
+
307
+ Users are responsible for ensuring that their use of the model complies with applicable laws, regulations, and third-party rights.