shibing624 commited on
Commit
01b2408
1 Parent(s): 416c468

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -5
README.md CHANGED
@@ -126,16 +126,13 @@ for s in sents:
126
  inputs = tokenizer(q, return_tensors="pt")
127
  inputs = inputs.to(device=device)
128
 
129
- generate_ids = ref_model.generate(
130
  **inputs,
131
  max_new_tokens=120,
132
  do_sample=True,
133
  top_p=0.85,
134
  temperature=1.0,
135
- repetition_penalty=1.0,
136
- eos_token_id=tokenizer.eos_token_id,
137
- bos_token_id=tokenizer.bos_token_id,
138
- pad_token_id=tokenizer.pad_token_id,
139
  )
140
 
141
  output = tokenizer.batch_decode(generate_ids, skip_special_tokens=True)[0]
 
126
  inputs = tokenizer(q, return_tensors="pt")
127
  inputs = inputs.to(device=device)
128
 
129
+ generate_ids = model.generate(
130
  **inputs,
131
  max_new_tokens=120,
132
  do_sample=True,
133
  top_p=0.85,
134
  temperature=1.0,
135
+ repetition_penalty=1.0
 
 
 
136
  )
137
 
138
  output = tokenizer.batch_decode(generate_ids, skip_special_tokens=True)[0]