Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug in the huggingface model #125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

None yet

2 participants