diff --git a/README.md b/README.md
index 3f25240..ec7fb9e 100644
--- a/README.md
+++ b/README.md
@@ -214,20 +214,21 @@ streamlit run fast_inference.py
因为LLM体积非常小,为了避免模型头重脚轻(词嵌入embedding层参数占整个LLM比太高),所以词表长度需要选择比较小。
强大的开源模型例如01万物、千问、chatglm、mistral、Llama3等,它们的tokenizer词表长度如下:
-| Tokenizer 模型 | 词表大小 | 来源 |
-|--------------------|---------|----------------|
-| yi tokenizer | 64,000 | 01万物(中国) |
-| qwen2 tokenizer | 151,643 | 阿里云(中国) |
-| glm tokenizer | 151,329 | 智谱AI(中国) |
-| mistral tokenizer | 32,000 | Mistral AI(法国) |
-| llama3 tokenizer | 128,000 | Meta(美国) |
-| minimind tokenizer | 6,400 | 自定义 |
+
+ Tokenizer模型 | 词表大小 | 来源 |
+ yi tokenizer | 64,000 | 01万物(中国) |
+ qwen2 tokenizer | 151,643 | 阿里云(中国) |
+ glm tokenizer | 151,329 | 智谱AI(中国) |
+ mistral tokenizer | 32,000 | Mistral AI(法国) |
+ llama3 tokenizer | 128,000 | Meta(美国) |
+ minimind tokenizer | 6,400 | 自定义 |
+
-> 尽管Mistral中文词语占比很少,编解码效率弱于qwen2、glm等中文友好型分词器。
-> 但MiniMind这里选择了mistral tokenizer作为分词器以保持整体参数轻量,避免头重脚轻,因为mistral的词表大小只有32,000。
-> 且MiniMind在实际测试中几乎没有出现过生僻词汇解码失败的情况,效果良好。
+ > 尽管Mistral中文词语占比很少,编解码效率弱于qwen2、glm等中文友好型分词器。
+ > 但MiniMind这里选择了mistral tokenizer作为分词器以保持整体参数轻量,避免头重脚轻,因为mistral的词表大小只有32,000。
+ > 且MiniMind在实际测试中几乎没有出现过生僻词汇解码失败的情况,效果良好。
-> 方便对比测试效果,额外训练了一个自定义Tokenizer模型的版本**MiniMind-small-T**,自定义词表压缩长度到6400,使得LLM总参数进一步降低到26M左右。
+ > 方便对比测试效果,额外训练了一个自定义Tokenizer模型的版本**MiniMind-small-T**,自定义词表压缩长度到6400,使得LLM总参数进一步降低到26M左右。
---
@@ -236,6 +237,11 @@ streamlit run fast_inference.py
是由多种公开来源的数据(如网页、百科、博客、开源代码、书籍等)汇总清洗而成。整理成统一的JSONL格式,并经过了严格的筛选和去重,确保数据的全面性、规模、可信性和高质量。总量大约在10B
token,适合中文大语言模型的预训练。
+ > 第2种选择:[SkyPile-150B数据集](https://hf-mirror.com/datasets/Skywork/SkyPile-150B/tree/main/data)
+ 的可公开访问部分包含约2.33亿个独立网页,每个网页平均包含1000多个汉字。数据集包括大约1500亿个令牌和620GB的纯文本数据。
+ **如果着急的话**,可以尝试只挑选SkyPile-150B的部分jsonl下载(并在./data_process.py中对文本tokenizer生成*
+ .bin文件),以便快速跑通预训练流程。
+
---
- 📕【SFT数据】:[匠数大模型SFT数据集](https://www.modelscope.cn/datasets/deepctrl/deepctrl-sft-data)
@@ -268,13 +274,16 @@ streamlit run fast_inference.py
### 数据集下载地址
-| MiniMind训练数据集 | 下载地址 |
-|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **【tokenizer训练集】** | [HuggingFace](https://huggingface.co/datasets/jingyaogong/minimind_dataset/tree/main) / [百度网盘](https://pan.baidu.com/s/1yAw1LVTftuhQGAC1Y9RdYQ?pwd=6666) |
-| **【Pretrain数据】** | [Seq-Monkey通用文本数据集](http://share.mobvoi.com:5000/sharing/O91blwPkY) / [百度网盘](https://pan.baidu.com/s/114F1k3eksiWCOQLvaT3RYQ?pwd=6666) |
-| **【SFT数据】** | [匠数大模型SFT数据集](https://www.modelscope.cn/datasets/deepctrl/deepctrl-sft-data/resolve/master/sft_data_zh.jsonl) |
-| **【DPO数据】** | [活字数据集1](https://huggingface.co/datasets/Skepsun/huozi_rlhf_data_json) |
-| **【DPO数据】** | [活字数据集2](https://huggingface.co/datasets/beyond/rlhf-reward-single-round-trans_chinese) |
+下载到`./dataset/`目录下。
+
+| MiniMind训练数据集 | 下载地址 |
+|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
+| **【tokenizer训练集】** | [HuggingFace](https://huggingface.co/datasets/jingyaogong/minimind_dataset/tree/main) / [百度网盘](https://pan.baidu.com/s/1yAw1LVTftuhQGAC1Y9RdYQ?pwd=6666) |
+| **【Pretrain数据(2选1)】** | [Seq-Monkey通用文本数据集](http://share.mobvoi.com:5000/sharing/O91blwPkY) / [百度网盘](https://pan.baidu.com/s/114F1k3eksiWCOQLvaT3RYQ?pwd=6666) |
+| **【Pretrain数据(2选1)】** | [SkyPile-150B数据集](https://hf-mirror.com/datasets/Skywork/SkyPile-150B/tree/main/data) |
+| **【SFT数据】** | [匠数大模型SFT数据集](https://www.modelscope.cn/datasets/deepctrl/deepctrl-sft-data/resolve/master/sft_data_zh.jsonl) |
+| **【DPO数据1】** | [活字数据集1](https://huggingface.co/datasets/Skepsun/huozi_rlhf_data_json) |
+| **【DPO数据2】** | [活字数据集2](https://huggingface.co/datasets/beyond/rlhf-reward-single-round-trans_chinese) |
# 📌 Model
diff --git a/README_en.md b/README_en.md
index 023cebd..9e10c0f 100644
--- a/README_en.md
+++ b/README_en.md
@@ -243,16 +243,15 @@ git clone https://github.com/jingyaogong/minimind.git
Powerful open-source models like 01万物, 千问, chatglm, mistral, and Llama3 have the following tokenizer vocabulary
sizes:
-
- | Tokenizer Model | Vocabulary Size | Source |
- |----------------------|------------------|-----------------------|
- | yi tokenizer | 64,000 | 01-AI (China) |
- | qwen2 tokenizer | 151,643 | Alibaba Cloud (China) |
- | glm tokenizer | 151,329 | Zhipu AI (China) |
- | mistral tokenizer | 32,000 | Mistral AI (France) |
- | llama3 tokenizer | 128,000 | Meta (USA) |
- | minimind tokenizer | 6,400 | Custom |
-
+
+ Tokenizer Model | Vocabulary Size | Come from |
+ yi tokenizer | 64,000 | 01-AI(China) |
+ qwen2 tokenizer | 151,643 | Alibaba Cloud(China) |
+ glm tokenizer | 151,329 | Zhipu AI(China) |
+ mistral tokenizer | 32,000 | Mistral AI(China) |
+ llama3 tokenizer | 128,000 | Meta(China) |
+ minimind tokenizer | 6,400 | Custom |
+
> Although Mistral’s Chinese vocabulary proportion is small and its encoding/decoding efficiency is weaker than
Chinese-friendly tokenizers like qwen2 and glm, MiniMind chose the Mistral tokenizer to keep the overall model
lightweight and avoid being top-heavy, as Mistral’s vocabulary size is only 32,000. MiniMind has shown excellent