One block of the stack. Hover any part for its nnterp name; click to pin the card. The slider picks a block; this family's blocks differ by layer_types.
One block of the stack. Hover any part for its nnterp name; click to pin the card. The slider picks a block; this family's blocks differ by layer_types.
identity mlp_combᵀ · (attention_combᵀ · layers[i].input + attention_post ⊗ self_attn.attention_output) + mlp_post ⊗ mlp.mlp_output == layer_output
What print(model) shows on deepseek-ai/DeepSeek-V4-Flash: the native modules, standard names and every standard value with its layout.
DeepseekV4ForCausalLM(
(lm_head): Linear(in_features=4096, out_features=129280, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(129280, 4096)
(layers): ModuleList(
(0-1): 2 x DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(2): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(3): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(4): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(5): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(6): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(7): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(8): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(9): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(10): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(11): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(12): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(13): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(14): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(15): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(16): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(17): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(18): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(19): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(20): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(21): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(22): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(23): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(24): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(25): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(26): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(27): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(28): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(29): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(30): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(31): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(32): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(33): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(34): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(35): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(36): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(37): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(38): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(39): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(40): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(41): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(42): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
)
(norm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)What print(model) shows on deepseek-ai/DeepSeek-V4-Flash-Base: the native modules, standard names and every standard value with its layout.
DeepseekV4ForCausalLM(
(lm_head): Linear(in_features=4096, out_features=129280, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(129280, 4096)
(layers): ModuleList(
(0-1): 2 x DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(2): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(3): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(4): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(5): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(6): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(7): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(8): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(9): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(10): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(11): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(12): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(13): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(14): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(15): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(16): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(17): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(18): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(19): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(20): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(21): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(22): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(23): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(24): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(25): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(26): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(27): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(28): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(29): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(30): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(31): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(32): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(33): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(34): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(35): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(36): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(37): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(38): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(39): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(40): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(41): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(42): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
)
(norm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)What print(model) shows on deepseek-ai/DeepSeek-V4-Flash-0731: the native modules, standard names and every standard value with its layout.
DeepseekV4ForCausalLM(
(lm_head): Linear(in_features=4096, out_features=129280, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(129280, 4096)
(layers): ModuleList(
(0-1): 2 x DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(2): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(3): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(4): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(5): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(6): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(7): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(8): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(9): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(10): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(11): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(12): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(13): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(14): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(15): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(16): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(17): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(18): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(19): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(20): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(21): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(22): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(23): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(24): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(25): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(26): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(27): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(28): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(29): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(30): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(31): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(32): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(33): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(34): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(35): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(36): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(37): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(38): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(39): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(40): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(41): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(42): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
)
(norm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)What print(model) shows on deepseek-ai/DeepSeek-V4-Flash-DSpark: the native modules, standard names and every standard value with its layout.
DeepseekV4ForCausalLM(
(lm_head): Linear(in_features=4096, out_features=129280, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(129280, 4096)
(layers): ModuleList(
(0-1): 2 x DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(2): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(3): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(4): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(5): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(6): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(7): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(8): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(9): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(10): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(11): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(12): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(13): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(14): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(15): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(16): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(17): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(18): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(19): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(20): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(21): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(22): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(23): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(24): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(25): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(26): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(27): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(28): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(29): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(30): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(31): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(32): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(33): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(34): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(35): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(36): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(37): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(38): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(39): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(40): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(41): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(42): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
)
(norm): DeepseekV4RMSNorm((4096,), eps=1e-06)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)What print(model) shows on deepseek-ai/DeepSeek-V4-Flash-Vision-Exp: the native modules, standard names and every standard value with its layout.
DeepseekV4ForCausalLM(
(lm_head): Linear(in_features=4096, out_features=129280, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(129280, 4096)
(layers): ModuleList(
(0-1): 2 x DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(2): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(3): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(4): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(5): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(6): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(7): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(8): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(9): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(10): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(11): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(12): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(13): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(14): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(15): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(16): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(17): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(18): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(19): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(20): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(21): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(22): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(23): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(24): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(25): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(26): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(27): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(28): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(29): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(30): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(31): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(32): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(33): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(34): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(35): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(36): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(37): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(38): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(39): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(40): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(41): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(gate_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(42): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=4096, out_features=1024, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1024,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=32768, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=4096, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=8192, bias=False)
(o_b_proj): Linear(in_features=8192, out_features=4096, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=4096, out_features=1024, bias=False)
(gate_proj): Linear(in_features=4096, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-20)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=4096, out_features=256, bias=False)
(gate_proj): Linear(in_features=4096, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-20)
(q_b_proj): Linear(in_features=1024, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=4096, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=4096, out_features=2048, bias=False)
(up_proj): Linear(in_features=4096, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=4096, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(post_attention_layernorm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
)
(norm): DeepseekV4RMSNorm((4096,), eps=1e-20)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)What print(model) shows on deepseek-ai/DeepSeek-V4-Pro: the native modules, standard names and every standard value with its layout.
DeepseekV4ForCausalLM(
(lm_head): Linear(in_features=7168, out_features=129280, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(129280, 7168)
(layers): ModuleList(
(0-1): 2 x DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(2): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(3): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(4): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(5): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(6): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(7): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(8): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(9): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(10): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(11): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(12): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(13): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(14): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(15): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(16): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(17): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(18): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(19): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(20): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(21): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(22): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(23): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(24): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(25): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(26): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(27): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(28): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(29): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(30): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(31): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(32): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(33): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(34): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(35): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(36): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(37): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(38): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(39): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(40): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(41): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(42): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(43): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(44): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(45): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(46): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(47): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(48): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(49): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(50): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(51): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(52): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(53): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(54): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(55): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(56): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(57): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(58): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(59): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(60): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
)
(norm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)What print(model) shows on deepseek-ai/DeepSeek-V4-Pro-Base: the native modules, standard names and every standard value with its layout.
DeepseekV4ForCausalLM(
(lm_head): Linear(in_features=7168, out_features=129280, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(129280, 7168)
(layers): ModuleList(
(0-1): 2 x DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(2): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(3): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(4): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(5): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(6): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(7): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(8): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(9): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(10): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(11): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(12): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(13): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(14): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(15): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(16): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(17): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(18): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(19): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(20): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(21): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(22): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(23): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(24): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(25): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(26): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(27): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(28): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(29): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(30): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(31): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(32): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(33): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(34): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(35): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(36): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(37): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(38): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(39): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(40): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(41): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(42): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(43): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(44): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(45): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(46): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(47): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(48): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(49): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(50): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(51): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(52): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(53): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(54): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(55): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(56): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(57): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(58): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(59): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(60): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
)
(norm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)What print(model) shows on deepseek-ai/DeepSeek-V4-Pro-0813: the native modules, standard names and every standard value with its layout.
DeepseekV4ForCausalLM(
(lm_head): Linear(in_features=7168, out_features=129280, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(129280, 7168)
(layers): ModuleList(
(0-1): 2 x DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(2): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(3): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(4): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(5): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(6): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(7): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(8): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(9): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(10): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(11): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(12): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(13): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(14): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(15): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(16): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(17): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(18): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(19): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(20): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(21): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(22): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(23): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(24): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(25): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(26): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(27): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(28): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(29): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(30): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(31): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(32): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(33): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(34): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(35): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(36): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(37): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(38): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(39): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(40): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(41): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(42): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(43): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(44): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(45): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(46): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(47): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(48): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(49): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(50): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(51): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(52): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(53): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(54): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(55): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(56): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(57): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(58): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(59): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(60): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
)
(norm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)What print(model) shows on deepseek-ai/DeepSeek-V4-Pro-DSpark: the native modules, standard names and every standard value with its layout.
DeepseekV4ForCausalLM(
(lm_head): Linear(in_features=7168, out_features=129280, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(129280, 7168)
(layers): ModuleList(
(0-1): 2 x DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(2): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4HashRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(3): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(4): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(5): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(6): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(7): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(8): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(9): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(10): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(11): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(12): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(13): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(14): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(15): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(16): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(17): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(18): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(19): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(20): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(21): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(22): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(23): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(24): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(25): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(26): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(27): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(28): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(29): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(30): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(31): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(32): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(33): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(34): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(35): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(36): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(37): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(38): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(39): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(40): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(41): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(42): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(43): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(44): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(45): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(46): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(47): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(48): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(49): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(50): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(51): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(52): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(53): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(54): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(55): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(56): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(57): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(58): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(59): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4HCACompressor(
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(gate_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
(60): DeepseekV4DecoderLayer(
(self_attn): DeepseekV4Attention(
(q_a_proj): Linear(in_features=7168, out_features=1536, bias=False)
(q_a_norm): DeepseekV4RMSNorm((1536,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=65536, bias=False)
(q_b_norm): DeepseekV4UnweightedRMSNorm()
(kv_proj): Linear(in_features=7168, out_features=512, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(o_a_proj): DeepseekV4GroupedLinear(in_features=4096, out_features=16384, bias=False)
(o_b_proj): Linear(in_features=16384, out_features=7168, bias=False)
(compressor): DeepseekV4CSACompressor(
(kv_proj): Linear(in_features=7168, out_features=1024, bias=False)
(gate_proj): Linear(in_features=7168, out_features=1024, bias=False)
(kv_norm): DeepseekV4RMSNorm((512,), eps=1e-06)
(rotary_emb): DeepseekV4RotaryEmbedding()
(indexer): DeepseekV4Indexer(
(kv_proj): Linear(in_features=7168, out_features=256, bias=False)
(gate_proj): Linear(in_features=7168, out_features=256, bias=False)
(kv_norm): DeepseekV4RMSNorm((128,), eps=1e-06)
(q_b_proj): Linear(in_features=1536, out_features=8192, bias=False)
(rotary_emb): DeepseekV4RotaryEmbedding()
(scorer): DeepseekV4IndexerScorer(
(weights_proj): Linear(in_features=7168, out_features=64, bias=False)
)
)
)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
(attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
(attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp): DeepseekV4SparseMoeBlock(
(router/gate): DeepseekV4TopKRouter(
(score_fn): SqrtSoftplusActivation()
)
(experts): DeepseekV4Experts(
(act_fn): SiLUActivation()
)
(shared_experts): DeepseekV4MLP(
(gate_proj): Linear(in_features=7168, out_features=3072, bias=False)
(up_proj): Linear(in_features=7168, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=7168, bias=False)
(act_fn): SiLUActivation()
)
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(post_attention_layernorm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(attn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(ffn_hc): DeepseekV4HyperConnection(
(input_norm): DeepseekV4UnweightedRMSNorm()
)
(layer_mid): Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet
(layer_input) -> Streams [batch seq streams hidden_size]: The residual streams entering the block
(layer_output) -> Streams [batch seq streams hidden_size]: The residual streams leaving the block
(attention_post) -> StreamWeights [batch seq streams]: How much of the attention's output each stream receives
(attention_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the attention, applied transposed
(mlp_post) -> StreamWeights [batch seq streams]: How much of the MLP's output each stream receives
(mlp_comb) -> StreamMixing [batch seq streams streams]: The matrix mixing the streams around the MLP, applied transposed
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
)
)
(norm): DeepseekV4RMSNorm((7168,), eps=1e-06)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)post_a, comb_a, xa = attn_hc(x) # x: [batch, seq, 4, hidden_size]
h = comb_aᵀ · x + post_a ⊗ self_attn(input_layernorm(xa))
post_f, comb_f, xf = ffn_hc(h)
out = comb_fᵀ · h + post_f ⊗ mlp(post_attention_layernorm(xf))
Code written for a rank-3 residual runs on layer_output without an error and gives one answer per
stream. Index one stream or take the stream mean. Averaged over the streams the block is a sum, each
contribution weighted by the mean of its post. A vector added to every stream reaches the next
sublayer scaled by the sum of that sublayer's collapse weights, so a steering coefficient tuned on
another family does not carry over.
hc_headThe model sums the last block's streams with model.hc_head, each weighted by its content, before
norm and lm_head. project_on_vocab does the same on a four-stream tensor, so the lens on the
last block equals logits. Given one stream or a contribution it skips hc_head, and that lens is
not logits.
The attention passes one tensor as both its keys and its values, so an in-place edit of
attention_keys edits attention_values too. Assign a new tensor to edit one alone.
On a compressed_sparse_attention or heavily_compressed_attention block, compressed entries
follow the token keys, so the key axis of attention_keys, attention_scores and
attention_probabilities is seq + seq // rate long.
Blocks 0 to 2 pick experts from a table of the token ids, so a patch of layer_output from another
run at block 0 or 1 leaves the hash blocks after it routing by this run's ids. On every block
expert_weights sum to routed_scaling_factor.
DeepSeek-V4 (DeepseekV4ForCausalLM): a hyper-connection residual, compressed attention, all-MoE.
model.{embed_tokens, layers[i].{attn_hc, input_layernorm, self_attn, ffn_hc, post_attention_layernorm, mlp}, hc_head, norm} and lm_head.
The residual is hc_mult parallel streams, [batch, seq, streams, hidden_size],
between every pair of blocks (the model copies the embedding into each stream
before block 0). Each sublayer reads one collapse of the streams and writes back
into all of them through a hyper-connection (attn_hc before the attention,
ffn_hc before the MLP), which returns (post, comb, collapsed):
collapsed is the pre-weighted sum of the streams that the sublayer's norm
reads, post [batch, seq, streams] how much of the sublayer's output each
stream receives, comb [batch, seq, streams, streams] a doubly stochastic
matrix mixing the streams, consumed transposed. The block, per token::
h = attention_combᵀ · x + attention_post ⊗ self_attn(input_layernorm(collapsed_a))
out = mlp_combᵀ · h + mlp_post ⊗ mlp(post_attention_layernorm(collapsed_f))
layer_output is the block's own stream tensor, under the Streams
layout, and so is layers[i].input; writes land natively, and
skip_layers and steer work unchanged (a [hidden_size] steering vector
broadcasts over the streams). layer_mid, h above, is not mapped.attention_norm_output is input_layernorm(collapsed_a),
mlp_norm_output and mlp_input are post_attention_layernorm(collapsed_f),
[batch, seq, hidden_size].[batch, seq, hidden_size],
unscaled: attention_output is self_attn.output[0], mlp_output the
mixture's return (routed plus shared experts). The weights that put them into
the streams are the block's attention_post, attention_comb,
mlp_post and mlp_comb, read off the hyper-connections' outputs. The
identity is the block's formula above, not a sum; its stream mean is additive
(comb is doubly stochastic) up to the Sinkhorn projection's residual, about
2e-6 relative in float32:
layer_output.mean(2) == input.mean(2) + attention_post.mean(-1, keepdim=True) * attention_output + mlp_post.mean(-1, keepdim=True) * mlp_output.norm(hc_head(streams)),
hc_head a learned, content-dependent weighting. The family's
project_on_vocab does the same, so the lens on the last block is
logits exactly.The attention runs the shared interface, with a per-head sink (s_aux), so
the scores are GPT-OSS's binding. It is multi-query (one key/value head), and
the keys and values are one tensor: the same object is passed as both, so an
in-place edit of one edits the other. On a compressed block
(compressed_sparse_attention, heavily_compressed_attention) the
compressor's entries are concatenated after the token keys once the prompt is
compress_rates[type] tokens long, so the key axis is longer than the
sequence there. The interface's output keeps a rotation on its rotary slice
(the values are the rotated keys); the module rotates it back before the grouped
output projection, and attention_head_outputs is that de-rotated tensor, what
the projection reads (attention_premix is the projection's input, the same
numbers). Not latent attention: the plain root sizes hold.
Every MLP is a mixture (DeepseekV4SparseMoeBlock, a Moe; its router, gate,
is aliased router); on the hash_moe blocks the router picks experts from the
token ids (tid2eid[input_ids]), so a run needs input_ids. There the logits only
weight the experts the ids chose: writing router_logits changes expert_weights,
not expert_indices.