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