Update README.md
Browse files
README.md
CHANGED
@@ -10,10 +10,13 @@ library_name: transformers
|
|
10 |
---
|
11 |
# **NanoTranslator-L**
|
12 |
|
|
|
|
|
13 |
## Introduction
|
14 |
|
15 |
-
|
16 |
|
|
|
17 |
|
18 |
|
19 |
| Size | Params. | V. | H. | I. | L. | Att. H. | KV H. | Tie Emb. |
|
@@ -35,7 +38,7 @@ library_name: transformers
|
|
35 |
|
36 |
## How to use
|
37 |
|
38 |
-
Prompt
|
39 |
|
40 |
```
|
41 |
<|im_start|> {English Text} <|endoftext|>
|
@@ -84,7 +87,7 @@ print(response)
|
|
84 |
|
85 |
It has been measured that reasoning with ONNX models will be **2-10 times faster** than reasoning directly with transformers models.
|
86 |
|
87 |
-
You should switch to onnx branch manually and download to local.
|
88 |
|
89 |
reference docs:
|
90 |
|
@@ -94,8 +97,6 @@ reference docs:
|
|
94 |
**Using ORTModelForCausalLM**
|
95 |
|
96 |
```python
|
97 |
-
# onnx branch: https://huggingface.co/Mxode/NanoTranslator-M/tree/onnx
|
98 |
-
|
99 |
from optimum.onnxruntime import ORTModelForCausalLM
|
100 |
from transformers import AutoTokenizer
|
101 |
|
@@ -122,4 +123,4 @@ text = "I love to watch my favorite TV series."
|
|
122 |
|
123 |
response = pipe(text, max_new_tokens=64, do_sample=False)
|
124 |
response
|
125 |
-
```
|
|
|
10 |
---
|
11 |
# **NanoTranslator-L**
|
12 |
|
13 |
+
English | [简体中文](README_zh-CN.md)
|
14 |
+
|
15 |
## Introduction
|
16 |
|
17 |
+
This is the Large model of the NanoTranslator, currently supported only in **English to Chinese**.
|
18 |
|
19 |
+
The ONNX version of the model is also available in the repository.
|
20 |
|
21 |
|
22 |
| Size | Params. | V. | H. | I. | L. | Att. H. | KV H. | Tie Emb. |
|
|
|
38 |
|
39 |
## How to use
|
40 |
|
41 |
+
Prompt format as follows:
|
42 |
|
43 |
```
|
44 |
<|im_start|> {English Text} <|endoftext|>
|
|
|
87 |
|
88 |
It has been measured that reasoning with ONNX models will be **2-10 times faster** than reasoning directly with transformers models.
|
89 |
|
90 |
+
You should switch to [onnx branch](https://huggingface.co/Mxode/NanoTranslator-L/tree/onnx) manually and download to local.
|
91 |
|
92 |
reference docs:
|
93 |
|
|
|
97 |
**Using ORTModelForCausalLM**
|
98 |
|
99 |
```python
|
|
|
|
|
100 |
from optimum.onnxruntime import ORTModelForCausalLM
|
101 |
from transformers import AutoTokenizer
|
102 |
|
|
|
123 |
|
124 |
response = pipe(text, max_new_tokens=64, do_sample=False)
|
125 |
response
|
126 |
+
```
|