Skip to content

Multimodality support - #2232

Closed
OnePunchMonk wants to merge 14 commits into
Lightning-AI:mainfrom
OnePunchMonk:multimodality-support
Closed

Multimodality support#2232
OnePunchMonk wants to merge 14 commits into
Lightning-AI:mainfrom
OnePunchMonk:multimodality-support

Conversation

@OnePunchMonk

@OnePunchMonk OnePunchMonk commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

closes #2173

@OnePunchMonk
OnePunchMonk force-pushed the multimodality-support branch from b2969ec to d729598 Compare April 9, 2026 19:52
@OnePunchMonk
OnePunchMonk force-pushed the multimodality-support branch from 55cc41b to 7342e26 Compare April 9, 2026 19:58
@OnePunchMonk
OnePunchMonk marked this pull request as draft April 11, 2026 05:41
@OnePunchMonk
OnePunchMonk force-pushed the multimodality-support branch from 8af9af0 to 5dd8a28 Compare April 12, 2026 10:52
…ismatched architecture

litgpt's generic VisionEncoder/MultiModalProjector don't match Gemma3's
SigLIP tower or Gemma3MultiModalProjector 1:1 (different parameter
names and shapes, e.g. mm_input_projection_weight/mm_soft_emb_norm vs
a plain nn.Linear), and none of the Gemma3 configs opt into
config.is_multimodal. Loading the vision/mm-projector weights
unconditionally broke state_dict loading for every Gemma3 checkpoint
conversion (this was causing the CI failures on this PR). Only
attempt the vision weight mapping when config.is_multimodal is set;
otherwise fall back to the previous text-only behavior.
@OnePunchMonk OnePunchMonk reopened this Aug 16, 2026
@OnePunchMonk
OnePunchMonk marked this pull request as ready for review August 16, 2026 14:36
…r on GPT subclasses

These GPT subclasses bypass GPT.__init__ (calling nn.Module.__init__
directly), so they never received the vision_encoder/mm_projector
attributes added for multimodal support. forward() unconditionally
reads self.vision_encoder, so passing pixel_values through a
LoRA/Adapter/AdapterV2 model raised AttributeError.
@OnePunchMonk OnePunchMonk mentioned this pull request Aug 17, 2026
1 task
@OnePunchMonk

Copy link
Copy Markdown
Contributor Author

Closing in favor of #2301 — this branch had gone stale against main (4 months / 14 commits behind), making it hard to review. #2301 is the same feature rebased onto current main as a single clean commit, plus a fix for a bug found while debugging a CI failure here (LoRA/Adapter/AdapterV2 GPT subclasses were missing the new vision_encoder/mm_projector attributes).

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.

Feature: Support for Multimodality

1 participant