BAAI
/

ldwang commited on
Commit
f985e26
1 Parent(s): 9ac0016

Update README_zh.md

Browse files
Files changed (1) hide show
  1. README_zh.md +1 -1
README_zh.md CHANGED
@@ -78,7 +78,7 @@ tokens = tokenizer.encode_plus(text)['input_ids']
78
  tokens = torch.tensor(tokens)[None,].to(device)
79
 
80
  with torch.no_grad():
81
- out = llama.generate(tokens, do_sample=False, max_length=128, eos_token_id=tokenizer.eos_token_id)[0]
82
  out = tokenizer.decode(out.cpu().numpy().tolist())
83
  print(out)
84
  ```
 
78
  tokens = torch.tensor(tokens)[None,].to(device)
79
 
80
  with torch.no_grad():
81
+ out = model.generate(tokens, do_sample=False, max_length=128, eos_token_id=tokenizer.eos_token_id)[0]
82
  out = tokenizer.decode(out.cpu().numpy().tolist())
83
  print(out)
84
  ```