nnterp · encyclopedia olmo_hybrid · nnterp.families.olmo_hybrid

family olmo_hybrid

OLMo-Hybrid

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, each tick's color gives its block's shape, and the diagram redraws for the block picked.

embed_tokenstoken_embeddings
→
layers× 32
→
normfinal_norm_output
→
lm_headlm_head_output
→
logitsthe output
i = 0

identity layers[i].input + linear_attn.attention_output + mlp.mlp_output == layer_output

The API

02 · support()

Values, by host

⚠︎ marks a value this checkpoint has only under some load: hover it for the condition.

model OlmoHybridForCausalLMlayoutwhat 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] OlmoHybridLinearAttentionDecoderLayerlayoutwhat it isread at
layer_input Residual [batch seq hidden_size] The residual stream entering the block

the module's own input

⚠︎attention_norm_output Residual [batch seq hidden_size] The normed stream entering the mixer

the child module input_layernorm's output

layer_mid Residual [batch seq hidden_size] The residual stream after the mixer's add

the child module post_attention_layernorm's input on blocks 0-2, 4-6, 8-10, 12-14, 16-18, 20-22, 24-26, 28-30; the child module mlp's input on blocks 3, 7, 11, 15, 19, 23, 27, 31

⚠︎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 Residual [batch seq hidden_size] The residual stream leaving the block, a tensor even when the block returns a tuple

the module's own output

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

the child module act_fn's output

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

the child module down_proj's input

mlp_output Residual [batch seq hidden_size] What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block

the module's own output on blocks 0-2, 4-6, 8-10, 12-14, 16-18, 20-22, 24-26, 28-30; the sibling module post_feedforward_layernorm's output on blocks 3, 7, 11, 15, 19, 23, 27, 31

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

nowhere: no rotary embedding: this checkpoint sets no rope_theta, so its attention uses no position encoding (NoPE)

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

nowhere: no rotary embedding: this checkpoint sets no rope_theta, so its attention uses no position encoding (NoPE)

⚠︎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 input of nn_functional_softmax_0 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_proj's input

attention_output Residual [batch seq hidden_size] What the attention adds to the residual stream: the post-attention norm's output

the sibling module post_attention_layernorm's 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 attention_interface_1, element 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

read at the arguments of attention_interface_1, with the queries, keys and values; called, the function that call ran, on the tensors given and the call's other arguments

model.layers[i].linear_attn OlmoHybridGatedDeltaNetlayoutwhat it isread at
attention_output Residual [batch seq hidden_size] What the mixer adds to the residual stream

the module's own output

⚠︎state State [batch heads key_dim value_dim] The recurrent state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')

inside the forward: at or inside the kernel this call runs (a prompt's chunked one or a decode step's recurrent one)

⚠︎states States [batch seq heads key_dim value_dim] The recurrent state after every token of this call; needs route_kernels(family, 'torch')

computed from other values read in the same call

attention_queries LinearQK [batch seq heads key_dim] The queries entering the delta rule

inside the forward: the arguments of the kernel this call runs (a prompt's chunked one or a decode step's recurrent one), element 0

attention_keys LinearQK [batch seq heads key_dim] The keys entering the delta rule

inside the forward: the arguments of the kernel this call runs (a prompt's chunked one or a decode step's recurrent one), element 1

attention_values LinearV [batch seq heads value_dim] The values entering the delta rule

inside the forward: the arguments of the kernel this call runs (a prompt's chunked one or a decode step's recurrent one), element 2

decays Gates [batch seq heads] The per-token log decay of the recurrent state

inside the forward: the arguments of the kernel this call runs (a prompt's chunked one or a decode step's recurrent one), argument g

betas Gates [batch seq heads] The per-token write strength into the state

inside the forward: the arguments of the kernel this call runs (a prompt's chunked one or a decode step's recurrent one), argument beta

state_input State | None [batch heads key_dim value_dim] The recurrent state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)

inside the forward: the arguments of the kernel this call runs (a prompt's chunked one or a decode step's recurrent one), argument initial_state

attention_head_outputs LinearV [batch seq heads value_dim] The per-head outputs before the gated norm and the output projection

inside the forward: the output of the kernel this call runs (a prompt's chunked one or a decode step's recurrent one), element 0

state_output State [batch heads key_dim value_dim] The recurrent state leaving the layer

inside the forward: the output of the kernel this call runs (a prompt's chunked one or a decode step's recurrent one), element 1

Printout

What print(model) shows on allenai/Olmo-Hybrid-7B: the native modules, standard names and every standard value with its layout.

OlmoHybridForCausalLM(
  (lm_head): Linear(in_features=3840, out_features=100352, bias=False)
  (generator): Generator(
    (streamer): Streamer()
  )
  (embed_tokens): Embedding(100352, 3840, padding_idx=100277)
  (layers): ModuleList(
    (0-2): 3 x OlmoHybridLinearAttentionDecoderLayer(
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (input_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (linear_attn): OlmoHybridGatedDeltaNet(
        (q_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (k_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (v_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (a_proj): Linear(in_features=3840, out_features=30, bias=False)
        (b_proj): Linear(in_features=3840, out_features=30, bias=False)
        (g_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (o_proj): Linear(in_features=5760, out_features=3840, bias=False)
        (conv1d): Conv1d(11520, 11520, kernel_size=(4,), stride=(1,), padding=(3,), groups=11520, bias=False)
        (o_norm): OlmoHybridRMSNormGated()
        (attention_queries) -> LinearQK [batch seq heads key_dim]: The queries entering the delta rule
        (attention_keys) -> LinearQK [batch seq heads key_dim]: The keys entering the delta rule
        (attention_values) -> LinearV [batch seq heads value_dim]: The values entering the delta rule
        (decays) -> Gates [batch seq heads]: The per-token log decay of the recurrent state
        (betas) -> Gates [batch seq heads]: The per-token write strength into the state
        (state_input) -> State | None [batch heads key_dim value_dim]: The recurrent state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
        (attention_head_outputs) -> LinearV [batch seq heads value_dim]: The per-head outputs before the gated norm and the output projection
        (state_output) -> State [batch heads key_dim value_dim]: The recurrent state leaving the layer
        (attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
        (state) -> State [batch heads key_dim value_dim]: The recurrent state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
        (states) -> States [batch seq heads key_dim value_dim]: The recurrent state after every token of this call; needs route_kernels(family, 'torch')
      )
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (3): OlmoHybridAttentionDecoderLayer(
      (self_attn): OlmoHybridAttention(
        (q_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (k_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (v_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (o_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (q_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (k_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: the post-attention norm's output
        (attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
        (attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
        (attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
        (attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
        (attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
        (attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
        (attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
        (attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
        (attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
        (interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
      )
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_feedforward_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (4-6): 3 x OlmoHybridLinearAttentionDecoderLayer(
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (input_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (linear_attn): OlmoHybridGatedDeltaNet(
        (q_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (k_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (v_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (a_proj): Linear(in_features=3840, out_features=30, bias=False)
        (b_proj): Linear(in_features=3840, out_features=30, bias=False)
        (g_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (o_proj): Linear(in_features=5760, out_features=3840, bias=False)
        (conv1d): Conv1d(11520, 11520, kernel_size=(4,), stride=(1,), padding=(3,), groups=11520, bias=False)
        (o_norm): OlmoHybridRMSNormGated()
        (attention_queries) -> LinearQK [batch seq heads key_dim]: The queries entering the delta rule
        (attention_keys) -> LinearQK [batch seq heads key_dim]: The keys entering the delta rule
        (attention_values) -> LinearV [batch seq heads value_dim]: The values entering the delta rule
        (decays) -> Gates [batch seq heads]: The per-token log decay of the recurrent state
        (betas) -> Gates [batch seq heads]: The per-token write strength into the state
        (state_input) -> State | None [batch heads key_dim value_dim]: The recurrent state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
        (attention_head_outputs) -> LinearV [batch seq heads value_dim]: The per-head outputs before the gated norm and the output projection
        (state_output) -> State [batch heads key_dim value_dim]: The recurrent state leaving the layer
        (attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
        (state) -> State [batch heads key_dim value_dim]: The recurrent state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
        (states) -> States [batch seq heads key_dim value_dim]: The recurrent state after every token of this call; needs route_kernels(family, 'torch')
      )
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (7): OlmoHybridAttentionDecoderLayer(
      (self_attn): OlmoHybridAttention(
        (q_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (k_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (v_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (o_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (q_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (k_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: the post-attention norm's output
        (attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
        (attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
        (attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
        (attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
        (attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
        (attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
        (attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
        (attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
        (attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
        (interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
      )
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_feedforward_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (8-10): 3 x OlmoHybridLinearAttentionDecoderLayer(
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (input_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (linear_attn): OlmoHybridGatedDeltaNet(
        (q_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (k_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (v_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (a_proj): Linear(in_features=3840, out_features=30, bias=False)
        (b_proj): Linear(in_features=3840, out_features=30, bias=False)
        (g_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (o_proj): Linear(in_features=5760, out_features=3840, bias=False)
        (conv1d): Conv1d(11520, 11520, kernel_size=(4,), stride=(1,), padding=(3,), groups=11520, bias=False)
        (o_norm): OlmoHybridRMSNormGated()
        (attention_queries) -> LinearQK [batch seq heads key_dim]: The queries entering the delta rule
        (attention_keys) -> LinearQK [batch seq heads key_dim]: The keys entering the delta rule
        (attention_values) -> LinearV [batch seq heads value_dim]: The values entering the delta rule
        (decays) -> Gates [batch seq heads]: The per-token log decay of the recurrent state
        (betas) -> Gates [batch seq heads]: The per-token write strength into the state
        (state_input) -> State | None [batch heads key_dim value_dim]: The recurrent state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
        (attention_head_outputs) -> LinearV [batch seq heads value_dim]: The per-head outputs before the gated norm and the output projection
        (state_output) -> State [batch heads key_dim value_dim]: The recurrent state leaving the layer
        (attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
        (state) -> State [batch heads key_dim value_dim]: The recurrent state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
        (states) -> States [batch seq heads key_dim value_dim]: The recurrent state after every token of this call; needs route_kernels(family, 'torch')
      )
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (11): OlmoHybridAttentionDecoderLayer(
      (self_attn): OlmoHybridAttention(
        (q_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (k_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (v_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (o_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (q_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (k_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: the post-attention norm's output
        (attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
        (attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
        (attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
        (attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
        (attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
        (attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
        (attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
        (attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
        (attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
        (interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
      )
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_feedforward_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (12-14): 3 x OlmoHybridLinearAttentionDecoderLayer(
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (input_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (linear_attn): OlmoHybridGatedDeltaNet(
        (q_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (k_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (v_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (a_proj): Linear(in_features=3840, out_features=30, bias=False)
        (b_proj): Linear(in_features=3840, out_features=30, bias=False)
        (g_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (o_proj): Linear(in_features=5760, out_features=3840, bias=False)
        (conv1d): Conv1d(11520, 11520, kernel_size=(4,), stride=(1,), padding=(3,), groups=11520, bias=False)
        (o_norm): OlmoHybridRMSNormGated()
        (attention_queries) -> LinearQK [batch seq heads key_dim]: The queries entering the delta rule
        (attention_keys) -> LinearQK [batch seq heads key_dim]: The keys entering the delta rule
        (attention_values) -> LinearV [batch seq heads value_dim]: The values entering the delta rule
        (decays) -> Gates [batch seq heads]: The per-token log decay of the recurrent state
        (betas) -> Gates [batch seq heads]: The per-token write strength into the state
        (state_input) -> State | None [batch heads key_dim value_dim]: The recurrent state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
        (attention_head_outputs) -> LinearV [batch seq heads value_dim]: The per-head outputs before the gated norm and the output projection
        (state_output) -> State [batch heads key_dim value_dim]: The recurrent state leaving the layer
        (attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
        (state) -> State [batch heads key_dim value_dim]: The recurrent state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
        (states) -> States [batch seq heads key_dim value_dim]: The recurrent state after every token of this call; needs route_kernels(family, 'torch')
      )
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (15): OlmoHybridAttentionDecoderLayer(
      (self_attn): OlmoHybridAttention(
        (q_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (k_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (v_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (o_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (q_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (k_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: the post-attention norm's output
        (attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
        (attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
        (attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
        (attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
        (attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
        (attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
        (attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
        (attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
        (attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
        (interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
      )
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_feedforward_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (16-18): 3 x OlmoHybridLinearAttentionDecoderLayer(
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (input_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (linear_attn): OlmoHybridGatedDeltaNet(
        (q_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (k_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (v_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (a_proj): Linear(in_features=3840, out_features=30, bias=False)
        (b_proj): Linear(in_features=3840, out_features=30, bias=False)
        (g_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (o_proj): Linear(in_features=5760, out_features=3840, bias=False)
        (conv1d): Conv1d(11520, 11520, kernel_size=(4,), stride=(1,), padding=(3,), groups=11520, bias=False)
        (o_norm): OlmoHybridRMSNormGated()
        (attention_queries) -> LinearQK [batch seq heads key_dim]: The queries entering the delta rule
        (attention_keys) -> LinearQK [batch seq heads key_dim]: The keys entering the delta rule
        (attention_values) -> LinearV [batch seq heads value_dim]: The values entering the delta rule
        (decays) -> Gates [batch seq heads]: The per-token log decay of the recurrent state
        (betas) -> Gates [batch seq heads]: The per-token write strength into the state
        (state_input) -> State | None [batch heads key_dim value_dim]: The recurrent state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
        (attention_head_outputs) -> LinearV [batch seq heads value_dim]: The per-head outputs before the gated norm and the output projection
        (state_output) -> State [batch heads key_dim value_dim]: The recurrent state leaving the layer
        (attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
        (state) -> State [batch heads key_dim value_dim]: The recurrent state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
        (states) -> States [batch seq heads key_dim value_dim]: The recurrent state after every token of this call; needs route_kernels(family, 'torch')
      )
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (19): OlmoHybridAttentionDecoderLayer(
      (self_attn): OlmoHybridAttention(
        (q_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (k_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (v_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (o_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (q_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (k_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: the post-attention norm's output
        (attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
        (attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
        (attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
        (attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
        (attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
        (attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
        (attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
        (attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
        (attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
        (interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
      )
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_feedforward_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (20-22): 3 x OlmoHybridLinearAttentionDecoderLayer(
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (input_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (linear_attn): OlmoHybridGatedDeltaNet(
        (q_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (k_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (v_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (a_proj): Linear(in_features=3840, out_features=30, bias=False)
        (b_proj): Linear(in_features=3840, out_features=30, bias=False)
        (g_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (o_proj): Linear(in_features=5760, out_features=3840, bias=False)
        (conv1d): Conv1d(11520, 11520, kernel_size=(4,), stride=(1,), padding=(3,), groups=11520, bias=False)
        (o_norm): OlmoHybridRMSNormGated()
        (attention_queries) -> LinearQK [batch seq heads key_dim]: The queries entering the delta rule
        (attention_keys) -> LinearQK [batch seq heads key_dim]: The keys entering the delta rule
        (attention_values) -> LinearV [batch seq heads value_dim]: The values entering the delta rule
        (decays) -> Gates [batch seq heads]: The per-token log decay of the recurrent state
        (betas) -> Gates [batch seq heads]: The per-token write strength into the state
        (state_input) -> State | None [batch heads key_dim value_dim]: The recurrent state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
        (attention_head_outputs) -> LinearV [batch seq heads value_dim]: The per-head outputs before the gated norm and the output projection
        (state_output) -> State [batch heads key_dim value_dim]: The recurrent state leaving the layer
        (attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
        (state) -> State [batch heads key_dim value_dim]: The recurrent state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
        (states) -> States [batch seq heads key_dim value_dim]: The recurrent state after every token of this call; needs route_kernels(family, 'torch')
      )
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (23): OlmoHybridAttentionDecoderLayer(
      (self_attn): OlmoHybridAttention(
        (q_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (k_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (v_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (o_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (q_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (k_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: the post-attention norm's output
        (attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
        (attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
        (attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
        (attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
        (attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
        (attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
        (attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
        (attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
        (attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
        (interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
      )
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_feedforward_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (24-26): 3 x OlmoHybridLinearAttentionDecoderLayer(
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (input_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (linear_attn): OlmoHybridGatedDeltaNet(
        (q_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (k_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (v_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (a_proj): Linear(in_features=3840, out_features=30, bias=False)
        (b_proj): Linear(in_features=3840, out_features=30, bias=False)
        (g_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (o_proj): Linear(in_features=5760, out_features=3840, bias=False)
        (conv1d): Conv1d(11520, 11520, kernel_size=(4,), stride=(1,), padding=(3,), groups=11520, bias=False)
        (o_norm): OlmoHybridRMSNormGated()
        (attention_queries) -> LinearQK [batch seq heads key_dim]: The queries entering the delta rule
        (attention_keys) -> LinearQK [batch seq heads key_dim]: The keys entering the delta rule
        (attention_values) -> LinearV [batch seq heads value_dim]: The values entering the delta rule
        (decays) -> Gates [batch seq heads]: The per-token log decay of the recurrent state
        (betas) -> Gates [batch seq heads]: The per-token write strength into the state
        (state_input) -> State | None [batch heads key_dim value_dim]: The recurrent state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
        (attention_head_outputs) -> LinearV [batch seq heads value_dim]: The per-head outputs before the gated norm and the output projection
        (state_output) -> State [batch heads key_dim value_dim]: The recurrent state leaving the layer
        (attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
        (state) -> State [batch heads key_dim value_dim]: The recurrent state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
        (states) -> States [batch seq heads key_dim value_dim]: The recurrent state after every token of this call; needs route_kernels(family, 'torch')
      )
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (27): OlmoHybridAttentionDecoderLayer(
      (self_attn): OlmoHybridAttention(
        (q_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (k_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (v_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (o_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (q_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (k_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: the post-attention norm's output
        (attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
        (attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
        (attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
        (attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
        (attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
        (attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
        (attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
        (attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
        (attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
        (interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
      )
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_feedforward_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (28-30): 3 x OlmoHybridLinearAttentionDecoderLayer(
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (input_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (linear_attn): OlmoHybridGatedDeltaNet(
        (q_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (k_proj): Linear(in_features=3840, out_features=2880, bias=False)
        (v_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (a_proj): Linear(in_features=3840, out_features=30, bias=False)
        (b_proj): Linear(in_features=3840, out_features=30, bias=False)
        (g_proj): Linear(in_features=3840, out_features=5760, bias=False)
        (o_proj): Linear(in_features=5760, out_features=3840, bias=False)
        (conv1d): Conv1d(11520, 11520, kernel_size=(4,), stride=(1,), padding=(3,), groups=11520, bias=False)
        (o_norm): OlmoHybridRMSNormGated()
        (attention_queries) -> LinearQK [batch seq heads key_dim]: The queries entering the delta rule
        (attention_keys) -> LinearQK [batch seq heads key_dim]: The keys entering the delta rule
        (attention_values) -> LinearV [batch seq heads value_dim]: The values entering the delta rule
        (decays) -> Gates [batch seq heads]: The per-token log decay of the recurrent state
        (betas) -> Gates [batch seq heads]: The per-token write strength into the state
        (state_input) -> State | None [batch heads key_dim value_dim]: The recurrent state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
        (attention_head_outputs) -> LinearV [batch seq heads value_dim]: The per-head outputs before the gated norm and the output projection
        (state_output) -> State [batch heads key_dim value_dim]: The recurrent state leaving the layer
        (attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
        (state) -> State [batch heads key_dim value_dim]: The recurrent state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
        (states) -> States [batch seq heads key_dim value_dim]: The recurrent state after every token of this call; needs route_kernels(family, 'torch')
      )
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
    (31): OlmoHybridAttentionDecoderLayer(
      (self_attn): OlmoHybridAttention(
        (q_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (k_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (v_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (o_proj): Linear(in_features=3840, out_features=3840, bias=False)
        (q_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (k_norm): OlmoHybridRMSNorm((3840,), eps=1e-06)
        (attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: the post-attention norm's output
        (attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
        (attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
        (attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
        (attention_keys) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering attention
        (attention_values) -> Values [batch num_kv_heads seq head_dim]: The values entering attention
        (attention_scores) -> Pattern [batch num_heads query key]: The attention scores entering the softmax, masked
        (attention_premix) -> HeadOutputs [batch seq num_heads head_dim]: Every head's output side by side, as the output projection takes it
        (attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
        (attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
        (interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
      )
      (mlp): OlmoHybridMLP(
        (gate_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (up_proj): Linear(in_features=3840, out_features=11008, bias=False)
        (down_proj): Linear(in_features=11008, out_features=3840, bias=False)
        (act_fn): SiLUActivation()
        (mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream: the post-feedforward norm's output on an attention block, the MLP's own on a linear block
        (mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
        (mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
      )
      (post_attention_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (post_feedforward_layernorm): OlmoHybridRMSNorm((3840,), eps=1e-06)
      (attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the mixer
      (layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the mixer's add
      (mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
      (layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
      (mlp_input) -> Residual [batch seq hidden_size]: What the MLP is called with
      (layer_output) -> Residual [batch seq hidden_size]: The residual stream leaving the block, a tensor even when the block returns a tuple
    )
  )
  (norm): OlmoHybridRMSNorm((3840,), 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_layers32
model.hidden_size3840
model.num_heads30
model.num_kv_heads30
model.head_dim128
model.qk_head_dim128
model.vocab_size100352
model.intermediate_size11008
architecturesOlmoHybridForCausalLM
num_hidden_layers32
hidden_size3840
intermediate_size11008
num_attention_heads30
num_key_value_heads30
vocab_size100352
max_position_embeddings65536
hidden_actsilu
rms_norm_eps1e-06
tie_word_embeddingsFalse
linear_conv_kernel_dim4
linear_num_key_heads30
linear_num_value_heads30
linear_key_head_dim96
linear_value_head_dim192
attention_biasFalse

The Notes

03 · what to know before you run

On attention blocks the contributions are the post-norms' outputs

# a DeltaNet block: pre-norm
h   = x + linear_attn(input_layernorm(x))
out = h + mlp(post_attention_layernorm(h))

# an attention block: post-norm, no input_layernorm
h   = x + post_attention_layernorm(self_attn(x))
out = h + post_feedforward_layernorm(mlp(h))

On a DeltaNet block attention_output and mlp_output are the modules' outputs. On an attention block they are the outputs of the norms after the sublayers, so scaling self_attn.output or mlp.output there does nothing to the stream; scale, steer and decompose through attention_output and mlp_output.

q_norm and k_norm span every head

On the attention blocks each takes one RMS over the whole projection before the heads are split, so an edit to one head's slice of q_proj.output reaches the other heads. Edit one head at attention_queries or attention_keys, which no norm follows.

Think-SFT's attention is rotary

The released configs set rope_theta to null, and the attention blocks then apply no rotary embedding. Olmo-Hybrid-Think-SFT-7B sets rope_parameters itself to null, which transformers fills with a theta of 10000, so its attention blocks do rotate their queries and keys.

From the family module

04 · nnterp/families/olmo_hybrid.py

OLMo-Hybrid (OlmoHybridForCausalLM).

Llama's containers over two block classes, chosen by config.layer_types:

  • OlmoHybridLinearAttentionDecoderLayer (linear_attention) is pre-norm, as Llama: input_layernorm -> linear_attn (a gated DeltaNet, see nnterp.LinearAttention), then post_attention_layernorm -> mlp, each added to the stream as the module returns it.
  • OlmoHybridAttentionDecoderLayer (full_attention) is OLMo-3's post-norm sandwich: self_attn -> post_attention_layernorm and mlp -> post_feedforward_layernorm, the post-norms' outputs added to the stream; it has no input_layernorm, so the block input enters the attention.

Each block has self_attn or linear_attn, never both. The attention runs the shared attention interface (query and key norms before it; no rotary embedding when the checkpoint sets no rope_theta), so its contribution is OLMo-3's override at the post-attention norm. Both block classes hold one MLP class, OlmoHybridMLP, whose contribution is its own output on a linear block and the post-feedforward norm's output on an attention block, so mlp_output is a EProperty whose key is chosen by the parent block's layer type. The DeltaNet calls transformers' torch_chunk_gated_delta_rule / torch_recurrent_gated_delta_rule as Qwen3-Next does, so the base LinearAttention holds; with linear_allow_neg_eigval the betas are doubled before the kernel and lie in (0, 2).