[2/N] Harden Transformers modelling backend multi-modal path - #51657
Merged
DarkLight1337 merged 8 commits intoAug 10, 2026
Conversation
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
DarkLight1337
approved these changes
Aug 10, 2026
Member
|
/ci run |
DarkLight1337
enabled auto-merge (squash)
August 10, 2026 11:29
|
✅ Triggered Buildkite CI #83134 for commit |
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.
Continues from #51408
Added
--mm-encoder-onlyand--limit-mm-per-prompt <modality>=0now skip weights for this backend, via a_mark_model_componentshook aroundAutoModel.from_configcompile_mm_encoderwas hardcoded to the image encoderFixed
_get_prompt_updatesreturnedNoneagainst a declaredSequence[PromptUpdate]apply()skipped the placeholder/item count validation the base class performs_split_embeddingssilently padded or truncated encoder output to fit; it now warnsChanged
_embed_audio/_embed_vision->_process_audio_input/_process_image_input;embed_multimodalreturns[]get_max_image_size->get_image_size_with_most_featuresreturningImageSize_get_supported_modalities; dead_is_video_modelremovedNotes
get_decoder/get_encoderare best-efforthasattrprobes over a constructed model, with no class-level equivalent — hence the throwaway meta modelimage=0could skip a tower video needs, andsupport_torch_compilewould apply twiceget_limit_per_promptreturns 999 for unspecified ones, soall(limit == 0)would never holdTests
test_tower_weights_skipped_when_modality_disabled— nothing in the repo asserted weight skipping for any modeltest_marking_skipped_without_tokenizer