Skip to content

Commit e66af51

Browse files
committed
gemma3n lora
Signed-off-by: NickLucche <[email protected]>
1 parent 0ad9951 commit e66af51

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/models/supported_models.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ th {
365365
| `GemmaForCausalLM` | Gemma | `google/gemma-2b`, `google/gemma-1.1-2b-it`, etc. | ✅︎ | ✅︎ | ✅︎ |
366366
| `Gemma2ForCausalLM` | Gemma 2 | `google/gemma-2-9b`, `google/gemma-2-27b`, etc. | ✅︎ | ✅︎ | ✅︎ |
367367
| `Gemma3ForCausalLM` | Gemma 3 | `google/gemma-3-1b-it`, etc. | ✅︎ | ✅︎ | ✅︎ |
368-
| `Gemma3nForCausalLM` | Gemma 3n | `google/gemma-3n-E2B-it`, `google/gemma-3n-E4B-it`, etc. | | | ✅︎ |
368+
| `Gemma3nForCausalLM` | Gemma 3n | `google/gemma-3n-E2B-it`, `google/gemma-3n-E4B-it`, etc. | ✅︎ | | ✅︎ |
369369
| `GlmForCausalLM` | GLM-4 | `zai-org/glm-4-9b-chat-hf`, etc. | ✅︎ | ✅︎ | ✅︎ |
370370
| `Glm4ForCausalLM` | GLM-4-0414 | `zai-org/GLM-4-32B-0414`, etc. | ✅︎ | ✅︎ | ✅︎ |
371371
| `Glm4MoeForCausalLM` | GLM-4.5, GLM-4.6 | `zai-org/GLM-4.5`, etc. | ✅︎ | ✅︎ | ✅︎ |
@@ -670,7 +670,7 @@ These models primarily accept the [`LLM.generate`](./generative_models.md#llmgen
670670
| `Ernie4_5_VLMoeForConditionalGeneration` | Ernie4.5-VL | T + I<sup>+</sup>/ V<sup>+</sup> | `baidu/ERNIE-4.5-VL-28B-A3B-PT`, `baidu/ERNIE-4.5-VL-424B-A47B-PT` | | ✅︎ | ✅︎ |
671671
| `FuyuForCausalLM` | Fuyu | T + I | `adept/fuyu-8b`, etc. | | ✅︎ | ✅︎ |
672672
| `Gemma3ForConditionalGeneration` | Gemma 3 | T + I<sup>+</sup> | `google/gemma-3-4b-it`, `google/gemma-3-27b-it`, etc. | ✅︎ | ✅︎ | ⚠️ |
673-
| `Gemma3nForConditionalGeneration` | Gemma 3n | T + I + A | `google/gemma-3n-E2B-it`, `google/gemma-3n-E4B-it`, etc. | | | ✅︎ |
673+
| `Gemma3nForConditionalGeneration` | Gemma 3n | T + I + A | `google/gemma-3n-E2B-it`, `google/gemma-3n-E4B-it`, etc. | ✅︎ | | ✅︎ |
674674
| `GLM4VForCausalLM`<sup>^</sup> | GLM-4V | T + I | `zai-org/glm-4v-9b`, `zai-org/cogagent-9b-20241220`, etc. | ✅︎ | ✅︎ | ✅︎ |
675675
| `Glm4vForConditionalGeneration` | GLM-4.1V-Thinking | T + I<sup>E+</sup> + V<sup>E+</sup> | `zai-org/GLM-4.1V-9B-Thinking`, etc. | ✅︎ | ✅︎ | ✅︎ |
676676
| `Glm4vMoeForConditionalGeneration` | GLM-4.5V | T + I<sup>E+</sup> + V<sup>E+</sup> | `zai-org/GLM-4.5V`, etc. | ✅︎ | ✅︎ | ✅︎ |

vllm/model_executor/models/gemma3n_mm.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import torch
88
# yapf: disable
99
from torch import nn
10+
1011
from transformers import AutoModel, BatchFeature
1112
from transformers.models.gemma3n import (Gemma3nAudioConfig,
1213
Gemma3nAudioFeatureExtractor,
@@ -43,7 +44,7 @@
4344
from vllm.sequence import IntermediateTensors
4445
from vllm.utils.tensor_schema import TensorSchema, TensorShape
4546

46-
from .interfaces import (MultiModalEmbeddings, SupportsMultiModal,
47+
from .interfaces import (MultiModalEmbeddings, SupportsLoRA, SupportsMultiModal,
4748
SupportsTranscription)
4849
from .utils import (AutoWeightsLoader, WeightsMapper, flatten_bn,
4950
init_vllm_registered_model, maybe_prefix)
@@ -433,7 +434,7 @@ def forward(
433434
info=Gemma3nProcessingInfo,
434435
dummy_inputs=Gemma3nDummyInputsBuilder)
435436
class Gemma3nForConditionalGeneration(nn.Module, SupportsMultiModal,
436-
SupportsTranscription):
437+
SupportsTranscription, SupportsLoRA):
437438
merge_by_field_config = True
438439
supported_languages = ISO639_1_SUPPORTED_LANGS
439440

0 commit comments

Comments
 (0)