Mxode commited on
Commit
57fb61a
·
verified ·
1 Parent(s): 1347eee

Update README_zh-CN.md

Browse files
Files changed (1) hide show
  1. README_zh-CN.md +14 -12
README_zh-CN.md CHANGED
@@ -1,20 +1,22 @@
1
- # **NanoTranslator-XL**
2
 
3
  [English](README.md) | 简体中文
4
 
5
  ## Introduction
6
 
7
- 这是 NanoTranslator 的 **X-Large** 型号,目前仅支持**英译中**。仓库中同时提供了 ONNX 版本的模型。
8
 
 
9
 
10
- | Size | P. | Arch. | Act. | V. | H. | I. | L. | A.H. | K.H. | Tie |
11
- | :--: | :-----: | :--: | :--: | :--: | :-----: | :---: | :------: | :----: | :----: | :--: |
12
- | XL | 100 | LLaMA | SwiGLU | 16K | 768 | 4096 | 8 | 24 | 8 | True |
13
- | L | 78 | LLaMA | GeGLU | 16K | 768 | 4096 | 6 | 24 | 8 | True |
14
- | M2 | 22 | Qwen2 | GeGLU | 4K | 432 | 2304 | 6 | 24 | 8 | True |
15
- | M | 22 | LLaMA | SwiGLU | 8K | 256 | 1408 | 16 | 16 | 4 | True |
16
- | S | 9 | LLaMA | SwiGLU | 4K | 168 | 896 | 16 | 12 | 4 | True |
17
- | XS | 2 | LLaMA | SwiGLU | 2K | 96 | 512 | 12 | 12 | 4 | True |
 
18
 
19
  - **P.** - Parameters (in million)
20
  - **V.** - vocab size
@@ -41,7 +43,7 @@ Prompt 格式如下:
41
  import torch
42
  from transformers import AutoTokenizer, AutoModelForCausalLM
43
 
44
- model_path = 'Mxode/NanoTranslator-XL'
45
 
46
  tokenizer = AutoTokenizer.from_pretrained(model_path)
47
  model = AutoModelForCausalLM.from_pretrained(model_path)
@@ -78,7 +80,7 @@ print(response)
78
 
79
  根据实际测试,使用 ONNX 模型推理会比直接使用 transformers 推理要**快 2~10 倍**。
80
 
81
- 如果希望使用 ONNX 模型,那么你需要手动切换到 [onnx 分支](https://huggingface.co/Mxode/NanoTranslator-XL/tree/onnx)并从本地加载。
82
 
83
  参考文档:
84
 
 
1
+ # **NanoTranslator-XXL**
2
 
3
  [English](README.md) | 简体中文
4
 
5
  ## Introduction
6
 
7
+ 这是 NanoTranslator 的 **XX-Large** 型号,目前仅支持**英译中**。仓库中同时提供了 ONNX 版本的模型。
8
 
9
+ 所有模型均收录于 [NanoTranslator Collection](https://huggingface.co/collections/Mxode/nanotranslator-66e1de2ba352e926ae865bd2) 中。
10
 
11
+ | | P. | Arch. | Act. | V. | H. | I. | L. | A.H. | K.H. | Tie |
12
+ | :--: | :-----: | :--: | :--: | :--: | :-----: | :---: | :------: | :--: | :--: | :--: |
13
+ | [XXL](https://huggingface.co/Mxode/NanoTranslator-XXL) | 100 | LLaMA | SwiGLU | 16000 | 768 | 4096 | 8 | 24 | 8 | True |
14
+ | [XL](https://huggingface.co/Mxode/NanoTranslator-XL) | 78 | LLaMA | GeGLU | 16000 | 768 | 4096 | 6 | 24 | 8 | True |
15
+ | [L](https://huggingface.co/Mxode/NanoTranslator-L) | 49 | LLaMA | GeGLU | 16000 | 512 | 2816 | 8 | 16 | 8 | True |
16
+ | [M2](https://huggingface.co/Mxode/NanoTranslator-M2) | 22 | Qwen2 | GeGLU | 4000 | 432 | 2304 | 6 | 24 | 8 | True |
17
+ | [M](https://huggingface.co/Mxode/NanoTranslator-M) | 22 | LLaMA | SwiGLU | 8000 | 256 | 1408 | 16 | 16 | 4 | True |
18
+ | [S](https://huggingface.co/Mxode/NanoTranslator-S) | 9 | LLaMA | SwiGLU | 4000 | 168 | 896 | 16 | 12 | 4 | True |
19
+ | [XS](https://huggingface.co/Mxode/NanoTranslator-XS) | 2 | LLaMA | SwiGLU | 2000 | 96 | 512 | 12 | 12 | 4 | True |
20
 
21
  - **P.** - Parameters (in million)
22
  - **V.** - vocab size
 
43
  import torch
44
  from transformers import AutoTokenizer, AutoModelForCausalLM
45
 
46
+ model_path = 'Mxode/NanoTranslator-XXL'
47
 
48
  tokenizer = AutoTokenizer.from_pretrained(model_path)
49
  model = AutoModelForCausalLM.from_pretrained(model_path)
 
80
 
81
  根据实际测试,使用 ONNX 模型推理会比直接使用 transformers 推理要**快 2~10 倍**。
82
 
83
+ 如果希望使用 ONNX 模型,那么你需要手动切换到 [onnx 分支](https://huggingface.co/Mxode/NanoTranslator-XXL/tree/onnx)并从本地加载。
84
 
85
  参考文档:
86