Skip to content

Conversation

@YushunXiang
Copy link

When I was fine-tuning the model, the bug happened. The file finetune/data_mix.py, line 137, in get_item. The dictionary sample has the key image. But in the huggingface model, for example, the file internlm-xcomposer-vl-7b/modeling_InternLM_XComposer.py, line 381, in forward. has_img = 'images' in samples.keys() will never have the key named images. So we should change it to has_img = 'image' in samples.keys().
image
image

After change:
image

@YushunXiang
Copy link
Author

Actually, I think chage has_img = 'images' in samples.keys() to has_img = samples['data_type'] == 'multi' is better and more elegant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants