vllm.model_executor.models.gemma3n
¶
Classes:
-
Gemma3nAltUp–Alternating updates (Altup)
-
Gemma3nCrossDecoder–Cross-decoder layers.
-
Gemma3nLaurelBlock–Learned Augmented Residual Layer.
-
Gemma3nSelfDecoder–Includes altup embedding and self decoder layers.
Gemma3nAltUp
¶
Bases: Module
Alternating updates (Altup)
The AltUp module wraps transformer layers. The predict step modifies the
input to the transformer layer, and the correct step propagates the output
of the transformer layer to the sparsely updated dimensions.
See more in the research paper:
https://proceedings.neurips.cc/paper_files/paper/2023/file/f2059277ac6ce66e7e5543001afa8bb5-Paper-Conference.pdf
_kv_sharing_weights_mapper(config)
¶
KV-shared layers only have q_proj, so qkv_proj packing applies to the other layers. Original checkpoints still ship K/V tensors for the shared layers (fine-tuned ones omit them); those are dropped.