Gate features
×Features that drive the SiLU branch.
- shape
- [B batch, T positions, 18432 d_ff]
Sources
Contextual evidence from Gate projection
The dense feed-forward network is a SwiGLU MLP: down(silu(gate x) ⊙ up x).
modeling_deepseek.py 386–409 ↗ · moonshotai/Kimi-K2.6 @ 7eb5002f6aad
Excerpt
class DeepseekV3MLP(nn.Module):
def __init__(self, config, hidden_size=None, intermediate_size=None):
super().__init__()
self.config = config
self.hidden_size = config.hidden_size if hidden_size is None else hidden_size
self.intermediate_size = (config.intermediate_size if intermediate_size
is None else intermediate_size)
self.gate_proj = nn.Linear(self.hidden_size,
self.intermediate_size,
bias=False)
self.up_proj = nn.Linear(self.hidden_size,
self.intermediate_size,
bias=False)
self.down_proj = nn.Linear(self.intermediate_size,
self.hidden_size,
bias=False)
self.act_fn = ACT2FN[config.hidden_act]
def forward(self, x):
down_proj = self.down_proj(
self.act_fn(self.gate_proj(x)) * self.up_proj(x))
return down_projThe checkpoint stores the routed experts’ linear weights as 4-bit integers (compressed-tensors, pack-quantized), symmetric, with one scale per group of 32 weights; attention, the shared experts, the dense MLP, the output head, the vision tower and the projector are left out of quantization.
config.json 95–129 ↗ · moonshotai/Kimi-K2.6 @ 7eb5002f6aad
Excerpt
"quantization_config": {
"config_groups": {
"group_0": {
"input_activations": null,
"output_activations": null,
"targets": [
"Linear"
],
"weights": {
"actorder": null,
"block_structure": null,
"dynamic": false,
"group_size": 32,
"num_bits": 4,
"observer": "minmax",
"observer_kwargs": {},
"strategy": "group",
"symmetric": true,
"type": "int"
}
}
},
"format": "pack-quantized",
"ignore": [
"re:.*self_attn.*",
"re:.*shared_experts.*",
"re:.*mlp\\.(gate|up|gate_up|down)_proj.*",
"re:.*lm_head.*",
"re:vision_tower.*",
"re:mm_projector.*"
],
"kv_cache_scheme": null,
"quant_method": "compressed-tensors",
"quantization_status": "compressed"
},