Repository navigation
Conversation
justsml
marked this pull request as ready for review
October 25, 2026 17:36
This was referenced Oct 21, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds beam generation for Llava, Idefics3/SmolVLM, Qwen2VL images, and Ultravox audio. Depends on #1539; this draft targets
mainuntil the beam-search foundation merges.Image/audio features are prepared once per original input before beam expansion. Generation preserves each model's position and cache axes, supports caller-prepared embeddings and cache continuation, and releases internally owned tensors on success and failure. Unsupported model/modality combinations and ambiguous cached-image inputs fail explicitly.
The Qwen image-processor change belongs to #1812 and is not included here. Multi-image generation accepts correctly preprocessed patch tensors and image grids; raw multi-image processing still requires that fix. Ultravox batching requires equal audio feature counts.
Validation:
AMD validation remains incomplete. fp16 batched/individual outputs can diverge for SmolVLM and Ultravox, and some CUDA operators fall back to CPU; this PR does not claim universal precision or backend parity.
Changes specific to this follow-up.
Related PRs:
Related issues:
num_return_sequencesnot working #1007 — multiple returned sequences are supplied by the foundation (feat: add beam search, diverse beam search, and beam sampling to generate() #1539); this follow-up extends beam generation to the supported vision/audio models.generate()with an externalpast_key_valuescalls the vision encoder #1802 — possibly related Qwen VL external-cache/modality-input handling. This PR tests Qwen2VL cache continuation, but does not establish a fix for the reported Qwen3.5 text-only reproduction.