chunhui commited on
Commit
128fffd
1 Parent(s): 133f5f5

update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -34,7 +34,7 @@ messages = [
34
  input_ids = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors='pt')
35
  if torch.cuda.is_available():
36
  input_ids = input_ids.to('cuda')
37
- pred = model.generate(**inputs, max_new_tokens=512, repetition_penalty=1.06, eos_token_id=tokenizer.eos_token_id)
38
  print(tokenizer.decode(pred[0][input_ids.shape[1]:], skip_special_tokens=True))
39
  ```
40
 
 
34
  input_ids = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors='pt')
35
  if torch.cuda.is_available():
36
  input_ids = input_ids.to('cuda')
37
+ pred = model.generate(input_ids, max_new_tokens=512, repetition_penalty=1.06, eos_token_id=tokenizer.eos_token_id)
38
  print(tokenizer.decode(pred[0][input_ids.shape[1]:], skip_special_tokens=True))
39
  ```
40