BAAI
/

shunxing1234 commited on
Commit
091bd28
1 Parent(s): 8ac8b62

Update README_zh.md

Browse files
Files changed (1) hide show
  1. README_zh.md +1 -1
README_zh.md CHANGED
@@ -44,7 +44,7 @@ model = AutoModelForCausalLM.from_pretrained(model_info, trust_remote_code=True)
44
  model.eval()
45
  model.to(device)
46
  text = "请给出10个要到北京旅游的理由。"
47
- tokens = tokenizer.encode_plus(text)['input_ids'][:-1]
48
  tokens = torch.tensor(tokens)[None,].to(device)
49
  stop_tokens = ["###", "[UNK]", "</s>"]
50
  with torch.no_grad():
 
44
  model.eval()
45
  model.to(device)
46
  text = "请给出10个要到北京旅游的理由。"
47
+ tokens = tokenizer.encode_plus(text)['input_ids']
48
  tokens = torch.tensor(tokens)[None,].to(device)
49
  stop_tokens = ["###", "[UNK]", "</s>"]
50
  with torch.no_grad():