vllm.model_executor.models.muse_glimmer
¶
Inference-only MuseGlimmer multimodal model for vLLM.
Native port of the MuseGlimmer text decoder (MuseGlimmerForCausalLM). The text
stack is a Gemma2 derivative with the
following MuseGlimmer-specific deltas, each of which is handled explicitly here:
- SiLU-gated MLP (
hidden_activation="silu"), not Gemma's gelu-tanh. - Scaleless RMSNorm on the token embeddings (no sqrt(hidden) scaling).
- Per-layer sandwich RMSNorms with a baked
+1weight offset (x * (1 + w)), matching Gemma, but with distinct eps for the pre/post norms (rms_norm_epsvspost_norm_eps). - QK-norm (weightless, fp32) applied before RoPE, followed by a query
pre-scale of
qk_scale_factor / sqrt(head_dim). - A per-head sigmoid attention output gate.
- iRoPE layout: NoPE layers use full attention, RoPE layers use sliding
window attention. RoPE is applied NEOX-style (
is_neox_style=True): the HF converter (convert_muse_glimmer_weights_to_hf.py, 20260806+) permutes q/k into the half-split (NEOX) layout via_permute_for_ropeso they pair withrotate_half— matching the reference's interleaved rotation on the native (unpermuted) weights. Serving the permuted HF weights withis_neox_style=Falsescrambles q/k and causes token-repetition collapse. - Final logits are pre-scaled by
output_multiplierand then tanh soft-capped atfinal_logit_softcapping. - Untied lm_head.
The vision path supports variable-resolution images and temporally patched videos. It mirrors the checkpoint's native vision encoder, including sparse block attention, 2-D RoPE, pixel-shuffle downsampling, and the two-layer adapter/projection stack.
Classes:
-
MuseGlimmerForCausalLM– -
MuseGlimmerImagePixelInputs–Dimensions:
-
MuseGlimmerVideoPixelInputs–Dimensions:
MuseGlimmerForCausalLM
¶
Bases: Module, SupportsLoRA, SupportsMultiModal, SupportsPP, SupportsEagle3
Methods:
-
get_mm_mapping–Get the module prefix in multimodal models
get_mm_mapping()
¶
Get the module prefix in multimodal models
MuseGlimmerImagePixelInputs
¶
Bases: TensorSchema
Dimensions: - np: Total number of patches over all images - cps: Temporal patch size * channels * patch size * patch size - ni: Number of images
MuseGlimmerVideoPixelInputs
¶
Bases: TensorSchema
Dimensions: - np: Total number of patches over all videos - ctps: Temporal patch size * channels * patch size * patch size - nv: Number of videos
_text_config(config)
¶
MuseGlimmer checkpoints may nest the text config under text_config
(multimodal MuseGlimmerConfig) or expose it directly
(MuseGlimmerTextConfig).