nnterp · encyclopedia deepseek_v4 · nnterp.families.deepseek_v4

family deepseek_v4

DeepSeek-V4

The block

01 · the residual stream

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.

embed_tokenstoken_embeddings
→
layers× 43 · 4 streams
→
hc_headstreams → one
→
normfinal_norm_output
→
lm_headlm_head_output
→
logitsthe output
i = 0

identity mlp_combᵀ · (attention_combᵀ · layers[i].input + attention_post ⊗ self_attn.attention_output) + mlp_post ⊗ mlp.mlp_output == layer_output

The API

02 · support()

Values, by host

model DeepseekV4ForCausalLMlayoutwhat it isread at
logits Logits [batch seq vocab_size] The logits the model returns, after anything it does past lm_head (a softcap, a scale)

the module's own output

token_embeddings Residual [batch seq hidden_size] The embedding module's output; layers[0].input is what enters the first block

the child module embed_tokens's output

final_norm_output Residual [batch seq hidden_size] The residual stream after the final norm, what lm_head reads

the child module norm's output

lm_head_output Logits [batch seq vocab_size] The head's logits before anything the model does past lm_head (a softcap, a scale)

the child module lm_head's output

next_token_probs NextTokenProbs [batch vocab_size] The next-token distribution at the last position; derived, read-only

the module's own output

input_ids Tokens [batch seq] The token ids the model was called with

the module's own input

attention_mask Tokens [batch seq] The attention mask the model was called with; zeros are padding

the module's own input

input_size scalar [batch, seq] of the current call; read-only

the module's own input

model.layers[i] DeepseekV4DecoderLayerlayoutwhat it isread at
layer_input Streams [batch seq streams hidden_size] The residual streams entering the block

the module's own input

attention_norm_output Residual [batch seq hidden_size] The normed stream entering the attention

the child module input_layernorm's output

layer_mid scalar Unavailable: hyper-connection streams: the sublayers read a mix of the streams, not the stream; the streams between the sublayers are not mapped for this family yet

nowhere: the family does not serve it

mlp_norm_output Residual [batch seq hidden_size] The normed stream entering the MLP

the child module post_attention_layernorm's output

mlp_input Residual [batch seq hidden_size] What the MLP is called with

the child module mlp's input

layer_output Streams [batch seq streams hidden_size] The residual streams leaving the block

the module's own output

attention_post StreamWeights [batch seq streams] How much of the attention's output each stream receives

the child module attn_hc's output, element 0

attention_comb StreamMixing [batch seq streams streams] The matrix mixing the streams around the attention, applied transposed

the child module attn_hc's output, element 1

mlp_post StreamWeights [batch seq streams] How much of the MLP's output each stream receives

the child module ffn_hc's output, element 0

mlp_comb StreamMixing [batch seq streams streams] The matrix mixing the streams around the MLP, applied transposed

the child module ffn_hc's output, element 1

model.layers[i].self_attn DeepseekV4Attentionlayoutwhat it isread at
attention_queries_prerope Queries [batch num_heads seq qk_head_dim] The queries entering the rotary embedding

inside the forward: the input of apply_rotary_pos_emb_0

attention_keys_prerope Keys [batch num_kv_heads seq qk_head_dim] The keys entering the rotary embedding

inside the forward: the input of apply_rotary_pos_emb_1

attention_queries Queries [batch num_heads seq qk_head_dim] The queries entering attention

inside the forward: the arguments of attention_interface_1, element 1

attention_keys Keys [batch num_kv_heads seq qk_head_dim] The keys entering attention

inside the forward: the arguments of attention_interface_1, element 2

attention_values Values [batch num_kv_heads seq head_dim] The values entering attention

inside the forward: the arguments of attention_interface_1, element 3

attention_scores Pattern [batch num_heads query key] The attention scores entering the softmax, masked

inside the forward: the output of attn_weights_1 inside attention_interface_1

attention_premix HeadOutputs [batch seq num_heads head_dim] Every head's output side by side, as the output projection takes it

the child module o_a_proj's input

attention_output Residual [batch seq hidden_size] What the attention adds to the residual stream

the module's own output

attention_probabilities Pattern [batch num_heads query key] The attention pattern the values are mixed with

inside the forward: the output of nn_functional_dropout_0 inside attention_interface_1

attention_head_outputs HeadOutputs [batch seq num_heads head_dim] The per-head outputs before the output projection

inside the forward: the output of attn_output_0

interface method (Queries, Keys, Values) -> (HeadOutputs, Pattern) The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments

nowhere: the queries, keys and values are not the arguments of one call in this forward that returns the head outputs (the attention does its own arithmetic, or changes the call's output before the projection), so there is no attention function to call again

model.layers[i].mlp DeepseekV4SparseMoeBlocklayoutwhat it isread at
mlp_activation Neurons [batch seq intermediate_size] The activation function's output

nowhere: routed experts; read per-expert via the Moe component

mlp_neurons Neurons [batch seq intermediate_size] What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise

nowhere: routed experts; read per-expert via the Moe component

mlp_output Residual [batch seq hidden_size] What the MLP adds to the residual stream

the module's own output

router_logits RouterLogits [batch seq num_experts] The router's logits, one per expert, before the scoring

inside router's forward: the output of F_linear_0

expert_weights ExpertWeights [batch seq top_k] The weight each selected expert's output is scaled by

the child module experts's inputs, element 2

expert_indices ExpertIndices [batch seq top_k] The expert each routing slot sends the token to

the child module experts's inputs, element 1

expert_outputs ExpertOutputs [batch seq top_k hidden_size] Each routing slot's weighted expert output

inside experts's forward: the output of weighted_out_view_0 inside experts_forward_1

routed_output Residual [batch seq hidden_size] The routed experts' combined output

the child module experts's output

shared_expert_output Residual [batch seq hidden_size] The shared expert's output

the child module shared_experts's output

Printout

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
)

Config

model.num_layers43
model.hidden_size4096
model.num_heads64
model.num_kv_heads1
model.head_dim512
model.qk_head_dim512
model.vocab_size129280
model.intermediate_size2048
architecturesDeepseekV4ForCausalLM
num_hidden_layers43
hidden_size4096
num_attention_heads64
num_key_value_heads1
head_dim512
vocab_size129280
max_position_embeddings1048576
sliding_window128
hidden_actsilu
rms_norm_eps1e-06
rope_theta10000
tie_word_embeddingsFalse
dtypebfloat16
partial_rotary_factor0.125
q_lora_rank1024
qk_rope_head_dim64
moe_intermediate_size2048
n_routed_experts256
num_experts_per_tok6
n_shared_experts1
routed_scaling_factor1.5
norm_topk_probTrue
attention_biasFalse

The Notes

03 · what to know before you run

The residual is four streams

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.

The lens goes through hc_head

The 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 keys are the values

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.

Compressed blocks have more keys than tokens

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.

A patch before block 2 does not move the hash routing

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.

From the family module

04 · nnterp/families/deepseek_v4.py

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.
  • What each sublayer is called with is one stream's width: attention_norm_output is input_layernorm(collapsed_a), mlp_norm_output and mlp_input are post_attention_layernorm(collapsed_f), [batch, seq, hidden_size].
  • The contributions are the sublayers' own outputs, [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.
  • The readout collapses the streams once more: 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.