Closed metero20000 closed 2 months ago
model_inputs = tokenizer([text], return_tensors="pt").to("cuda:0")
generated_ids = model.generate( model_inputs.input_ids, max_new_tokens=512, pad_token_id=tokenizer.eos_token_id,eos_token_id=tokenizer.eos_token_id # add this line <===== )
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's
attention_mask
to obtain reliable results. Settingpad_token_id
toeos_token_id
:32021 for open-end generation.