One block of the stack. Hover any part for its nnterp name; click to pin the card.
One block of the stack. Hover any part for its nnterp name; click to pin the card.
One block of the stack. Hover any part for its nnterp name; click to pin the card.
One block of the stack. Hover any part for its nnterp name; click to pin the card.
One block of the stack. Hover any part for its nnterp name; click to pin the card.
One block of the stack. Hover any part for its nnterp name; click to pin the card.
identity layers[i].input + (linear_attn.attention_output + self_attn.attention_output) + mlp.mlp_output == layer_output
⚠︎ marks a value this checkpoint has only under some load: hover it for the condition.
What print(model) shows on tiiuae/Falcon-H1-0.5B-Base: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=1024, out_features=32784, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(32784, 1024, padding_idx=0)
(layers): ModuleList(
(0-35): 36 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=1024, out_features=2048, bias=False)
(up_proj): Linear(in_features=1024, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=1024, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(1792, 1792, kernel_size=(4,), stride=(1,), padding=(3,), groups=1792)
(in_proj): Linear(in_features=1024, out_features=3352, bias=False)
(norm): Identity()
(out_proj): Linear(in_features=1536, out_features=1024, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=1024, out_features=512, bias=False)
(k_proj): Linear(in_features=1024, out_features=128, bias=False)
(v_proj): Linear(in_features=1024, out_features=128, bias=False)
(o_proj): Linear(in_features=512, out_features=1024, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((1024,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((1024,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((1024,), eps=1e-05)
(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 tiiuae/Falcon-H1-0.5B-Instruct: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=1024, out_features=32784, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(32784, 1024, padding_idx=0)
(layers): ModuleList(
(0-35): 36 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=1024, out_features=2048, bias=False)
(up_proj): Linear(in_features=1024, out_features=2048, bias=False)
(down_proj): Linear(in_features=2048, out_features=1024, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(1792, 1792, kernel_size=(4,), stride=(1,), padding=(3,), groups=1792)
(in_proj): Linear(in_features=1024, out_features=3352, bias=False)
(norm): Identity()
(out_proj): Linear(in_features=1536, out_features=1024, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=1024, out_features=512, bias=False)
(k_proj): Linear(in_features=1024, out_features=128, bias=False)
(v_proj): Linear(in_features=1024, out_features=128, bias=False)
(o_proj): Linear(in_features=512, out_features=1024, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((1024,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((1024,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((1024,), eps=1e-05)
(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 tiiuae/Falcon-H1-1.5B-Base: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=2048, out_features=65536, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(65536, 2048, padding_idx=0)
(layers): ModuleList(
(0-23): 24 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=2048, out_features=4608, bias=False)
(up_proj): Linear(in_features=2048, out_features=4608, bias=False)
(down_proj): Linear(in_features=4608, out_features=2048, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(3584, 3584, kernel_size=(4,), stride=(1,), padding=(3,), groups=3584)
(in_proj): Linear(in_features=2048, out_features=6704, bias=False)
(norm): FalconH1RMSNormGated()
(out_proj): Linear(in_features=3072, out_features=2048, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=2048, out_features=1024, bias=False)
(k_proj): Linear(in_features=2048, out_features=256, bias=False)
(v_proj): Linear(in_features=2048, out_features=256, bias=False)
(o_proj): Linear(in_features=1024, out_features=2048, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((2048,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((2048,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((2048,), eps=1e-05)
(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 tiiuae/Falcon-H1-1.5B-Instruct: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=2048, out_features=65537, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(65537, 2048, padding_idx=0)
(layers): ModuleList(
(0-23): 24 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=2048, out_features=4608, bias=False)
(up_proj): Linear(in_features=2048, out_features=4608, bias=False)
(down_proj): Linear(in_features=4608, out_features=2048, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(3584, 3584, kernel_size=(4,), stride=(1,), padding=(3,), groups=3584)
(in_proj): Linear(in_features=2048, out_features=6704, bias=False)
(norm): FalconH1RMSNormGated()
(out_proj): Linear(in_features=3072, out_features=2048, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=2048, out_features=1024, bias=False)
(k_proj): Linear(in_features=2048, out_features=256, bias=False)
(v_proj): Linear(in_features=2048, out_features=256, bias=False)
(o_proj): Linear(in_features=1024, out_features=2048, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((2048,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((2048,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((2048,), eps=1e-05)
(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 tiiuae/Falcon-H1-1.5B-Deep-Base: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=1280, out_features=65536, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(65536, 1280, padding_idx=0)
(layers): ModuleList(
(0-65): 66 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=1280, out_features=3072, bias=False)
(up_proj): Linear(in_features=1280, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=1280, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(2048, 2048, kernel_size=(4,), stride=(1,), padding=(3,), groups=2048)
(in_proj): Linear(in_features=1280, out_features=3608, bias=False)
(norm): FalconH1RMSNormGated()
(out_proj): Linear(in_features=1536, out_features=1280, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=1280, out_features=768, bias=False)
(k_proj): Linear(in_features=1280, out_features=256, bias=False)
(v_proj): Linear(in_features=1280, out_features=256, bias=False)
(o_proj): Linear(in_features=768, out_features=1280, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((1280,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((1280,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((1280,), eps=1e-05)
(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 tiiuae/Falcon-H1-1.5B-Deep-Instruct: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=1280, out_features=65537, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(65537, 1280, padding_idx=0)
(layers): ModuleList(
(0-65): 66 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=1280, out_features=3072, bias=False)
(up_proj): Linear(in_features=1280, out_features=3072, bias=False)
(down_proj): Linear(in_features=3072, out_features=1280, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(2048, 2048, kernel_size=(4,), stride=(1,), padding=(3,), groups=2048)
(in_proj): Linear(in_features=1280, out_features=3608, bias=False)
(norm): FalconH1RMSNormGated()
(out_proj): Linear(in_features=1536, out_features=1280, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=1280, out_features=768, bias=False)
(k_proj): Linear(in_features=1280, out_features=256, bias=False)
(v_proj): Linear(in_features=1280, out_features=256, bias=False)
(o_proj): Linear(in_features=768, out_features=1280, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((1280,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((1280,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((1280,), eps=1e-05)
(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 tiiuae/Falcon-H1-3B-Base: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=2560, out_features=65536, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(65536, 2560, padding_idx=0)
(layers): ModuleList(
(0-31): 32 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=2560, out_features=6144, bias=False)
(up_proj): Linear(in_features=2560, out_features=6144, bias=False)
(down_proj): Linear(in_features=6144, out_features=2560, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(4608, 4608, kernel_size=(4,), stride=(1,), padding=(3,), groups=4608)
(in_proj): Linear(in_features=2560, out_features=8736, bias=False)
(norm): FalconH1RMSNormGated()
(out_proj): Linear(in_features=4096, out_features=2560, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=2560, out_features=1280, bias=False)
(k_proj): Linear(in_features=2560, out_features=256, bias=False)
(v_proj): Linear(in_features=2560, out_features=256, bias=False)
(o_proj): Linear(in_features=1280, out_features=2560, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((2560,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((2560,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((2560,), eps=1e-05)
(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 tiiuae/Falcon-H1-3B-Instruct: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=2560, out_features=65537, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(65537, 2560, padding_idx=0)
(layers): ModuleList(
(0-31): 32 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=2560, out_features=6144, bias=False)
(up_proj): Linear(in_features=2560, out_features=6144, bias=False)
(down_proj): Linear(in_features=6144, out_features=2560, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(4608, 4608, kernel_size=(4,), stride=(1,), padding=(3,), groups=4608)
(in_proj): Linear(in_features=2560, out_features=8736, bias=False)
(norm): FalconH1RMSNormGated()
(out_proj): Linear(in_features=4096, out_features=2560, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=2560, out_features=1280, bias=False)
(k_proj): Linear(in_features=2560, out_features=256, bias=False)
(v_proj): Linear(in_features=2560, out_features=256, bias=False)
(o_proj): Linear(in_features=1280, out_features=2560, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((2560,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((2560,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((2560,), eps=1e-05)
(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 tiiuae/Falcon-H1-7B-Base: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=3072, out_features=130048, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(130048, 3072, padding_idx=0)
(layers): ModuleList(
(0-43): 44 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=3072, out_features=12288, bias=False)
(up_proj): Linear(in_features=3072, out_features=12288, bias=False)
(down_proj): Linear(in_features=12288, out_features=3072, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(3584, 3584, kernel_size=(4,), stride=(1,), padding=(3,), groups=3584)
(in_proj): Linear(in_features=3072, out_features=6680, bias=False)
(norm): FalconH1RMSNormGated()
(out_proj): Linear(in_features=3072, out_features=3072, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=3072, out_features=1536, bias=False)
(k_proj): Linear(in_features=3072, out_features=256, bias=False)
(v_proj): Linear(in_features=3072, out_features=256, bias=False)
(o_proj): Linear(in_features=1536, out_features=3072, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((3072,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((3072,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((3072,), eps=1e-05)
(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 tiiuae/Falcon-H1-7B-Instruct: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=3072, out_features=130049, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(130049, 3072, padding_idx=0)
(layers): ModuleList(
(0-43): 44 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=3072, out_features=12288, bias=False)
(up_proj): Linear(in_features=3072, out_features=12288, bias=False)
(down_proj): Linear(in_features=12288, out_features=3072, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(3584, 3584, kernel_size=(4,), stride=(1,), padding=(3,), groups=3584)
(in_proj): Linear(in_features=3072, out_features=6680, bias=False)
(norm): FalconH1RMSNormGated()
(out_proj): Linear(in_features=3072, out_features=3072, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=3072, out_features=1536, bias=False)
(k_proj): Linear(in_features=3072, out_features=256, bias=False)
(v_proj): Linear(in_features=3072, out_features=256, bias=False)
(o_proj): Linear(in_features=1536, out_features=3072, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((3072,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((3072,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((3072,), eps=1e-05)
(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 tiiuae/Falcon-H1-34B-Base: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=5120, out_features=261120, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(261120, 5120, padding_idx=0)
(layers): ModuleList(
(0-71): 72 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=5120, out_features=21504, bias=False)
(up_proj): Linear(in_features=5120, out_features=21504, bias=False)
(down_proj): Linear(in_features=21504, out_features=5120, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(5120, 5120, kernel_size=(4,), stride=(1,), padding=(3,), groups=5120)
(in_proj): Linear(in_features=5120, out_features=9248, bias=False)
(norm): FalconH1RMSNormGated()
(out_proj): Linear(in_features=4096, out_features=5120, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=5120, out_features=2560, bias=False)
(k_proj): Linear(in_features=5120, out_features=512, bias=False)
(v_proj): Linear(in_features=5120, out_features=512, bias=False)
(o_proj): Linear(in_features=2560, out_features=5120, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((5120,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((5120,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((5120,), eps=1e-05)
(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 tiiuae/Falcon-H1-34B-Instruct: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=5120, out_features=261120, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(261120, 5120, padding_idx=0)
(layers): ModuleList(
(0-71): 72 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=5120, out_features=21504, bias=False)
(up_proj): Linear(in_features=5120, out_features=21504, bias=False)
(down_proj): Linear(in_features=21504, out_features=5120, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(5120, 5120, kernel_size=(4,), stride=(1,), padding=(3,), groups=5120)
(in_proj): Linear(in_features=5120, out_features=9248, bias=False)
(norm): FalconH1RMSNormGated()
(out_proj): Linear(in_features=4096, out_features=5120, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=5120, out_features=2560, bias=False)
(k_proj): Linear(in_features=5120, out_features=512, bias=False)
(v_proj): Linear(in_features=5120, out_features=512, bias=False)
(o_proj): Linear(in_features=2560, out_features=5120, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((5120,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((5120,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((5120,), eps=1e-05)
(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 tiiuae/Falcon-H1R-7B: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=3072, out_features=130048, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(130048, 3072, padding_idx=0)
(layers): ModuleList(
(0-43): 44 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=3072, out_features=12288, bias=False)
(up_proj): Linear(in_features=3072, out_features=12288, bias=False)
(down_proj): Linear(in_features=12288, out_features=3072, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(3584, 3584, kernel_size=(4,), stride=(1,), padding=(3,), groups=3584)
(in_proj): Linear(in_features=3072, out_features=6680, bias=False)
(norm): FalconH1RMSNormGated()
(out_proj): Linear(in_features=3072, out_features=3072, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=3072, out_features=1536, bias=False)
(k_proj): Linear(in_features=3072, out_features=256, bias=False)
(v_proj): Linear(in_features=3072, out_features=256, bias=False)
(o_proj): Linear(in_features=1536, out_features=3072, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((3072,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((3072,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((3072,), eps=1e-05)
(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 tiiuae/Falcon-H1-Tiny-90M-Base: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=512, out_features=32768, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(32768, 512, padding_idx=0)
(layers): ModuleList(
(0-23): 24 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=512, out_features=768, bias=False)
(up_proj): Linear(in_features=512, out_features=768, bias=False)
(down_proj): Linear(in_features=768, out_features=512, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(896, 896, kernel_size=(4,), stride=(1,), padding=(3,), groups=896)
(in_proj): Linear(in_features=512, out_features=1688, bias=False)
(norm): Identity()
(out_proj): Linear(in_features=768, out_features=512, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=512, out_features=512, bias=False)
(k_proj): Linear(in_features=512, out_features=128, bias=False)
(v_proj): Linear(in_features=512, out_features=128, bias=False)
(o_proj): Linear(in_features=512, out_features=512, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((512,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((512,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((512,), eps=1e-05)
(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 tiiuae/Falcon-H1-Tiny-90M-Instruct: the native modules, standard names and every standard value with its layout.
FalconH1ForCausalLM(
(lm_head): Linear(in_features=512, out_features=32768, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(32768, 512, padding_idx=0)
(layers): ModuleList(
(0-23): 24 x FalconH1DecoderLayer(
(mlp/feed_forward): FalconH1MLP(
(gate_proj): Linear(in_features=512, out_features=768, bias=False)
(up_proj): Linear(in_features=512, out_features=768, bias=False)
(down_proj): Linear(in_features=768, out_features=512, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(linear_attn/mamba): FalconH1Mixer(
(act): SiLUActivation()
(conv1d): Conv1d(896, 896, kernel_size=(4,), stride=(1,), padding=(3,), groups=896)
(in_proj): Linear(in_features=512, out_features=1688, bias=False)
(norm): Identity()
(out_proj): Linear(in_features=768, out_features=512, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the Mamba-2 mixer adds to the residual stream: its output times ssm_out_multiplier
(attention_queries) -> SSDQueries [batch seq groups state_dim]: C, the queries reading the state
(attention_keys) -> SSDKeys [batch seq groups state_dim]: B, the keys writing into the state
(attention_values) -> SSDValues [batch seq heads head_dim]: x, the values written into the state
(betas) -> Gates [batch seq heads]: dt, the per-token write strength into the state
(decays) -> Gates [batch seq heads]: A * dt, the per-token log decay of the state
(state_input) -> State | None [batch heads key_dim value_dim]: The state entering the layer, or None at the start of a prompt (a copy of the cache's buffer)
(attention_head_outputs) -> SSDHeadOutputs [batch seq heads head_dim]: y, the per-head outputs before the gated norm and the output projection
(state_output) -> State [batch heads key_dim value_dim]: The state leaving the layer
(states) -> States [batch seq heads key_dim value_dim]: The state after every token of this call; needs nnterp.chunk_per_token(model)
(state): Unavailable: the chunk scan computes every token's state in one tensor per call, not one occurrence per token to walk with tracer.iter; read states, or state_after(t), after nnterp.chunk_per_token(model)
(set_state_after): Unavailable: the chunk scan computes every boundary state in one cumulative step from the initial state, so a state written at token t does not flow into later tokens' states; assign state_input to change where a call starts
)
(self_attn): FalconH1Attention(
(q_proj): Linear(in_features=512, out_features=512, bias=False)
(k_proj): Linear(in_features=512, out_features=128, bias=False)
(v_proj): Linear(in_features=512, out_features=128, bias=False)
(o_proj): Linear(in_features=512, out_features=512, bias=False)
(attention_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream: its output times attention_out_multiplier
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The 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
)
(input_layernorm): FalconH1RMSNorm((512,), eps=1e-05)
(post_attention_layernorm/pre_ff_layernorm): FalconH1RMSNorm((512,), eps=1e-05)
(layer_input) -> Residual [batch seq hidden_size]: The residual stream entering the block
(attention_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the attention
(layer_mid) -> Residual [batch seq hidden_size]: The residual stream after the attention add
(mlp_norm_output) -> Residual [batch seq hidden_size]: The normed stream entering the MLP
(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): FalconH1RMSNorm((512,), eps=1e-05)
(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
)n = input_layernorm(x)
h = x + mamba(n) * ssm_out_multiplier + self_attn(n) * attention_out_multiplier
out = h + mlp(post_attention_layernorm(h))
Each mixer's attention_output is the module's output times its multiplier, the tensor the block
adds; linear_attn.output and self_attn.output[0] are unscaled. Patch, ablate and decompose
through the two attention_output values.
The tokenizer adds no beginning-of-sequence token, so the prompt's first token takes much of the attention and, in the middle blocks, its stream has a norm many times the other positions'. Leave position 0 out of activation statistics and steering-vector norms.
Falcon-H1 (FalconH1ForCausalLM).
Llama's containers over a parallel hybrid block: every block runs a Mamba-2 mixer and attention side by side on the same normed input, then an MLP::
model.layers[i] FalconH1DecoderLayer
.input_layernorm
.mamba FalconH1Mixer, an SSD mixer
.self_attn FalconH1Attention
.pre_ff_layernorm
.feed_forward FalconH1MLP
h = x + mamba(n) * ssm_out_multiplier + self_attn(n * attention_in_multiplier) * attention_out_multiplier
out = h + feed_forward(pre_ff_layernorm(h)) with n = input_layernorm(x)
mamba is linear_attn (nnterp.StateSpace), feed_forward is
mlp and pre_ff_layernorm is post_attention_layernorm. Every block
has both mixers, so the contribution identity has four terms,
input + self_attn.attention_output + linear_attn.attention_output + mlp_output == layer_output.
The config's µP multipliers, and where each is handled:
ssm_out_multiplier / attention_out_multiplier: the block scales
each mixer's output before adding it, so attention_output on each is
that product, the block's own binding of it (mamba_hidden_states_1,
attention_hidden_states_0): the tensor the block adds, so reads, writes
and in-place edits need no arithmetic.lm_head_multiplier: the model multiplies the head's output by it, so the
family defines project_on_vocab with that step.embedding_multiplier: the model multiplies the embedding module's
output by it before the first block, so token_embeddings (the module's
output) times the multiplier is layers[0].input.attention_in_multiplier: the attention's input is the normed stream
times it (1.0 on the released checkpoints), so self_attn.input is the
norm's output only then.mlp_multipliers, key_multiplier, ssm_in_multiplier,
ssm_multipliers: applied inside the MLP, the attention and the mixer; the
values read where the forward already applied them.With mamba_rms_norm false the decode step passes the gate into the update
kernel, so a decode step's attention_head_outputs is gated by
silu(z) where a prompt's is not; with it true (Falcon-H1 1.5B and up,
H1R-7B) both are ungated. Falcon-H1-0.5B and the Falcon-H1-Tiny checkpoints set it
false, and their linear_attn.norm is an identity. The block returns a one-element tuple.