xtuner icon indicating copy to clipboard operation
xtuner copied to clipboard

Potential boundary error in utils.py

Open dongyang2011 opened this issue 1 year ago • 1 comments

Hi there, in the file utils.py, there might be an error involving accessing beyond the boundary on line 208 for the operation cur_inputs_embeds_no_im[i], when the IMAGE_TOKEN_INDEX is located at the end of the input_ids. Please consider to solve it.

dongyang2011 avatar Apr 10 '24 12:04 dongyang2011

The possibility indeed exists (although image tokens typically do not appear in the last one input_id, due to the prompt template).

Thank you for your feedback!

LZHgrla avatar Apr 11 '24 03:04 LZHgrla