family olmo_hybrid
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.
identity layers[i].input + linear_attn.attention_output + mlp.mlp_output == layer_output
⚠︎ marks a value this checkpoint has only under some load: hover it for the condition.
⚠︎ marks a value this checkpoint has only under some load: hover it for the condition.
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
)What print(model) shows on allenai/Olmo-Hybrid-Instruct-SFT-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
)What print(model) shows on allenai/Olmo-Hybrid-Instruct-DPO-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
)What print(model) shows on allenai/Olmo-Hybrid-Think-SFT-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
)# 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 headOn 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.
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.
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).