Gemma4UnifiedAssistantForCausalLM¶
Model type |
|
Class |
|
Task |
|
Source |
|
Description¶
Gemma4-Assistant speculative-decoding draft model.
See module docstring for the architecture overview and limitations.
Weight module layout (mirrors HF Gemma4AssistantForCausalLM):
self.pre_projectionLinear[2*backbone → hidden] (no bias)self.model.layers.{i}.{...}one Gemma4AssistantDecoderLayer per layerself.model.normfinal RMSNorm on hiddenself.lm_headLinear[hidden → vocab] (no bias; tied to embed_tokens upstream)self.post_projectionLinear[hidden → backbone] (no bias)
Usage¶
mobius build --model <MODEL_ID> output_dir/
from mobius import build
model = build("<MODEL_ID>")