One block of the stack. Hover any part for its nnterp name; click to pin the card. The slider picks a block, each tick's color gives its block's shape, and the diagram redraws for the block picked.
One block of the stack. Hover any part for its nnterp name; click to pin the card. The slider picks a block, each tick's color gives its block's shape, and the diagram redraws for the block picked.
identity layers[i].input + linear_attn.attention_output + mlp.mlp_output == layer_output
⚠︎ marks a value this checkpoint has only under some load: hover it for the condition.
⚠︎ marks a value this checkpoint has only under some load: hover it for the condition.
What print(model) shows on ai21labs/Jamba-v0.1: the native modules, standard names and every standard value with its layout.
JambaForCausalLM(
(lm_head): Linear(in_features=4096, out_features=65536, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(65536, 4096, padding_idx=0)
(layers): ModuleList(
(0): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(1): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(2): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(3): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(4): JambaAttentionDecoderLayer(
(self_attn): JambaAttention(
(q_proj): Linear(in_features=4096, out_features=4096, bias=False)
(k_proj): Linear(in_features=4096, out_features=1024, bias=False)
(v_proj): Linear(in_features=4096, out_features=1024, bias=False)
(o_proj): Linear(in_features=4096, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_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_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(5): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(6): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(7): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(8): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(9): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(10): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(11): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(12): JambaAttentionDecoderLayer(
(self_attn): JambaAttention(
(q_proj): Linear(in_features=4096, out_features=4096, bias=False)
(k_proj): Linear(in_features=4096, out_features=1024, bias=False)
(v_proj): Linear(in_features=4096, out_features=1024, bias=False)
(o_proj): Linear(in_features=4096, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_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_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(13): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(14): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(15): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(16): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(17): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(18): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(19): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(20): JambaAttentionDecoderLayer(
(self_attn): JambaAttention(
(q_proj): Linear(in_features=4096, out_features=4096, bias=False)
(k_proj): Linear(in_features=4096, out_features=1024, bias=False)
(v_proj): Linear(in_features=4096, out_features=1024, bias=False)
(o_proj): Linear(in_features=4096, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_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_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(21): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(22): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(23): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(24): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(25): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(26): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(27): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(28): JambaAttentionDecoderLayer(
(self_attn): JambaAttention(
(q_proj): Linear(in_features=4096, out_features=4096, bias=False)
(k_proj): Linear(in_features=4096, out_features=1024, bias=False)
(v_proj): Linear(in_features=4096, out_features=1024, bias=False)
(o_proj): Linear(in_features=4096, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_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_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(29): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(30): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(31): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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): JambaRMSNorm((4096,), eps=1e-06)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)What print(model) shows on ai21labs/AI21-Jamba-Reasoning-3B: the native modules, standard names and every standard value with its layout.
JambaForCausalLM(
(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-6): 7 x JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(5120, 5120, kernel_size=(4,), stride=(1,), padding=(3,), groups=5120)
(act): SiLUActivation()
(in_proj): Linear(in_features=2560, out_features=10240, bias=False)
(x_proj): Linear(in_features=5120, out_features=192, bias=False)
(dt_proj): Linear(in_features=160, out_features=5120, bias=True)
(out_proj): Linear(in_features=5120, out_features=2560, bias=False)
(dt_layernorm): JambaRMSNorm((160,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=2560, out_features=8192, bias=False)
(up_proj): Linear(in_features=2560, out_features=8192, bias=False)
(down_proj): Linear(in_features=8192, 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
)
(input_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(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
)
(7): JambaAttentionDecoderLayer(
(self_attn): JambaAttention(
(q_proj): Linear(in_features=2560, out_features=2560, bias=False)
(k_proj): Linear(in_features=2560, out_features=128, bias=False)
(v_proj): Linear(in_features=2560, out_features=128, bias=False)
(o_proj): Linear(in_features=2560, out_features=2560, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_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_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=2560, out_features=8192, bias=False)
(up_proj): Linear(in_features=2560, out_features=8192, bias=False)
(down_proj): Linear(in_features=8192, 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
)
(input_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(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
)
(8-20): 13 x JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(5120, 5120, kernel_size=(4,), stride=(1,), padding=(3,), groups=5120)
(act): SiLUActivation()
(in_proj): Linear(in_features=2560, out_features=10240, bias=False)
(x_proj): Linear(in_features=5120, out_features=192, bias=False)
(dt_proj): Linear(in_features=160, out_features=5120, bias=True)
(out_proj): Linear(in_features=5120, out_features=2560, bias=False)
(dt_layernorm): JambaRMSNorm((160,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=2560, out_features=8192, bias=False)
(up_proj): Linear(in_features=2560, out_features=8192, bias=False)
(down_proj): Linear(in_features=8192, 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
)
(input_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(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
)
(21): JambaAttentionDecoderLayer(
(self_attn): JambaAttention(
(q_proj): Linear(in_features=2560, out_features=2560, bias=False)
(k_proj): Linear(in_features=2560, out_features=128, bias=False)
(v_proj): Linear(in_features=2560, out_features=128, bias=False)
(o_proj): Linear(in_features=2560, out_features=2560, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_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_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=2560, out_features=8192, bias=False)
(up_proj): Linear(in_features=2560, out_features=8192, bias=False)
(down_proj): Linear(in_features=8192, 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
)
(input_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(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
)
(22-27): 6 x JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(5120, 5120, kernel_size=(4,), stride=(1,), padding=(3,), groups=5120)
(act): SiLUActivation()
(in_proj): Linear(in_features=2560, out_features=10240, bias=False)
(x_proj): Linear(in_features=5120, out_features=192, bias=False)
(dt_proj): Linear(in_features=160, out_features=5120, bias=True)
(out_proj): Linear(in_features=5120, out_features=2560, bias=False)
(dt_layernorm): JambaRMSNorm((160,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=2560, out_features=8192, bias=False)
(up_proj): Linear(in_features=2560, out_features=8192, bias=False)
(down_proj): Linear(in_features=8192, 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
)
(input_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(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): JambaRMSNorm((2560,), eps=1e-06)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)What print(model) shows on ai21labs/AI21-Jamba2-3B: the native modules, standard names and every standard value with its layout.
JambaForCausalLM(
(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-6): 7 x JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(5120, 5120, kernel_size=(4,), stride=(1,), padding=(3,), groups=5120)
(act): SiLUActivation()
(in_proj): Linear(in_features=2560, out_features=10240, bias=False)
(x_proj): Linear(in_features=5120, out_features=192, bias=False)
(dt_proj): Linear(in_features=160, out_features=5120, bias=True)
(out_proj): Linear(in_features=5120, out_features=2560, bias=False)
(dt_layernorm): JambaRMSNorm((160,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=2560, out_features=8192, bias=False)
(up_proj): Linear(in_features=2560, out_features=8192, bias=False)
(down_proj): Linear(in_features=8192, 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
)
(input_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(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
)
(7): JambaAttentionDecoderLayer(
(self_attn): JambaAttention(
(q_proj): Linear(in_features=2560, out_features=2560, bias=False)
(k_proj): Linear(in_features=2560, out_features=128, bias=False)
(v_proj): Linear(in_features=2560, out_features=128, bias=False)
(o_proj): Linear(in_features=2560, out_features=2560, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_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_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=2560, out_features=8192, bias=False)
(up_proj): Linear(in_features=2560, out_features=8192, bias=False)
(down_proj): Linear(in_features=8192, 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
)
(input_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(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
)
(8-20): 13 x JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(5120, 5120, kernel_size=(4,), stride=(1,), padding=(3,), groups=5120)
(act): SiLUActivation()
(in_proj): Linear(in_features=2560, out_features=10240, bias=False)
(x_proj): Linear(in_features=5120, out_features=192, bias=False)
(dt_proj): Linear(in_features=160, out_features=5120, bias=True)
(out_proj): Linear(in_features=5120, out_features=2560, bias=False)
(dt_layernorm): JambaRMSNorm((160,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=2560, out_features=8192, bias=False)
(up_proj): Linear(in_features=2560, out_features=8192, bias=False)
(down_proj): Linear(in_features=8192, 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
)
(input_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(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
)
(21): JambaAttentionDecoderLayer(
(self_attn): JambaAttention(
(q_proj): Linear(in_features=2560, out_features=2560, bias=False)
(k_proj): Linear(in_features=2560, out_features=128, bias=False)
(v_proj): Linear(in_features=2560, out_features=128, bias=False)
(o_proj): Linear(in_features=2560, out_features=2560, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_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_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=2560, out_features=8192, bias=False)
(up_proj): Linear(in_features=2560, out_features=8192, bias=False)
(down_proj): Linear(in_features=8192, 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
)
(input_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(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
)
(22-27): 6 x JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(5120, 5120, kernel_size=(4,), stride=(1,), padding=(3,), groups=5120)
(act): SiLUActivation()
(in_proj): Linear(in_features=2560, out_features=10240, bias=False)
(x_proj): Linear(in_features=5120, out_features=192, bias=False)
(dt_proj): Linear(in_features=160, out_features=5120, bias=True)
(out_proj): Linear(in_features=5120, out_features=2560, bias=False)
(dt_layernorm): JambaRMSNorm((160,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=2560, out_features=8192, bias=False)
(up_proj): Linear(in_features=2560, out_features=8192, bias=False)
(down_proj): Linear(in_features=8192, 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
)
(input_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((2560,), eps=1e-06)
(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): JambaRMSNorm((2560,), eps=1e-06)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)What print(model) shows on ai21labs/AI21-Jamba2-Mini: the native modules, standard names and every standard value with its layout.
JambaForCausalLM(
(lm_head): Linear(in_features=4096, out_features=65536, bias=False)
(generator): Generator(
(streamer): Streamer()
)
(embed_tokens): Embedding(65536, 4096, padding_idx=0)
(layers): ModuleList(
(0): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(1): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(2): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(3): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(4): JambaAttentionDecoderLayer(
(self_attn): JambaAttention(
(q_proj): Linear(in_features=4096, out_features=4096, bias=False)
(k_proj): Linear(in_features=4096, out_features=1024, bias=False)
(v_proj): Linear(in_features=4096, out_features=1024, bias=False)
(o_proj): Linear(in_features=4096, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_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_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(5): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(6): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(7): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(8): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(9): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(10): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(11): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(12): JambaAttentionDecoderLayer(
(self_attn): JambaAttention(
(q_proj): Linear(in_features=4096, out_features=4096, bias=False)
(k_proj): Linear(in_features=4096, out_features=1024, bias=False)
(v_proj): Linear(in_features=4096, out_features=1024, bias=False)
(o_proj): Linear(in_features=4096, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_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_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(13): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(14): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(15): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(16): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(17): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(18): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(19): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(20): JambaAttentionDecoderLayer(
(self_attn): JambaAttention(
(q_proj): Linear(in_features=4096, out_features=4096, bias=False)
(k_proj): Linear(in_features=4096, out_features=1024, bias=False)
(v_proj): Linear(in_features=4096, out_features=1024, bias=False)
(o_proj): Linear(in_features=4096, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_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_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(21): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(22): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(23): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(24): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(25): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(26): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(27): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(28): JambaAttentionDecoderLayer(
(self_attn): JambaAttention(
(q_proj): Linear(in_features=4096, out_features=4096, bias=False)
(k_proj): Linear(in_features=4096, out_features=1024, bias=False)
(v_proj): Linear(in_features=4096, out_features=1024, bias=False)
(o_proj): Linear(in_features=4096, out_features=4096, bias=False)
(attention_queries_prerope) -> Queries [batch num_heads seq qk_head_dim]: The queries entering the rotary embedding
(attention_keys_prerope) -> Keys [batch num_kv_heads seq qk_head_dim]: The keys entering the rotary embedding
(attention_queries) -> Queries [batch num_heads seq qk_head_dim]: The queries entering attention
(attention_keys) -> Keys [batch num_kv_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_output) -> Residual [batch seq hidden_size]: What the attention adds to the residual stream
(attention_probabilities) -> Pattern [batch num_heads query key]: The attention pattern the values are mixed with
(attention_head_outputs) -> HeadOutputs [batch seq num_heads head_dim]: The per-head outputs before the output projection
(interface): The attention function this call ran, as f(queries, keys, values) -> (head outputs, pattern), with the rest of the call's arguments
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(29): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(30): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaMLP(
(gate_proj): Linear(in_features=4096, out_features=14336, bias=False)
(up_proj): Linear(in_features=4096, out_features=14336, bias=False)
(down_proj): Linear(in_features=14336, out_features=4096, bias=False)
(act_fn): SiLUActivation()
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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
)
(31): JambaMambaDecoderLayer(
(linear_attn/mamba): JambaMambaMixer(
(conv1d): Conv1d(8192, 8192, kernel_size=(4,), stride=(1,), padding=(3,), groups=8192)
(act): SiLUActivation()
(in_proj): Linear(in_features=4096, out_features=16384, bias=False)
(x_proj): Linear(in_features=8192, out_features=288, bias=False)
(dt_proj): Linear(in_features=256, out_features=8192, bias=True)
(out_proj): Linear(in_features=8192, out_features=4096, bias=False)
(dt_layernorm): JambaRMSNorm((256,), eps=1e-06)
(b_layernorm): JambaRMSNorm((16,), eps=1e-06)
(c_layernorm): JambaRMSNorm((16,), eps=1e-06)
(attention_queries) -> ScanQK [batch seq groups state_dim]: C, the vector each token reads the state with
(attention_keys) -> ScanQK [batch seq groups state_dim]: B, the vector each token writes into the state with
(attention_values) -> ScanValues [batch seq channels]: x, the input the scan writes into the state
(betas) -> ScanSteps [batch seq channels]: The step size dt = softplus(dt + dt_bias), per token and channel; derived, read-only
(decays) -> ScanDecays [batch seq channels state_dim]: The per-token log decay dt * A of the state; derived, read-only
(state_input) -> ScanState | None [batch channels state_dim]: The state entering the layer on a decode step (a copy of the cache's buffer), None on a prompt
(attention_head_outputs) -> ScanValues [batch seq channels]: y = C.h + D.x, the scan's read of the state before the gate and out_proj
(state_output) -> ScanState [batch channels state_dim]: The state leaving the layer
(state) -> ScanState [batch channels state_dim]: The state after one token of the prompt; iterate it with tracer.iter; needs route_kernels(family, 'torch')
(states) -> ScanStates [batch seq channels state_dim]: The state after every token of this call; needs route_kernels(family, 'torch')
(attention_output) -> Residual [batch seq hidden_size]: What the mixer adds to the residual stream
)
(mlp/feed_forward): JambaSparseMoeBlock(
(router): JambaTopKRouter()
(experts): JambaExperts(
(act_fn): SiLUActivation()
)
(router_logits) -> RouterLogits [batch seq num_experts]: The router's logits, one per expert, before the scoring
(mlp_activation) -> Neurons [batch seq intermediate_size]: The activation function's output
(mlp_neurons) -> Neurons [batch seq intermediate_size]: What the down projection receives: act(gate)·up on a gated MLP, the activation itself otherwise
(expert_weights) -> ExpertWeights [batch seq top_k]: The weight each selected expert's output is scaled by
(expert_indices) -> ExpertIndices [batch seq top_k]: The expert each routing slot sends the token to
(expert_outputs) -> ExpertOutputs [batch seq top_k hidden_size]: Each routing slot's weighted expert output
(routed_output) -> Residual [batch seq hidden_size]: The routed experts' combined output
(shared_expert_output) -> Residual [batch seq hidden_size]: The shared expert's output
(mlp_output) -> Residual [batch seq hidden_size]: What the MLP adds to the residual stream
)
(input_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(post_attention_layernorm/pre_ff_layernorm): JambaRMSNorm((4096,), eps=1e-06)
(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): JambaRMSNorm((4096,), eps=1e-06)
(logits) -> Logits [batch seq vocab_size]: The logits the model returns, after anything it does past lm_head (a softcap, a scale)
(token_embeddings) -> Residual [batch seq hidden_size]: The embedding module's output; layers[0].input is what enters the first block
(final_norm_output) -> Residual [batch seq hidden_size]: The residual stream after the final norm, what lm_head reads
(lm_head_output) -> Logits [batch seq vocab_size]: The head's logits before anything the model does past lm_head (a softcap, a scale)
(next_token_probs) -> NextTokenProbs [batch vocab_size]: The next-token distribution at the last position; derived, read-only
(input_ids) -> Tokens [batch seq]: The token ids the model was called with
(attention_mask) -> Tokens [batch seq]: The attention mask the model was called with; zeros are padding
(input_size): [batch, seq] of the current call; read-only
)h = x + mixer(input_layernorm(x)) # linear_attn (Mamba) or self_attn
out = h + mlp(post_attention_layernorm(h)) # a SwiGLU MLP or a mixture
config.layer_types lists each block's mixer. A Mamba block has no self_attn values, so pick
blocks from that list outside the trace. On Jamba-v0.1 and Jamba2-Mini the mixture sits on the odd
blocks and the attention on four even ones, so an attention block always has the dense MLP. The 3B
checkpoints have no mixture.
Jamba (JambaForCausalLM): Mamba-1 blocks, attention blocks and a mixture of experts.
Its tree is model.{embed_tokens, layers[i], final_layernorm} plus
lm_head, with two block classes (config.layers_block_type): most
blocks are JambaMambaDecoderLayer, {input_layernorm, mamba, pre_ff_layernorm, feed_forward}, and one in attn_layer_period is
JambaAttentionDecoderLayer, the same with self_attn in place of
mamba. Both are Llama's pre-norm sequential block, so the identity is
Llama's. Each block has one mixer, never both: on a Mamba block every
self_attn value is reported missing and the selective-scan values live
at layers[i].linear_attn (see nnterp.SelectiveScan); on an attention
block the reverse. feed_forward is a dense MLP or, one block in
expert_layer_period, a sparse mixture of experts; both are mlp, and
pre_ff_layernorm is post_attention_layernorm.
The attention has no positional encoding (the Mamba blocks carry position)
and runs the shared attention interface, so the base holds. The Mamba mixer puts
RMS norms on the step size, B and C before the scan (with weights,
where Falcon-Mamba's are weightless); the values are read at the kernel
call, after them.
With mamba_ssm installed, call nnterp.route_kernels(model.family, "torch") before the first trace.