vllm.models.deepseek_v4.amd.model ¶
Classes:
DeepseekV4ForCausalLM ¶
Bases: Module, SupportsPP, SupportsEagle3
Methods:
-
get_mtp_target_hidden_states–Pre-hc_head residual stream buffer (max_num_batched_tokens,
Source code in vllm/models/deepseek_v4/amd/model.py
get_mtp_target_hidden_states() ¶
Pre-hc_head residual stream buffer (max_num_batched_tokens, hc_mult * hidden_size) for the MTP draft model. Populated by forward(); valid after each target step.
Source code in vllm/models/deepseek_v4/amd/model.py
_fuse_shared_experts_enabled(config, prefix='') ¶
Whether to fuse the shared expert into the routed MXFP4 grouped GEMM.
Fusion fuses the shared expert into the routed experts' MXFP4 grouped GEMM, so it only applies where the shared expert is the same precision as the routed experts. Some layers may carry a shared expert in a different quantization than the routed experts; when so, it runs as its own linear and must not be fused.
Source code in vllm/models/deepseek_v4/amd/model.py
_shared_experts_are_fp4(config, layer_idx=None) ¶
Whether the shared experts are MXFP4 and thus fusable.
layer_idx=None resolves the model-wide default (global scheme), used by the main-model weight loader / mapper callers that operate per-model.