Repository navigation
Conversation
* Why? Multimodal execution contracts need a shared home that both model implementations and the executor can reference consistently. * What? Relocate the mixin, encoder groups, cache contracts and prefetch helpers to _torch/multimodal. Migrate model, executor and test imports while preserving behavior, and assign shared runtime ownership. Signed-off-by: William Zhang <133824995+2ez4bz@users.noreply.github.com>
* Why? The Qwen V2 vision path repeats encoder work across prefill chunks and bypasses the shared encoder cache and prefetch contracts. * What? Expose active encoder-row preparation independently of token fusion and use it directly from the V2 decoder shell. Keep the target vision ops, token splice and speculative hooks, with explicit item partitions and stream-local attention scratch. Preserve legacy import compatibility. Leave item scheduling disabled until its maximum profiling image fits the target-certified per-frame patch bound. Signed-off-by: William Zhang <133824995+2ez4bz@users.noreply.github.com>
* Why? Modeling V2 targets run their own decoder, but MultimodalModelMixin also carried the composite-model delegation to a separate language model. Integrated targets had to shadow that delegation to avoid recursion, and nothing required a target of a multimodal checkpoint to use the shared runtime at all. * What? Split MultimodalRuntimeMixin, the executor capability contract and encoder runtime, from MultimodalModelMixin, which keeps the composite delegation, forward and default fusion. Executor gates use the runtime base. Pair active encoder rows with the executor's placeholder positions in prepare_multimodal_embeddings. Add model-side declarations for the largest encoder item, concurrent-stream encoding (required for side-stream prefetch) and breakable prefill CUDA graph support, and apply the item bound in encoder memory profiling and item scheduling. Require every Modeling V2 target of a checkpoint whose input processor accepts media to inherit MultimodalRuntimeMixin or the new TextOnlyTarget marker; check it at route resolution and, for routed targets, in a CPU source test. Check the declared embedding layout on constructed runtime models. Mark the text-only Kimi K3 VL and MiniMax M3 targets, and move the Qwen3.8 Flash Next target onto the runtime base. Signed-off-by: William Zhang <133824995+2ez4bz@users.noreply.github.com>
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.
@coderabbitai summary
Description
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.