Update README.md (#6)
Browse files- Update README.md (941516603022f478762ebd43c50db554944994ab)
Co-authored-by: Qianguo <Qianguo@users.noreply.huggingface.co>
README.md
CHANGED
@@ -90,7 +90,7 @@ import torch
|
|
90 |
device = torch.device("cuda")
|
91 |
|
92 |
query="帮我写一份去西安的旅游计划"
|
93 |
-
model = LlamaForCausalLM.from_pretrained('IDEA-CCNL/Ziya-LLaMA-13B-v1', device_map="auto")
|
94 |
tokenizer = AutoTokenizer.from_pretrained('IDEA-CCNL/Ziya-LLaMA-13B-v1')
|
95 |
inputs = '<human>:' + query.strip() + '\n<bot>:'
|
96 |
|
|
|
90 |
device = torch.device("cuda")
|
91 |
|
92 |
query="帮我写一份去西安的旅游计划"
|
93 |
+
model = LlamaForCausalLM.from_pretrained('IDEA-CCNL/Ziya-LLaMA-13B-v1', torch_dtype=torch.float16, device_map="auto")
|
94 |
tokenizer = AutoTokenizer.from_pretrained('IDEA-CCNL/Ziya-LLaMA-13B-v1')
|
95 |
inputs = '<human>:' + query.strip() + '\n<bot>:'
|
96 |
|