carsonhxsu
commited on
Commit
·
22a0289
1
Parent(s):
70df44a
Update README
Browse files- README.md +1 -1
- lyrallms/LyraBaichuanPy/README.md +0 -19
- lyrallms/LyraLlamaPy/README.md +1 -14
README.md
CHANGED
|
@@ -118,7 +118,7 @@ We have released multiple optimized models converted from original HuggingFace o
|
|
| 118 |
- XVERSE-13B-Chat
|
| 119 |
- LLaMA-Ziya-13B
|
| 120 |
- Baichuan-7B, Baichuan-13B-Base, Baichuan-13B-Chat, Baichuan2-7B-Base, Baichuan2-7B-Chat, Baichuan2-13B-Base and lyraBaichuan2-13B-Chat
|
| 121 |
-
- Yi-6B
|
| 122 |
|
| 123 |
Feel free to contact us if you would like to convert a finetuned version of LLMs.
|
| 124 |
|
|
|
|
| 118 |
- XVERSE-13B-Chat
|
| 119 |
- LLaMA-Ziya-13B
|
| 120 |
- Baichuan-7B, Baichuan-13B-Base, Baichuan-13B-Chat, Baichuan2-7B-Base, Baichuan2-7B-Chat, Baichuan2-13B-Base and lyraBaichuan2-13B-Chat
|
| 121 |
+
- Yi-6B, Yi-34B
|
| 122 |
|
| 123 |
Feel free to contact us if you would like to convert a finetuned version of LLMs.
|
| 124 |
|
lyrallms/LyraBaichuanPy/README.md
CHANGED
|
@@ -67,22 +67,3 @@ print(output_texts)
|
|
| 67 |
- Batch推理
|
| 68 |
- 不等长Batch推理
|
| 69 |
- Batch流式推理
|
| 70 |
-
|
| 71 |
-
## 自定义模型参数
|
| 72 |
-
|
| 73 |
-
已提供转换脚本 `parse_model_params.py` 可以将 Baichuan1/2 模型的 HuggingFace 格式参数,转换为加速版本下各层模型需要的模型参数。这里我们提供一个模型名字 `-model_name` 的转换参数,可以自行填入,以便生成可区分的 config.in 文件。
|
| 74 |
-
|
| 75 |
-
```shell
|
| 76 |
-
python parse_model_params.py -i your_model_dir -o output_dir -t_g 1 -i_g 1 -weight_data_type "fp16" -model_name "baichuan2-13b"
|
| 77 |
-
```
|
| 78 |
-
|
| 79 |
-
该转换脚本还会将同目录下 tokenizer_source 里的 `tokenizer.model` `special_tokens_map.json` `tokenizer_config.json` 四个文件拷贝到 output_dir 下,以便后续使用加速模型时直接能初始化对应的 加速后的 Baichuan 的 tokenizer.
|
| 80 |
-
|
| 81 |
-
转换后的模型参数将以每个参数一个文件的形式存放在 `output_dir/{i_g}-gpu-{weight_data_type}` 下,需要使用`merge_bin.py`将多个bin文件合并为一个。
|
| 82 |
-
|
| 83 |
-
```shell
|
| 84 |
-
layer_num=40 # 13B->40, 7B->32
|
| 85 |
-
python merge_bin.py -i model_dir/{i_g}-gpu-{weight_data_type} -o output_dir -l ${layer_num}
|
| 86 |
-
```
|
| 87 |
-
|
| 88 |
-
将上述 `config.ini` `config.json` `tokenizer.model` `special_tokens_map.json` `tokenizer_config.json` 五个文件拷贝到 output_dir 下。
|
|
|
|
| 67 |
- Batch推理
|
| 68 |
- 不等长Batch推理
|
| 69 |
- Batch流式推理
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lyrallms/LyraLlamaPy/README.md
CHANGED
|
@@ -59,17 +59,4 @@ print(output_texts)
|
|
| 59 |
更多测试脚本及用法详见参考 `examples` 下的 [README.md](./examples/README.md) ,如:
|
| 60 |
- Batch推理
|
| 61 |
- 不等长Batch推理
|
| 62 |
-
- Batch流式推理
|
| 63 |
-
|
| 64 |
-
## 自定义模型参数
|
| 65 |
-
|
| 66 |
-
已提供转换脚本 `parse_model_params.py` 可以将 LLaMa 模型的 HuggingFace 格式参数,转换为加速版本下各层模型需要的模型参数。因为 LLaMa 有很多变体,所以这里我们提供一个模型名字 `-model_name` 的转换参数,可以自行填入,以便生成可区分的 config.in 文件。
|
| 67 |
-
|
| 68 |
-
```shell
|
| 69 |
-
python parse_model_params.py -i your_model_dir -o output_dir -t_g 1 -i_g 1 -weight_data_type "fp16" -model_name "llama"
|
| 70 |
-
```
|
| 71 |
-
|
| 72 |
-
转换后的模型参数将以每个参数一个文件的形式存放在 `output_dir/{i_g}-gpu-{weight_data_type}` 下,分割的形式有助于并发 IO,但缺陷是不便捷。
|
| 73 |
-
|
| 74 |
-
同时该转换脚本还会将同目录下 tokenizer_source 里的 `tokenizer.model` `tokenizer.json` `special_tokens_map.json` `tokenizer_config.json` 四个文件拷贝到 output_dir 下,以便后续使用加速模型时直接能初始化对应的 加速后的 LLaMa 的 tokenizer.
|
| 75 |
-
|
|
|
|
| 59 |
更多测试脚本及用法详见参考 `examples` 下的 [README.md](./examples/README.md) ,如:
|
| 60 |
- Batch推理
|
| 61 |
- 不等长Batch推理
|
| 62 |
+
- Batch流式推理
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|