suolyer Qianguo commited on
Commit
d3587a9
1 Parent(s): c916fef

Update README.md (#2)

Browse files

- Update README.md (c53cdd42d967a73b4900621f05e6dcb2c62abe06)


Co-authored-by: Qianguo <Qianguo@users.noreply.huggingface.co>

Files changed (1) hide show
  1. README.md +1 -1
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').cuda()
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