Commit
·
a5df324
1
Parent(s):
bf491c2
Update README.md
Browse files
README.md
CHANGED
|
@@ -114,7 +114,7 @@ export use_triton=False
|
|
| 114 |
>>> tokenizer = AutoTokenizer.from_pretrained("OpenNLPLab/TransNormerLLM2-7B-300B", trust_remote_code=True)
|
| 115 |
>>> model = AutoModelForCausalLM.from_pretrained("TransNormerLLM2-7B-300B", device_map="auto", trust_remote_code=True)
|
| 116 |
>>> inputs = tokenizer('今天是美好的一天', return_tensors='pt')
|
| 117 |
-
>>> pred = model.generate(**inputs, max_new_tokens=
|
| 118 |
>>> print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))
|
| 119 |
```
|
| 120 |
|
|
|
|
| 114 |
>>> tokenizer = AutoTokenizer.from_pretrained("OpenNLPLab/TransNormerLLM2-7B-300B", trust_remote_code=True)
|
| 115 |
>>> model = AutoModelForCausalLM.from_pretrained("TransNormerLLM2-7B-300B", device_map="auto", trust_remote_code=True)
|
| 116 |
>>> inputs = tokenizer('今天是美好的一天', return_tensors='pt')
|
| 117 |
+
>>> pred = model.generate(**inputs, max_new_tokens=8192, repetition_penalty=1.0)
|
| 118 |
>>> print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))
|
| 119 |
```
|
| 120 |
|