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

Image + Audio + Text input using Llama 3.2 [DO NOT MERGE] #127

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

Conversation

farzadab
Copy link
Contributor

@farzadab farzadab commented Oct 1, 2024

This PR is not in a state to be merged, but it shows how Llama 3.2 can be used to combine image, text, and audio inputs together and get the correct response.

Take a look at llama32_script.py to see how this is done:

  • llama 3.2 11B vision instruct model is loaded
  • weights from ultravox-v0_4 (trained on llama 3.1 8B) are loaded without modification
  • input consists of image and audio

Note: before using the script, a few lines in the transformers library need to be manually commented out to allow for this approach:
https://github.com/huggingface/transformers/blob/main/src/transformers/models/mllama/modeling_mllama.py#L2152-L2155
These lines don't allow you to specify inputs_embeds when vision input is present. Hopefully we can upstream this change in the future.

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.

1 participant