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

[Llama3.2-11b-vision] Add support for text-only inference through generator api #17105

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

Conversation

skhorasganiTT
Copy link
Contributor

Ticket

tenstorrent/vllm#53

Problem description

  • Llama3.2-11b-vision did not support text-only prompts

What's changed

  • Added support for text-only prompts in prefill by propagating text_only_inference to the cross attention transformer to skip cross attention layers entirely (possible since prefill is done with 1 user at a time)
  • Added support for text-only prompts in decode by enabling the use of the full_text_mask in the TtLlamaCrossAttentionTransformerBlock::forward and propagating the full_text_mask_expand_11SD input
  • Added a test to simple_vision_demo.py for processing a batch with mixed text-only and text-image prompts
  • Deleted unused forward function in llama_vision_model.py
  • (unrelated to changes above) updated old decode pcc in test_llama_cross_attention_transformer_text.py

Checklist

  • Post commit CI passes
  • Blackhole Post commit (if applicable)
  • Model regression CI testing passes (if applicable)
  • Device performance regression CI testing passes (if applicable)
  • (For models and ops writers) Full new models tests passes
  • New/Existing tests provide coverage for changes

@skhorasganiTT skhorasganiTT marked this pull request as ready for review January 25, 2025 00:07
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