gemma3_text¶
gemma3_text
¶
Gemma 3 (text) on vLLM (vllm.model_executor.models.gemma3).
Llama's names and a fused block, with Gemma's sandwich norms: what the block
adds is each sublayer's post norm's output, not the module's, as on
transformers, so the contributions point at the sibling norms. The attention
norms its queries and keys. The sqrt(hidden_size) scaling of the
embeddings is applied by the model after embed_tokens, not inside it as
on transformers, so token_embeddings is the unscaled lookup and
layers[0].layer_input the scaled stream.
RENAME
module-attribute
¶
ENVOYS
module-attribute
¶
ENVOYS = {Gemma3DecoderLayer: Layer, Gemma3Attention: Attention, Gemma3MLP: Mlp}
Layer
¶
Bases: FusedLayer
Gemma-3's decoder block: forward(positions, hidden_states, residual) -> (hidden_states, residual).