Vision-CAIR / MiniGPT-4

Open-sourced codes for MiniGPT-4 and MiniGPT-v2 (https://minigpt-4.github.io, https://minigpt-v2.github.io/)
https://minigpt-4.github.io
BSD 3-Clause "New" or "Revised" License
25.45k stars 2.92k forks source link

which padding_side does minigptv2 used? #412

Open gd2016229035 opened 1 year ago

gd2016229035 commented 1 year ago

I see in the code that in many places, self.llama_tokenizer.padding_side is set to "right,"(https://github.com/Vision-CAIR/MiniGPT-4/blob/23671f986135de7947117e0e1a514eeb6b67bea2/minigpt4/models/minigpt_base.py#L251) but in the model.generate function, it seems to be set as "left padding_side."(https://github.com/Vision-CAIR/MiniGPT-4/blob/23671f986135de7947117e0e1a514eeb6b67bea2/minigpt4/models/minigpt_base.py#L354) If I'm not mistaken, could you please explain the reason? thank you~

pengzhansun commented 1 month ago

I am also confused about this padding, @gd2016229035 , it would be much appreciated if you can help to clarify this!