lit-llama icon indicating copy to clipboard operation
lit-llama copied to clipboard

Missing eos_id=tokenizer.eos_id in the generate function call in generate/full.py

Open wlsdnen opened this issue 2 years ago • 3 comments
trafficstars

I've noticed something odd in generate/full.py. When calling the generate function, it looks like we're missing the eos_id=tokenizer.eos_id. Right now, it's set to None, and this is causing a series of mysterious codes to appear during inference. It seems like adding the eos_id argument could be the fix here.

wlsdnen avatar May 15 '23 07:05 wlsdnen

Great catch @wlsdnen, do you want to send a PR or should I do that?

lantiga avatar May 15 '23 11:05 lantiga

Great catch @wlsdnen, do you want to send a PR or should I do that?

Thank you. I will quickly make the corrections and send a PR.

wlsdnen avatar May 15 '23 11:05 wlsdnen

@wlsdnen I met same problem, English seems not have such issue, but other language has serious issue, please help fix it.

lucasjinreal avatar May 22 '23 02:05 lucasjinreal