shunxing1234
commited on
Commit
•
14ae5a4
1
Parent(s):
8b77d13
Update README.md
Browse files
README.md
CHANGED
@@ -35,12 +35,12 @@ license: other
|
|
35 |
### 1. 推理/Inference
|
36 |
|
37 |
```python
|
38 |
-
from transformers import AutoTokenizer,
|
39 |
import torch
|
40 |
from cyg_conversation import covert_prompt_to_input_ids_with_history
|
41 |
|
42 |
tokenizer = AutoTokenizer.from_pretrained("BAAI/AquilaChat-7B")
|
43 |
-
model =
|
44 |
model.eval()
|
45 |
model.to("cuda:0")
|
46 |
vocab = tokenizer.vocab
|
|
|
35 |
### 1. 推理/Inference
|
36 |
|
37 |
```python
|
38 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
39 |
import torch
|
40 |
from cyg_conversation import covert_prompt_to_input_ids_with_history
|
41 |
|
42 |
tokenizer = AutoTokenizer.from_pretrained("BAAI/AquilaChat-7B")
|
43 |
+
model = AutoModelForCausalLM.from_pretrained("BAAI/AquilaChat-7B")
|
44 |
model.eval()
|
45 |
model.to("cuda:0")
|
46 |
vocab = tokenizer.vocab
|