Commit 42d1f489 authored by chenych's avatar chenych
Browse files

delete train

parent 6a583c2f
......@@ -108,7 +108,7 @@ John买了3件衬衫,每件售价为20美元。此外,他还需要支付所
python ./tools/preprocess_data_yuan.py --input '<Specify path>' --data-idx '0-42' --tokenizer_path './tokenizer' --output_path '<Specify path>'
## example
# python ./tools/preprocess_data_yuan.py --input ./datasets/TOY --data-idx '0' --tokenizer_path '/path/of/tokenizer' --output_path './toy_yuan_data'
# python ./tools/preprocess_data_yuan.py --input ./datasets/TOY --data-idx '0' --tokenizer_path '/path/of/tokenizer' --output_path './datasets/TOY/'
```
数据集的目录结构如下:
......@@ -119,15 +119,11 @@ python ./tools/preprocess_data_yuan.py --input '<Specify path>' --data-idx '0-42
```
## 训练
### 基于LLaMA Factory实现源2.0微调
[Llama-Factory](https://developer.hpccube.com/codes/OpenDAS/llama-factory/-/tree/v0.6.3)
```
template: yuan
```
暂未支持
## 推理
如果不指定`--model_path_or_name`参数,当前默认`IEITYuan/Yuan2-M32-hf`模型进行推理。
Tips: 为避免出现 `RuntimeError: FlashAttention forward only supports head dimension at most 128`错误,修改 `/path/of/Yuan2-M32-hf/config.json` 文件中 `"use_flash_attention":false`
```bash
pip install -U huggingface_hub hf_transfer
export HF_ENDPOINT=https://hf-mirror.com/
......@@ -135,19 +131,23 @@ export HF_ENDPOINT=https://hf-mirror.com/
HIP_VISIBLE_DEVICES=0,1,2,3 python infer_hf.py --model_path_or_name /path/of/Yuan2-M32-hf
```
**Tips:**
- 为避免出现 `RuntimeError: FlashAttention forward only supports head dimension at most 128`错误,修改 `/path/of/Yuan2-M32-hf/config.json` 文件中 `"use_flash_attention":false`
<div align=center>
<img src="./docs/flash_atten.png" width=1500 heigh=400/>
</div>
## result
<div align=center>
<img src="./doc/result.png" width=1500 heigh=400/>
<img src="./docs/result.png" width=1500 heigh=400/>
</div>
## 预训练权重
| 模型 | 序列长度 | 模型格式 | 下载链接 |
| :----------: | :------: | :-------: |:---------------------------: |
| Yuan2.0-M32 | 16K | Megatron | [SCNet](https://www.wisemodel.cn/models/IEIT-Yuan/Yuan2-M32) |
| Yuan2.0-M32-HF | 16K | HuggingFace | [SCNet](http://113.200.138.88:18080/aimodels/Yuan2-M32-hf) |
| Yuan2.0-M32-GGUF | 16K | GGUF | [SCNet](https://modelscope.cn/models/YuanLLM/Yuan2-M32-gguf/summary) |
| Yuan2.0-M32-HF-INT8 | 16K | HuggingFace | [SCNet](https://modelscope.cn/models/YuanLLM/Yuan2-M32-hf-int8/) |
### 精度
暂无
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment