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

Support llama3.2vl(WIP). #5555

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

marko1616
Copy link
Contributor

@marko1616 marko1616 commented Sep 26, 2024

๐Ÿš€ What does this PR do?

Support Llama-3.2-11B-Vision.

โœ… Before submitting

๐Ÿ”— Linked issues

#5549

โš ๏ธ IMPORTANT

bitsandbytes 8 bits quantization is not functional. 4 bits is okay but not 8 bits.

images = [Image.open(image) if isinstance(image, str) else image for image in images]
image_features = processor.image_processor(images)
_ = image_features.pop("num_tiles")
image_features = {k: v if isinstance(v, torch.Tensor) else torch.tensor(v) for k, v in image_features.items()}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@marko1616 marko1616 Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is because we can't get text at get_mm_inputs how do you think to fix this? Like add a new stage or add text input to get_mm_inputs.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, we should do some work here

src/llamafactory/data/template.py Outdated Show resolved Hide resolved
src/llamafactory/data/mm_plugin.py Outdated Show resolved Hide resolved
@marko1616 marko1616 changed the title Support llama3.2vl. Support llama3.2vl(WIP). Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending This problem is yet to be addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants