A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set `padding_side='left'` when initializing the tokenizer.

#51
by Ayush8120 - opened

This wasn't popping up until now. But all of a sudden, it downloaded some files and started giving this warning. How to correct this?

This wasn't popping up until now. But all of a sudden, it downloaded some files and started giving this warning. How to correct this?

if your tokenizer is instantiated as tokenizer then it should be:
tokenizer.padding_side = 'left'

https://www.codedump.xyz/ini/ZSUvdc5O_9SUkEWi
PS: couldn't write EOS characters in text thus adding a link

Screenshot 2023-10-10 at 16-24-27 mistralai_Mistral-7B-v0.1 · A decoder-only architecture is being used but right-padding was detected! For correct generation results please set `padding_side 'left'` when initializing the tokenizer.png

PS: couldn't write EOS characters in text thus adding a screenshot

What do you mean by it works fine? And what error do you get it you leave it without a space?

If I leave it without space -> I get the error that 'a decoder only architecture..'
but if I leave a space before the end of EOS char, it works without any error
Please refer here : https://www.codedump.xyz/ini/ZSUvdc5O_9SUkEWi

If I leave it without space -> I get the error that 'a decoder only architecture..'
but if I leave a space before the end of EOS char, it works without any error
Please refer here : https://www.codedump.xyz/ini/ZSUvdc5O_9SUkEWi

Okay so turns out there is some kind of bug, (I haven't done much reading but I came across the same problem in these different threads and I recalled you had the same issue and I presume they are linked)
https://twitter.com/jon_durbin/status/1709147204915523929?s=20
https://huggingface.co/mistralai/Mistral-7B-v0.1/discussions/26

(Was it fixed? No idea, but maybe the above can help you pinpoint the issue)

Sign up or log in to comment