bd4sur commited on
Commit
4908d05
·
verified ·
1 Parent(s): 06ddb0a

Upload 10 files

Browse files
README.md CHANGED
@@ -1,3 +1,63 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - Skywork/SkyPile-150B
5
+ - liwu/MNBVC
6
+ language:
7
+ - zh
8
+ - en
9
+ ---
10
+
11
+ # Nano-56M
12
+
13
+ ## 是什么?
14
+
15
+ - 版本:20241027
16
+ - 这是BD4SUR训练的预训练语言模型,基于[Nano](https://github.com/bd4sur/Nano),不兼容🤗Transformers。
17
+ - 语言模型采用类Llama结构,参数量约58M(55,591,424)。
18
+ - 使用约101亿词元的多源混合语料进行无监督训练,训练4轮(epoch)。语料分布如下:
19
+ - [SkyPile-150B](https://huggingface.co/datasets/Skywork/SkyPile-150B):80%
20
+ - [fineweb](https://huggingface.co/datasets/HuggingFaceFW/fineweb)(英文):12%
21
+ - [MNBVC](https://huggingface.co/datasets/liwu/MNBVC)(中文,仅XXQG):3%
22
+ - 中文维基百科:2%
23
+ - 医疗领域文本:2%
24
+ - 其他语料:1%
25
+ - 提供若干检查点文件,分别大致对应1整轮训练完成后的状态。每个检查点文件除包含模型权重外,还包含优化器状态和训练配置参数,可用于继续训练。
26
+ - 建议使用99000步的检查点。这个检查点对应4整轮训练完成后的状态。100000步的检查点可能在英文语料上有过拟合情况,倾向于生成英文文本。
27
+
28
+ ## 怎么玩?
29
+
30
+ ```
31
+ 1. 克隆Nano仓库,并按照文档的说明安装依赖。
32
+ cd ~
33
+ git clone https://github.com/bd4sur/Nano
34
+ cd Nano
35
+
36
+ 2. 将检查点文件下载到`~/Nano/checkpoint`目录下。
37
+
38
+ 3. 使用PyTorch推理。
39
+ python infer.py -m ~/Nano/checkpoint/nano_56m_20241027_pt_99000.pt
40
+
41
+ 4. 或者在浏览器上推理。
42
+ python export model.bin --checkpoint ~/Nano/checkpoint/nano_56m_20241027_pt_99000.pt
43
+ 在浏览器上打开 ~/Nano/infer/index.html 页面,打开刚刚生成的 model.bin 文件。
44
+
45
+ 5. 指令微调或者继续预训练。详见Nano仓库中的文档。
46
+
47
+ ```
48
+
49
+ ## 怎么训练的?
50
+
51
+ 使用某算力云平台提供的单机4卡A800-80GB-PCIe,以数据并行方式训练了4轮。算力费用(按训练时价格)约为1克黄金。
52
+
53
+ 训练集上交叉熵损失如下图。横轴为训练迭代步数,纵轴为交叉熵损失。
54
+
55
+ ![ ](nano_56m_20241027.png)
56
+
57
+ 后续可能发布技术报告,请勿期待😋
58
+
59
+ ## 声明
60
+
61
+ 作为统计语言模型,本模型的输出无法预测,其输出依赖于采样方式。本人不对该模型所生成的任何内容负责。
62
+
63
+ 本模型“按原样”提供,采用MIT协议授权。本模型为作者个人以学习和自用目的所创作的作品。作者不对本模型和本系统的质量作任何承诺。作者不保证提供有关本模型和本系统的任何形式的解释、维护或支持。作者不为任何人使用此模型和系统所造成的任何正面的或负面的后果负责。
nano_56m_20241027.log ADDED
The diff for this file is too large to render. See raw diff
 
nano_56m_20241027.png ADDED
nano_56m_20241027_pt_100000.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:773a1c864cab19490f1892ff82622422a81c98b4b14ab96a3a98d1d0d2dbc9ad
3
+ size 223015500
nano_56m_20241027_pt_100000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f17d7058385be7bf864726500d36f4c90922acc91da1d355502ff19c01b38686
3
+ size 684588386
nano_56m_20241027_pt_25000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2854bc076ec73e11999d40ed472e993dac22f61817f8521a943028d3515d3835
3
+ size 684587782
nano_56m_20241027_pt_50000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a804bcf6b52f83a09b8328e26f784c160b31ec87f630c94e5d1480124eff7943
3
+ size 684587782
nano_56m_20241027_pt_75000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9bc426497b3e3e8487e0ffe261f846e2b9d345a0a74ab3a6c845eddb42a24bef
3
+ size 684587782
nano_56m_20241027_pt_99000.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec9e86ed64c56becdc72d920c31569c3989679a9d5eb97e9ab106c89ca45b295
3
+ size 223015500
nano_56m_20241027_pt_99000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:53738ee1f182571cb807f27c550a7a5fbea4ae8e7d91c9c878ad70efd8ff19dc
3
+ size 684587782