Model techniques map
ModelsLaguna-S-2.1

Poolside · released 2026-07-21

Laguna-S-2.1

What Laguna-S-2.1’s own documents say it is built from — every method with the sentence that describes it.

Curator’s note118B total / 8B active MoE for agentic coding: 48 layers in a 1:3 global-to-sliding ratio (12 global, 36 SWA at window 512), 256 routed experts (top-10) + 1 shared, token-choice routing with softplus gating, grouped-query attention with per-head softplus output gating, 1M context, OpenMDW-1.1. RL post-training in FP8 over 409k agentic and non-agentic task environments, and a trained DFlash draft model for speculative decoding. First non-Chinese, non-US-hyperscaler lab in the map. The family technical report covers Laguna M.1 / XS.2, not S 2.1 itself; full evaluation trajectories are published at trajectories.poolside.ai.

Against the consensus recipe

Its documents state 5 of the 15 methods the field agrees on.

The recipe from the overview: the methods the most labs adopt, per stage. A missing one is something the documents do not say, not something the model lacks.

  1. Data curation

  2. Training objective

  3. Model architecture

  4. Optimization

  5. Post-training

  6. Inference & serving

Checked in its code

Its code shows 11 of the 19 architecture features checked — 8 of them are not stated in its documents.

Documents say what a lab chose to describe; the modeling code says what the checkpoint runs. Each feature below was put to a code verifier, and only the config values and source lines it cited that were found in the files are shown, linked to the line.

Read from Hugging Face Transformers (modeling_laguna.py, configuration_laguna.py) and config.json at revision 0f57314083, by anthropic/claude-sonnet-5 on 2026-09-25.

FeatureCodeIts documentsEvidence
Grouped-query attention in its code core

Each layer's queries (48 or 72 heads) share 8 key/value heads via repeat_kv-based grouped-query attention.

num_attention_heads = 48num_key_value_heads = 8
self.num_key_value_groups = self.num_heads // config.num_key_value_heads
modeling_laguna.py · L345
key_states = repeat_kv(key, module.num_key_value_groups)
    value_states = repeat_kv(value, module.num_key_value_groups)
modeling_laguna.py · L320–321
Multi-head latent attention not in its codenot stated

Attention uses separate q/k/v projections sized by head_dim and num_key_value_heads with no low-rank latent cache, so MLA is not implemented.

self.q_proj = nn.Linear(config.hidden_size, self.num_heads * self.head_dim, bias=config.attention_bias)
        self.k_proj = nn.Linear(
            config.hidden_size, config.num_key_value_heads * self.head_dim, bias=config.attention_bias
        )
modeling_laguna.py · L350–353
Sliding-window attention code only in its codenot stated

Layers marked sliding_attention in layer_types use sliding_window=512 to restrict attention to a local window.

sliding_window = 512layer_types = ["full_attention", "sliding_attention", "sliding_attention", "sliding_attenti…
self.is_local_attention = config.layer_types[layer_idx] == "sliding_attention"
        self.sliding_window = config.sliding_window if self.is_local_attention else None
modeling_laguna.py · L360–361
Interleaved sliding-window and global attention code only in its codenot stated

layer_types interleaves one full_attention layer followed by three sliding_attention layers repeatedly across all 48 layers.

layer_types = ["full_attention", "sliding_attention", "sliding_attention", "sliding_attenti…
mask_creation_functions = {
                "full_attention": lambda: create_causal_mask(**mask_kwargs),
                "sliding_attention": lambda: create_sliding_window_causal_mask(**mask_kwargs),
            }
modeling_laguna.py · L560–563
Indexer-selected sparse attention (DeepSeek Sparse Attention) not in its codenot stated

No indexer-based top-k token selection mechanism appears anywhere in the attention or MoE code.

Linear-attention or state-space layers alongside full attention not in its codenot stated

All decoder layers use the same LagunaAttention softmax attention class; there is no linear-attention or SSM mixer variant.

self.self_attn = LagunaAttention(config, layer_idx, config.num_attention_heads_per_layer[layer_idx])
modeling_laguna.py · L427
Gated DeltaNet layers not in its codenot stated

No delta-rule recurrent state update or decay gate code exists; all layers are standard softmax attention.

Mamba-2 layers not in its codenot stated

No selective state-space (SSD/Mamba-2) block implementation is present in the modeling file.

Learnable attention sink not in its codenot stated

The attention softmax and mask construction have no extra learned sink logit column.

attn_weights = nn.functional.softmax(attn_weights, dim=-1, dtype=torch.float32).to(query.dtype)
modeling_laguna.py · L327
Gated attention output code only in its codenot stated

Attention output is multiplied by a softplus (not sigmoid, but input-dependent) gate computed from hidden_states via g_proj, either per-head or per-element based on config.gating.

gating = "per-head"
gate = F.softplus(self.g_proj(hidden_states).float()).to(attn_output.dtype)
        if self.gate_per_head:
            attn_output = (attn_output.view(*input_shape, -1, self.head_dim) * gate.unsqueeze(-1)).view(
                *input_shape, -1
            )
modeling_laguna.py · L411–415
QK normalization code only in its codenot stated

Queries and keys are each normalized per head with LagunaRMSNorm before rotary and the attention dot product.

self.q_norm = LagunaRMSNorm(self.head_dim, eps=config.rms_norm_eps)
        self.k_norm = LagunaRMSNorm(self.head_dim, eps=config.rms_norm_eps)
modeling_laguna.py · L363–364
query_states = self.q_norm(query_states).transpose(1, 2)
        key_states = self.k_norm(key_states).transpose(1, 2)
modeling_laguna.py · L384–385
Partial RoPE code only in its codenot stated

Full-attention layers use partial_rotary_factor 0.5 so RoPE is applied to only half of each head dimension.

rope_parameters.full_attention.partial_rotary_factor = 0.5
partial_rotary_factor = config.rope_parameters[layer_type].get("partial_rotary_factor", 1.0)
        head_dim = getattr(config, "head_dim", None) or config.hidden_size // config.num_attention_heads
        dim = int(head_dim * partial_rotary_factor)
modeling_laguna.py · L109–111
YaRN RoPE scaling code only in its codenot stated

The full_attention layer type sets rope_type to yarn with factor/beta parameters, and the rotary embedding module dispatches to the YaRN init function.

rope_parameters.full_attention.rope_type = "yarn"rope_parameters.full_attention.factor = 128.0
self.rope_type[layer_type] = rope_params["rope_type"]
            rope_init_fn: Callable = self.compute_default_rope_parameters
            if self.rope_type[layer_type] != "default":
                rope_init_fn = ROPE_INIT_FUNCTIONS[self.rope_type[layer_type]]
modeling_laguna.py · L81–84
Layers without positional encoding (NoPE) not in its codenot stated

Every layer type (full_attention and sliding_attention) has an entry in rope_parameters with a rope_type, so all softmax-attention layers receive positional encoding.

rope_parameters.sliding_attention.rope_type = "default"
cos, sin = position_embeddings
        query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin)
modeling_laguna.py · L388–389
Mixture of experts in its code core

LagunaSparseMoeBlock routes tokens to top-10 of 256 experts via a learned sigmoid router, applied in layers marked sparse.

num_experts = 256num_experts_per_tok = 10
_, routing_weights, selected_experts = self.gate(hidden_states)
        hidden_states = self.experts(hidden_states, selected_experts, routing_weights)
modeling_laguna.py · L242–243
Shared expert in its code used

Each sparse MoE block includes a shared_experts MLP with nonzero intermediate size 1024 that every token passes through, added to the routed output.

shared_expert_intermediate_size = 1024
self.shared_experts = LagunaMLP(config, intermediate_size=config.shared_expert_intermediate_size)
modeling_laguna.py · L234
hidden_states = hidden_states + shared_output
modeling_laguna.py · L246
Auxiliary-loss-free load balancing (selection bias) code only in its codenot stated

The router adds e_score_correction_bias only to the scores used for top-k selection, not to the routing weights used to combine expert outputs.

scores_for_selection = routing_scores + self.e_score_correction_bias.to(routing_scores.dtype)
        _, selected_experts = torch.topk(scores_for_selection, self.top_k, dim=-1)
        routing_weights = routing_scores.gather(-1, selected_experts)
modeling_laguna.py · L180–182
Multi-token prediction layers not in its codenot stated

No config key declares extra next-next-token prediction modules and no MTP module exists in the modeling code.

SwiGLU feed-forward code only in its codenot stated

Both the dense LagunaMLP and expert MLPs compute silu(gate_proj(x)) * up_proj(x), and hidden_act is silu.

down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
modeling_laguna.py · L153

model architecture 19

token mixer 9

channel mixer 7

positional encoding 3

training objective 2

distillation objective 2

optimization 13

optimizer 2

learning-rate schedule 2

training precision 2

training stability 2

training runtime 5

data curation 29

data sourcing 2

data filtering 9

deduplication 1

synthetic data 10

data mixture & curriculum 5

sequence packing 1

tokenization 1

post-training 27

filed at the root 1

supervised fine-tuning 4

reinforcement learning algorithm 5

reward modelling 4

rollout & RL infrastructure 8

agentic post-training 4

mid-training & continual pretraining 1

inference & serving 24

decoding strategy 1

DFlash optional

reasoning control 7

KV cache management 1

inference quantization 8

inference scheduling 1

context management 1

agentic scaffolding 5

software implementation 9

filed at the root 1

inference engine 1

training framework 2

infrastructure service 5

evaluation 12

filed at the root 5

benchmark 1

evaluation harness 3

judge 3

other 5

filed at the root 5

unfiled 23

Further reading

Picked by hand, not extracted: where to read more, not evidence for anything on this page.

Sources

The curated document list for this model. "not fetched" means the URL is recorded but its text was not read in the current run.