Update README.md

#2
by Qianguo - opened
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