Update README.md
Browse files
README.md
CHANGED
@@ -1,39 +1,45 @@
|
|
1 |
-
---
|
2 |
-
license: gpl-3.0
|
3 |
-
language:
|
4 |
-
- en
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
25 |
-
|
|
26 |
-
|
|
27 |
-
|
|
28 |
-
|
|
29 |
-
|
|
30 |
-
|
|
31 |
-
|
|
32 |
-
|
|
33 |
-
|
|
34 |
-
|
|
35 |
-
|
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: gpl-3.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
datasets:
|
6 |
+
- HuggingFaceTB/cosmopedia-100k
|
7 |
+
- pleisto/wikipedia-cn-20230720-filtered
|
8 |
+
pipeline_tag: text-generation
|
9 |
+
tags:
|
10 |
+
- text-generation-inference
|
11 |
+
---
|
12 |
+
# NanoLM-365M-base
|
13 |
+
|
14 |
+
English | [简体中文](README_zh-CN.md)
|
15 |
+
|
16 |
+
## Introduction
|
17 |
+
|
18 |
+
Based on [Qwen2-0.5B](https://huggingface.co/Qwen/Qwen2-0.5B), the tokenizer has been replaced with [BilingualTokenizer-8K](https://huggingface.co/Mxode/Bilingual-Tokenizer) to reduce the number of parameters. The total parameters have been reduced from 0.5B to 365M.
|
19 |
+
|
20 |
+
## Details
|
21 |
+
|
22 |
+
To recover some performance and facilitate fine-tuning for downstream tasks, I chose to freeze the backbone parameters and only train the embedding part after replacing the tokenizer. Training was conducted for 40,000 steps on [wikipedia-zh](https://huggingface.co/datasets/pleisto/wikipedia-cn-20230720-filtered) and [cosmopedia-100k](https://huggingface.co/datasets/HuggingFaceTB/cosmopedia-100k).
|
23 |
+
|
24 |
+
| | Value |
|
25 |
+
| :-------------------------: | :----------------------------------------------------------: |
|
26 |
+
| Total Params | 365 M |
|
27 |
+
| Trainable Params | < 10 M |
|
28 |
+
| Trainable Parts | `model.embed_tokens` |
|
29 |
+
| Training Steps | 40,000 |
|
30 |
+
| Training Dataset | [wikipedia-zh](https://huggingface.co/datasets/pleisto/wikipedia-cn-20230720-filtered), [cosmopedia-100k](https://huggingface.co/datasets/HuggingFaceTB/cosmopedia-100k) |
|
31 |
+
| Optimizer | adamw_torch |
|
32 |
+
| Learning Rate | 2e-4 |
|
33 |
+
| LR Scheduler | cosine |
|
34 |
+
| Weight Decay | 0.1 |
|
35 |
+
| Warm-up Ratio | 0.03 |
|
36 |
+
| Batch Size | 16 |
|
37 |
+
| Gradient Accumulation Steps | 1 |
|
38 |
+
| Seq Len | 4096 |
|
39 |
+
| Dtype | bf16 |
|
40 |
+
| Peak GPU Memory | < 48 GB |
|
41 |
+
| Device | NVIDIA A100-SXM4-80GB |
|
42 |
+
|
43 |
+
|
44 |
+
The specific training records are as follows:
|
45 |
+
![result](static/results.png)
|