BAAI
/

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

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -71,7 +71,7 @@ tokens = tokenizer.encode_plus(text)['input_ids']
71
  tokens = torch.tensor(tokens)[None,].to(device)
72
 
73
  with torch.no_grad():
74
- out = llama.generate(tokens, do_sample=False, max_length=128, eos_token_id=tokenizer.eos_token_id)[0]
75
  out = tokenizer.decode(out.cpu().numpy().tolist())
76
  print(out)
77
  ```
 
71
  tokens = torch.tensor(tokens)[None,].to(device)
72
 
73
  with torch.no_grad():
74
+ out = model.generate(tokens, do_sample=False, max_length=128, eos_token_id=tokenizer.eos_token_id)[0]
75
  out = tokenizer.decode(out.cpu().numpy().tolist())
76
  print(out)
77
  ```