When we are using qwen 1.5 model to generate, we may get this error:
In this tutorial, we will introduce you how to fix it.
From the log, we can find: we should set pad_token_id = eos_token_id = 151643
Then, we can modify model.generate() as follows:
Then, we will find this error is fixed.