Update README.md
Browse files
README.md
CHANGED
|
@@ -106,7 +106,7 @@ TeleChat模型相比同规模模型在评测效果方面也有较好的表现,
|
|
| 106 |
```python
|
| 107 |
import os
|
| 108 |
import torch
|
| 109 |
-
from
|
| 110 |
os.environ["CUDA_VISIBLE_DEVICES"] = '0'
|
| 111 |
tokenizer = AutoTokenizer.from_pretrained('TeleAI/TeleChat-12B')
|
| 112 |
model = AutoModelForCausalLM.from_pretrained('TeleAI/TeleChat-12B', trust_remote_code=True, device_map="auto", torch_dtype=torch.float16)
|
|
|
|
| 106 |
```python
|
| 107 |
import os
|
| 108 |
import torch
|
| 109 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
|
| 110 |
os.environ["CUDA_VISIBLE_DEVICES"] = '0'
|
| 111 |
tokenizer = AutoTokenizer.from_pretrained('TeleAI/TeleChat-12B')
|
| 112 |
model = AutoModelForCausalLM.from_pretrained('TeleAI/TeleChat-12B', trust_remote_code=True, device_map="auto", torch_dtype=torch.float16)
|