shunxing1234
commited on
Commit
•
984405c
1
Parent(s):
095f8b1
Update README.md
Browse files
README.md
CHANGED
@@ -41,14 +41,12 @@ We will continue to release improved versions of Aquila model as open source. Fo
|
|
41 |
```python
|
42 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
43 |
import torch
|
44 |
-
from cyg_conversation import covert_prompt_to_input_ids_with_history
|
45 |
|
46 |
-
|
47 |
-
|
|
|
48 |
model.eval()
|
49 |
model.to("cuda:0")
|
50 |
-
vocab = tokenizer.vocab
|
51 |
-
print(len(vocab))
|
52 |
|
53 |
text = "汽车EDR是什么"
|
54 |
|
|
|
41 |
```python
|
42 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
43 |
import torch
|
|
|
44 |
|
45 |
+
model_info = "BAAI/Aquila-7B"
|
46 |
+
tokenizer = AutoTokenizer.from_pretrained(model_info, trust_remote_code=True, use_auth_token="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")
|
47 |
+
model = AutoModelForCausalLM.from_pretrained(model_info, trust_remote_code=True, use_auth_token="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")
|
48 |
model.eval()
|
49 |
model.to("cuda:0")
|
|
|
|
|
50 |
|
51 |
text = "汽车EDR是什么"
|
52 |
|