The component lessons took one mechanism at a time: GQA and MLA, sparse attention, linear attention and SSMs, MoE. The lineage lessons followed one lab at a time. This lesson does the opposite cut: five 2025–2026 open (or openly documented) models that made different choices on the same axes, each read from its report and config, plus Nemotron 3 Ultra from the previous lesson as the SSM data point. The question for each cell of the matrix is not only what but why, according to the report — and whether the reason survives a calculation.
All six attack the same problem. Agentic workloads mean long contexts and long outputs, decode is memory-bound, and in a dense-attention model the KV cache grows with every token. The answers span the whole design space: windowed hybrids with different ratios (gpt-oss 1:1, MiMo 5:1 with a 128-token window, MAI 5:1 with 512), learned sparse selection on top of a compressed cache (GLM-5: MLA + DSA), a state-space hybrid (Nemotron), and a deliberate return to full attention (MiniMax-M2).
The matrix
Numbers from the Hugging Face configs where one exists, otherwise from the report (via this site’s review). KV per token is the part that grows with context, in BF16, summed over layers.
| gpt-oss-120b | MiMo-V2-Flash | MiniMax-M2 | GLM-5 | MAI-Base-2 | Nemotron 3 Ultra | |
|---|---|---|---|---|---|---|
| Lab · date | OpenAI · 2025-08 | Xiaomi · 2026-01 (V2.6: 2026-09) | MiniMax · weights 2025-10, report 2026-05 | Zhipu · 2026-02 | Microsoft AI · 2026-10 | NVIDIA · 2026-06 |
| Total / active | 116.83B / 5.13B | 309B / 15B (V2.6-Pro 1.02T / 42B) | 229.9B / 9.8B | 744B / 40B | 2.8T / 80B | 550B / 55B |
| Active share | 4.4% | 4.9% | 4.3% | 5.4% | 2.9% | 10% |
| Layers | 36 | 48 | 62 | 78 (+1 MTP) | 102 | 108 (60 mixers + 48 MoE) |
| Token mixing | SWA-128 and full alternate 1:1; learned sink in every head | 39 SWA-128 : 9 full (5:1 blocks); sink bias on SWA only | full GQA in all layers (M1 was 7 lightning : 1 softmax) | MLA in all layers + DSA top-2048 | 85 local-512 : 17 global (5:1); global NoPE | 48 Mamba-2 : 12 GQA (no RoPE) |
| Global-layer cache | 8 KV × 64 | 4 KV × (192 K + 128 V) | 8 KV × 128 | latent 512 + RoPE key 64 (+ indexer key 128) | 2 KV × 128 (Base-1: 8) | 2 KV × 128 |
| KV per token | 36 KiB | 22.5 KiB | 248 KiB | 107 KiB (indexer at BF16) | 17 KiB | 12 KiB + 384 MiB state |
| MoE | 128 experts, top-4, softmax over the 4, no shared | 256, top-8, sigmoid, no shared; layer 0 dense | 256, top-8, sigmoid + learnable bias, no shared | 256, top-8 + 1 shared, sigmoid; 3 dense layers | 512: 1 shared + 7 routed, LatentMoE (down-proj 4096 of 8704); every layer, dropless | 512, top-22 + shared, LatentMoE (ℓ 2048 of 8192) |
| MTP | none | 3 light blocks (dense FFN + SWA, 0.33B each); accept ≤ 3.6 | 1 module → 3 (weight-copy init) | 3 layers, shared params; accept 2.76 at 4 steps | not reported | 1 block shared across offsets; accept 4.39 at 7 drafts |
| Precision | MoE weights MXFP4 (post-training) | FP8 mixed training; FP8 checkpoint (V2.6: MXFP4 QAT) | FP8 block-128 checkpoint | INT4 QAT in SFT; FP8 rollouts | MXFP8 training | NVFP4 pretraining; NVFP4 + FP8 checkpoint (5.03 bits/elem) |
| Context | 131,072 (YaRN ×32) | 256K (V2.6: 1M) | 196,608 | 202,752 | not stated (Base-1: 256K) | 1M |
(MAI-Base-2’s head dimension and window are not in its report; Base-1’s 128 and 512 are assumed. The MiniMax-M2 report gives the training precision of neither M2 nor its checkpoint; the FP8 block-128 entry is from the released config.)
What each report says about why
- gpt-oss. The alternation “follows GPT-3” — the card gives no ablation. The learned sink is a per-head logit in the softmax denominator so a 128-token window can “attend to nothing” when BOS has slid out. MXFP4 on the MoE weights (over 90% of parameters) is what makes 120b fit one 80 GB GPU and 20b fit 16 GB. (review)
- MiMo-V2. 5:1 SWA-128 with a learnable sink gives “nearly a 6× reduction in KV cache and attention computation”; in a 32B ablation, SWA-128 with sink matched or beat all-global attention, while W = 512 was worse at long context — the report’s hypothesis is a cleaner division of labour (local layers do local, global layers do global). MTP is deliberately light (dense FFN, SWA) because its main job is drafting, including for the batch-size-1 tail of RL rollouts. (review)
- MiniMax-M2. Three reasons to revert to full attention after M1’s 7:1 lightning hybrid: efficient-attention deficits do not show on standard benchmarks and appear at scale in multi-hop reasoning; linear and sparse attention infrastructure is immature (low-precision sensitivity, no native prefix caching, unclear integration with speculative decoding); and hybrid-SWA variants trained for hundreds of billions to trillions of tokens at M2 scale, including ones with sink tokens, lost retrieval and in-context learning. MoE: fine-grained experts and sigmoid gating won their ablation (32 experts top-2 → 128 top-8 raised MATH 19.6 → 24.1). (review)
- GLM-5. 256 experts but fewer layers (80 per the text, 79 in Table 10) “to minimize expert parallelism communication overhead”. MLA instead of GQA, made competitive under Muon by Muon Split and cheaper at decode by MLA-256 (fewer, larger heads). DSA after an ablation on GLM-9B in which half-SWA and linear-attention variants kept losing fine-grained retrieval at 128K even with half the layers still full; DSA is “lossless by construction” (it can attend anywhere). Shared-parameter MTP gives accept length 2.76 vs DeepSeek-V3.2’s 2.55. (review)
- MAI-Base-2. Local 5 : global 1 follows Gemma 3; global layers drop positional encoding (NoPE). Base-2 cut global KV heads 8 → 2 and raised local KV heads to 16: long-context memory falls to ~0.35× of Base-1 while the local cost stays bounded by the window. LatentMoE halves all-to-all bytes (Base-1: 2× compression). MoE moved from every other layer to every layer once the infrastructure (multi-round dropless MoE, 24% → 35% MoE-layer MFU) made the FLOP win show up in wall-clock time. (review)
- Nemotron 3. Mamba-2 for constant decode state, ~1 GQA anchor per 5 mixers for exact retrieval, LatentMoE for the weight-read and all-to-all budget, shared MTP, NVFP4 pretraining (previous lesson).
One formula for every cache
Every design in the table is a choice of per-layer cache term. Write for the bytes a layer adds per token of context:
with for a Mamba-2 layer. Three distinct quantities follow from it and they are not the same: the memory a sequence holds (), the bytes read per decode step (GQA and windows read everything they hold; DSA reads every indexer key but only latents; an SSM reads and writes its state), and the FLOPs of token mixing per decoded token ( per cached token for GQA, per selected token for absorbed MLA, plus the indexer’s per token). Memory sets how many sequences fit; bytes read set the step time; FLOPs matter once speculative decoding or large batches make the step compute-bound.
Two consequences are easy to miss. MLA’s cache per layer is small (576 numbers vs 2,048 for MiniMax’s GQA-8×128), but GLM-5 has it in all 78 layers, so its per-token total sits between the full-attention and the windowed models. And DSA, despite being called sparse attention, does not reduce memory at all — it adds the indexer keys — it reduces reads and FLOPs.
구성 요소 레슨들은 한 번에 메커니즘 하나씩을 다뤘다. GQA와 MLA, sparse attention, linear attention과 SSM, MoE. 계보 레슨들은 한 번에 랩 하나씩을 따라갔다. 이 레슨은 반대로 자른다. 같은 축에서 서로 다른 선택을 한 2025–2026년의 공개(또는 공개적으로 문서화된) 모델 다섯 개를 각자의 보고서와 config에서 읽고, SSM 쪽 데이터 점으로 앞 레슨의 Nemotron 3 Ultra를 더한다. 행렬의 칸마다 묻는 것은 무엇만이 아니라 보고서에 따르면 왜이며, 그 이유가 계산을 견디는지다.
여섯 모델 모두 같은 문제를 공략한다. agent 작업은 긴 컨텍스트와 긴 출력을 뜻하고, decode는 메모리 대역폭에 묶이며, dense attention 모델의 KV cache는 토큰마다 자란다. 답은 설계 공간 전체에 퍼져 있다. 비율이 다른 window 하이브리드(gpt-oss 1:1, MiMo 128토큰 window로 5:1, MAI 512로 5:1), 압축된 캐시 위의 학습된 sparse 선택(GLM-5: MLA + DSA), state-space 하이브리드(Nemotron), 그리고 full attention으로의 의도적 복귀(MiniMax-M2).
행렬
config가 있으면 Hugging Face config에서, 없으면 보고서에서(이 사이트의 리뷰를 거쳐) 가져온 숫자다. 토큰당 KV는 컨텍스트와 함께 자라는 부분을 BF16으로 층마다 더한 값이다.
| gpt-oss-120b | MiMo-V2-Flash | MiniMax-M2 | GLM-5 | MAI-Base-2 | Nemotron 3 Ultra | |
|---|---|---|---|---|---|---|
| 랩 · 시기 | OpenAI · 2025-08 | Xiaomi · 2026-01 (V2.6: 2026-09) | MiniMax · 가중치 2025-10, 보고서 2026-05 | Zhipu · 2026-02 | Microsoft AI · 2026-10 | NVIDIA · 2026-06 |
| 총 / 활성 | 116.83B / 5.13B | 309B / 15B (V2.6-Pro 1.02T / 42B) | 229.9B / 9.8B | 744B / 40B | 2.8T / 80B | 550B / 55B |
| 활성 비율 | 4.4% | 4.9% | 4.3% | 5.4% | 2.9% | 10% |
| 층 | 36 | 48 | 62 | 78 (+MTP 1) | 102 | 108 (mixer 60 + MoE 48) |
| token mixing | SWA-128과 full이 1:1 교대, 모든 head에 학습된 sink | SWA-128 39 : full 9 (5:1 블록), sink bias는 SWA에만 | 모든 층 full GQA (M1은 lightning 7 : softmax 1) | 모든 층 MLA + DSA top-2048 | local-512 85 : global 17 (5:1), global은 NoPE | Mamba-2 48 : GQA 12 (RoPE 없음) |
| 전역 층 캐시 | KV 8 × 64 | KV 4 × (K 192 + V 128) | KV 8 × 128 | latent 512 + RoPE key 64 (+ indexer key 128) | KV 2 × 128 (Base-1: 8) | KV 2 × 128 |
| 토큰당 KV | 36 KiB | 22.5 KiB | 248 KiB | 107 KiB (indexer를 BF16으로) | 17 KiB | 12 KiB + state 384 MiB |
| MoE | expert 128, top-4, 4개 위에서 softmax, shared 없음 | 256, top-8, sigmoid, shared 없음, 0번 층 dense | 256, top-8, sigmoid + 학습 bias, shared 없음 | 256, top-8 + shared 1, sigmoid, dense 3층 | 512: shared 1 + routed 7, LatentMoE (8704 중 down-proj 4096), 모든 층, dropless | 512, top-22 + shared, LatentMoE (8192 중 ℓ 2048) |
| MTP | 없음 | 경량 블록 3개 (dense FFN + SWA, 각 0.33B), 수락 ≤ 3.6 | 모듈 1 → 3 (가중치 복사 초기화) | 3층, 파라미터 공유, 4 step에서 수락 2.76 | 보고 없음 | 블록 1개를 offset 사이에 공유, draft 7개에서 수락 4.39 |
| 정밀도 | MoE 가중치 MXFP4 (사후학습) | FP8 혼합 학습, FP8 체크포인트 (V2.6: MXFP4 QAT) | FP8 block-128 체크포인트 | SFT에서 INT4 QAT, FP8 rollout | MXFP8 학습 | NVFP4 사전학습, NVFP4 + FP8 체크포인트 (원소당 5.03비트) |
| 컨텍스트 | 131,072 (YaRN ×32) | 256K (V2.6: 1M) | 196,608 | 202,752 | 명시 안 됨 (Base-1: 256K) | 1M |
(MAI-Base-2의 head 차원과 window는 보고서에 없어 Base-1의 128과 512를 가정했다. MiniMax-M2 보고서는 M2의 학습 정밀도도 체크포인트 정밀도도 밝히지 않는다. FP8 block-128 항목은 공개된 config에서 왔다.)
각 보고서가 말하는 이유
- gpt-oss. 교대 배치는 “GPT-3를 따른다”. 카드에 ablation은 없다. 학습된 sink는 softmax 분모에 들어가는 head별 logit으로, BOS가 window 밖으로 밀려나도 128토큰 window가 “아무것도 보지 않을” 수 있게 한다. MoE 가중치(파라미터의 90% 이상)를 MXFP4로 둔 덕분에 120b가 80 GB GPU 한 장에, 20b가 16 GB에 들어간다. (리뷰)
- MiMo-V2. 학습 가능한 sink를 둔 5:1 SWA-128은 “KV cache와 attention 계산을 거의 6배 줄인다”. 32B ablation에서 sink를 둔 SWA-128은 전부-global attention과 같거나 나았고, W = 512는 긴 컨텍스트에서 더 나빴다. 보고서의 가설은 더 깨끗한 분업이다(local 층은 local, global 층은 global). MTP는 일부러 가볍게 만들었다(dense FFN, SWA). 주 임무가 draft이고, RL rollout의 batch 1 꼬리도 그 대상이다. (리뷰)
- MiniMax-M2. M1의 lightning 7:1 하이브리드 뒤에 full attention으로 돌아간 세 가지 이유. 효율 attention의 결함은 표준 벤치마크에 안 보이고 규모가 커지면 multi-hop 추론에서 드러난다. linear·sparse attention 인프라는 미성숙하다(저정밀 민감성, native prefix caching 부재, speculative decoding과의 통합 불분명). M2 규모에서 수천억–수조 토큰 학습한 hybrid-SWA 변형들은 sink 토큰을 둔 것까지 retrieval과 in-context learning을 잃었다. MoE는 fine-grained expert와 sigmoid gating이 ablation에서 이겼다(expert 32개 top-2 → 128개 top-8에서 MATH 19.6 → 24.1). (리뷰)
- GLM-5. expert는 256개지만 “expert parallelism 통신 부담을 줄이려고” 층 수를 줄였다(본문은 80, Table 10은 79). GQA 대신 MLA를 썼고, Muon Split으로 Muon 아래에서 경쟁력을 갖추고 MLA-256(head 수는 줄이고 크기는 키움)으로 decode를 싸게 했다. DSA는 GLM-9B ablation 뒤에 택했다. 거기서 절반-SWA와 linear attention 변형은 층의 절반이 full인데도 128K의 세밀한 retrieval을 계속 잃었다. DSA는 “구조상 손실이 없다”(어디든 볼 수 있다). 파라미터를 공유하는 MTP는 수락 길이 2.76으로 DeepSeek-V3.2의 2.55보다 길다. (리뷰)
- MAI-Base-2. local 5 : global 1은 Gemma 3를 따르고, global 층은 위치 인코딩을 뺀다(NoPE). Base-2는 global KV head를 8 → 2로 줄이고 local KV head를 16으로 늘렸다. 긴 컨텍스트 메모리는 Base-1의 약 0.35배로 줄고 local 비용은 window에 묶여 있다. LatentMoE는 all-to-all 바이트를 절반으로 줄인다(Base-1: 2배 압축). 인프라(multi-round dropless MoE, MoE 층 MFU 24% → 35%)가 FLOP 이득을 wall-clock 시간에서도 보이게 만든 뒤 MoE를 격층에서 모든 층으로 옮겼다. (리뷰)
- Nemotron 3. decode state를 상수로 만드는 Mamba-2, 정확한 retrieval을 위해 mixer 5개당 GQA anchor 약 1개, 가중치 읽기와 all-to-all 예산을 위한 LatentMoE, 공유 MTP, NVFP4 사전학습(앞 레슨).
모든 캐시를 하나의 식으로
표의 설계는 모두 층별 캐시 항의 선택이다. 층이 컨텍스트 토큰 하나마다 더하는 바이트를 이라 하자.
Mamba-2 층은 다. 이 식에서 서로 다른 세 양이 나온다. 시퀀스가 들고 있는 메모리(), decode step마다 읽는 바이트(GQA와 window는 들고 있는 것을 전부 읽고, DSA는 indexer key는 전부 읽지만 latent는 개만 읽으며, SSM은 state를 읽고 쓴다), decode 토큰당 token mixing의 FLOPs(GQA는 캐시된 토큰마다 , absorbed MLA는 선택된 토큰마다 , 여기에 indexer의 토큰당 ). 메모리는 몇 시퀀스가 들어가는지를, 읽는 바이트는 step 시간을 정하고, FLOPs는 speculative decoding이나 큰 batch가 step을 연산 한계로 만들 때 중요해진다.
놓치기 쉬운 결과가 둘 있다. MLA의 층당 캐시는 작지만(MiniMax의 GQA-8×128이 2,048개인 데 비해 576개) GLM-5는 그것을 78층 모두에 두므로 토큰당 합계는 full attention과 window 모델 사이에 온다. 그리고 DSA는 sparse attention이라 불리지만 메모리는 전혀 줄이지 않는다. indexer key를 더할 뿐이다. 줄이는 것은 읽기와 FLOPs다.
At 128K tokens the per-sequence memory spans a factor of 16, from Nemotron 3 Ultra (1.9 GiB) and MAI-Base-2 (2.5 GiB) to MiniMax-M2 (31 GiB); at 1M only the three hybrids with a small global path stay below 25 GiB (Nemotron, MAI, MiMo), and only Nemotron 3 (and MiMo-V2.6, not shown) was trained that long. The NumPy block below recomputes the table from the configs and checks it against the numbers in the report reviews.
import numpy as np
# Token-mixing layers per model (HF configs + report reviews). kind: full | swa | mla_dsa | mamba
MODELS = {
"gpt-oss-120b": dict(P=116.83e9, A=5.13e9, E=128, k=4, sub=72, ctx=131072, mtp=1.0, draft=0, layers=[
dict(kind="full", n=18, kv=8, dk=64, dv=64, hq=64), dict(kind="swa", n=18, kv=8, dk=64, dv=64, hq=64, W=128)]),
"MiMo-V2-Flash": dict(P=309e9, A=15e9, E=256, k=8, sub=96, ctx=262144, mtp=3.6, draft=3, layers=[
dict(kind="full", n=9, kv=4, dk=192, dv=128, hq=64), dict(kind="swa", n=39, kv=8, dk=192, dv=128, hq=64, W=128)]),
"MiniMax-M2": dict(P=229.9e9, A=9.8e9, E=256, k=8, sub=124, ctx=196608, mtp=1.0, draft=0, layers=[
dict(kind="full", n=62, kv=8, dk=128, dv=128, hq=48)]),
"GLM-5": dict(P=744e9, A=40e9, E=256, k=8, sub=156, ctx=202752, mtp=2.76, draft=4, layers=[
dict(kind="mla_dsa", n=78, latent=576, vdim=512, idx=128, idx_h=32, hq=64, topk=2048)]),
"MAI-Base-2": dict(P=2.8e12, A=80e9, E=512, k=7, sub=204, ctx=262144, mtp=1.0, draft=0, layers=[ # dh, W, ctx: Base-1 values
dict(kind="full", n=17, kv=2, dk=128, dv=128, hq=96), dict(kind="swa", n=85, kv=16, dk=128, dv=128, hq=96, W=512)]),
"Nemotron-3-Ultra": dict(P=550e9, A=55e9, E=512, k=22, sub=108, ctx=1048576, mtp=4.39, draft=7, layers=[
dict(kind="full", n=12, kv=2, dk=128, dv=128, hq=64), dict(kind="mamba", n=48, H=256, Pd=64, N=128)]),
}
def seq_memory(m, T, b=2, bs=4):
"""Bytes one sequence keeps between decode steps at context T."""
tot = 0.0
for l in m["layers"]:
if l["kind"] == "full": tot += l["n"] * l["kv"] * (l["dk"] + l["dv"]) * T * b
if l["kind"] == "swa": tot += l["n"] * l["kv"] * (l["dk"] + l["dv"]) * min(T, l["W"]) * b
if l["kind"] == "mla_dsa": tot += l["n"] * (l["latent"] + l["idx"]) * T * b
if l["kind"] == "mamba": tot += l["n"] * l["H"] * l["Pd"] * l["N"] * bs
return tot
def step_reads(m, T, b=2, bs=4):
"""Cache bytes read per sequence per decode step (DSA: all indexer keys, top-k latents)."""
tot = 0.0
for l in m["layers"]:
if l["kind"] in ("full", "swa"): tot += seq_memory(dict(layers=[l]), T, b)
if l["kind"] == "mla_dsa": tot += l["n"] * (l["idx"] * T + l["latent"] * min(T, l["topk"])) * b
if l["kind"] == "mamba": tot += 2 * l["n"] * l["H"] * l["Pd"] * l["N"] * bs
return tot
def step_flops(m, T):
f = 2 * m["A"]
for l in m["layers"]:
if l["kind"] == "full": f += l["n"] * 2 * l["hq"] * (l["dk"] + l["dv"]) * T
if l["kind"] == "swa": f += l["n"] * 2 * l["hq"] * (l["dk"] + l["dv"]) * min(T, l["W"])
if l["kind"] == "mla_dsa": f += l["n"] * (2 * l["idx_h"] * l["idx"] * T + 2 * l["hq"] * (l["latent"] + l["vdim"]) * min(T, l["topk"]))
if l["kind"] == "mamba": f += l["n"] * 6 * l["H"] * l["Pd"] * l["N"]
return f
# (1) KV per token and memory at 128K / 1M ------------------------------------------------
print(f"{'model':<17}{'KV/token':>10}{'fixed/seq':>11}{'@128K':>10}{'@1M':>10}")
for name, m in MODELS.items():
grow = seq_memory(m, 2 * 2**20) - seq_memory(m, 2**20)
print(f"{name:<17}{grow / 2**20 / 1024:>7.1f}KiB{(seq_memory(m, 2**20) - grow) / 2**20:>8.0f}MiB"
f"{seq_memory(m, 2**17) / 2**30:>7.2f}GiB{seq_memory(m, 2**20) / 2**30:>7.1f}GiB")
# checks against the report reviews
oss = seq_memory(MODELS["gpt-oss-120b"], 131072) / 2**30
mimo_allGA = dict(layers=[dict(kind="full", n=48, kv=4, dk=192, dv=128)])
ratio = seq_memory(mimo_allGA, 2**20) / seq_memory(MODELS["MiMo-V2-Flash"], 2**20)
mai1 = dict(layers=[dict(kind="full", n=13, kv=8, dk=128, dv=128), dict(kind="swa", n=65, kv=8, dk=128, dv=128, W=512)])
print(f"\nchecks: gpt-oss @131K {oss:.2f} GiB (review 4.5) | MiMo all-GA/hybrid @1M {ratio:.2f} (48/9 = 5.33)"
f" | MAI @256K Base-1 {seq_memory(mai1, 2**18) / 2**30:.1f} vs Base-2 {seq_memory(MODELS['MAI-Base-2'], 2**18) / 2**30:.1f} GiB (review 13.1 / 4.6)")
# (2) all-to-all elements per token per MoE layer (dispatch + combine, upper bound) -------
a2a = {"gpt-oss-120b": (4, 2880, None), "MiMo-V2-Flash": (8, 4096, None), "MiniMax-M2": (8, 3072, None),
"GLM-5": (8, 6144, None), "MAI-Base-2": (7, 8704, 4096), "Nemotron-3-Ultra": (22, 8192, 2048)}
print("\nall-to-all elements/token/MoE layer:",
", ".join(f"{n} {2 * k * (l or d) / 1e3:.0f}K" + (f" (no latent: {2 * k * d / 1e3:.0f}K)" if l else "")
for n, (k, d, l) in a2a.items()))
# (3) deployment cost model (same as the explorer figure) --------------------------------
HBM, BW, FLOPS, EFF = 192e9, 8e12, 2.25e15, 0.5 # abstract B200-class GPU (assumption)
def deploy(m, T, B, wbits=8, mtp=False, b=2):
tau = m["mtp"] if mtp else 1.0 # tokens accepted per step (reported accept length)
q = m["draft"] + 1 if mtp else 1 # tokens verified per sequence per step
mem = seq_memory(m, T, b, 2 * b)
G = int(np.ceil((m["P"] * wbits / 8 + B * mem) / (0.9 * HBM)))
touched = m["A"] + (m["P"] - m["A"]) * (1 - (1 - m["k"] / m["E"]) ** (B * q - 1))
cache = B * step_reads(m, T, b, 2 * b)
nbytes = touched * wbits / 8 + cache
hop = 0.0 if G == 1 else (5e-6 if G <= 8 else 20e-6)
t = max(nbytes / (G * BW), B * q * step_flops(m, T) / (G * FLOPS * EFF)) + m["sub"] * hop
return dict(G=G, tpot=1e3 * t / tau, cost=G * t / (B * tau) * 1e6, share=cache / nbytes)
for target, T, B, key in [("long-context agent", 131072, 64, "cost"), ("low-latency chat", 4096, 1, "tpot"),
("cheap batch", 8192, 256, "cost")]:
print(f"\n{target}: T={T:,}, B={B}, FP8 weights, MTP off, ranked by {key}")
rows = sorted(((deploy(m, T, B), n) for n, m in MODELS.items()), key=lambda r: r[0][key])
for r, n in rows:
print(f" {n:<17} GPUs {r['G']:>2} TPOT {r['tpot']:6.2f} ms GPU-s/1M tok {r['cost']:7.0f} cache {r['share']:4.0%}")The three checks reproduce the reviews (gpt-oss 4.5 GiB at 131K; MiMo’s 48/9 = 5.33× limit; MAI 13.1 → 4.6 GiB at 256K). The all-to-all line puts the MoE choices on one axis: per token per MoE layer, dispatch + combine moves elements (an upper bound that assumes every selected expert sits on a different device). LatentMoE is what lets Nemotron run top-22 at 90K elements instead of 360K, and MAI top-7 at 57K instead of 122K; GLM-5, with top-8 at width 6144, is the heaviest of the non-latent designs — consistent with its stated reason for cutting layers, since every MoE layer is one more all-to-all.
Same year, opposite evidence
The most important column of the matrix is the one where the reports disagree. Four of them ran experiments on cheaper-than-full attention and reached different conclusions:
| Report | Experiment | What they found | Decision |
|---|---|---|---|
| MiMo-V2-Flash | 32B dense, 250B tokens → 32K, same SFT; all-global vs SWA (W = 128 / 512) ± sink | SWA-128 + sink ≥ all-global: MMLU 58.3 vs 57.3, GSM-Inf. 17.3 vs 12.3, NoLiMa 51.2 vs 49.7, GPQA-D 48.1 vs 41.7; RULER-32K tied (89.4); W = 512 worse at long context (NoLiMa 38.5, MRCR 19.6) | 5:1 SWA-128 + sink |
| MiniMax-M2 | M2 scale, hundreds of billions to trillions of tokens; hybrid-SWA variants (ratio, RoPE, mixing, sink tokens) | MMLU/MATH identical; RULER-128K CWE 90 → 72, MQ 99 → 93; MTOB translation drops 15–18 points; after SFT, SWE-verified 54.7 → 50.2, τ²-telecom 32.5 → 21.0 (but IFBench and τ²-retail up) | full attention |
| GLM-5 | GLM-9B, 128K; half the layers SWA (interleaved or searched pattern) or Gated DeltaNet / SimpleGDN | naive interleave −30.35 RULER@128K; best variants still up to −5.69 RULER and −7.33 RepoQA “even when half of the layers retain full attention” | MLA + DSA (attend anywhere) |
| Nemotron (Waleffe et al.) | 8B, Mamba-2 hybrid vs Transformer, same data; ratio and placement ablations | ~8% attention minimises loss; hybrid beats Transformer on all 12 standard tasks (+2.65) and MMLU (+3.5); pure Mamba fails phonebook past ~500 tokens | ~1 attention per 5–8 mixers |
gpt-oss reports no ablation; MAI adopted Gemma 3’s 5:1 through its scaling-ladder efficiency gain, without a long-context retrieval comparison in the Base-2 report.
These are not contradictions so much as different experiments. They differ in scale (9B–32B ablations vs MiniMax’s at-scale runs), window and global path (MiMo’s 128-token window with 9 dedicated global layers; GLM’s half-SWA; MiniMax’s variants not fully specified), sink design (a learned per-head logit vs sink tokens), and above all evaluation: in every report the short-context and standard benchmarks barely move (MiniMax: MMLU 85.5 vs 85.6), and the losses appear only in 128K retrieval, long in-context learning (MTOB), multi-hop, repository QA, and agent tasks after SFT. MiMo’s long-context evidence stops at 32K (RULER-32K, MRCR); MiniMax’s losses start beyond 32K. The two can both be right.
What survives across all four is a short list of design rules: keep an exact global path in some layers (every design does; only its size varies); don’t let local layers try to be global (MiMo’s W = 512 result, GLM’s naive interleave); and measure at the deployment length, after post-training, on retrieval-heavy and agentic tasks — the only place the differences show up.
In the KV figure GLM-5 stays among the most memory-hungry models at 128K even though it uses 'DeepSeek Sparse Attention'. Why?
Top-k selection happens at read time: the indexer scores all cached tokens (reading 128-dim keys for each) and the main attention reads only the 2,048 selected 576-dim latents. Nothing is evicted, so the stored cache is still per token per layer, in all 78 layers — 107 KiB per token in BF16. MLA alone is small per layer (576 vs 2,048 numbers for GQA-8×128); the total is large because every layer is global. Switch the figure to “bytes read” and GLM-5 drops below its memory line.
MoE, MTP and precision: the quieter choices
MoE. Active shares cluster at 3–5%, with Nemotron 3 Ultra the outlier at 10% (top-22). What differs is which MoE cost each lab says it is optimising: GLM-5 counts all-to-alls (fewer layers), MAI and Nemotron the bytes per all-to-all (LatentMoE), MAI the wall-clock efficiency of fine experts (dropless multi-round, MoE in every layer only after the infrastructure caught up), MiniMax quality per active parameter (fine-grained + sigmoid ablation), and gpt-oss the simplest possible layout (128 experts, top-4, no shared expert, softmax over the selected four). Three of six keep a shared expert. The MoE lesson has the load-balancing and routing details.
MTP. Four of six train MTP heads, and all four describe them primarily as speculative-decoding drafters, not as a pretraining loss: MiMo makes them deliberately light (dense FFN + SWA) for RL rollout tails; GLM-5 and Nemotron share parameters across depths so one head is trained for the multi-step use it gets at inference (2.76 at 4 steps; 4.39 at 7 drafts); MiniMax initialises new modules by copying the main model’s weights so they do not perturb it, and keeps co-training them during RL so acceptance does not decay as the policy moves. Accept lengths are measured on each lab’s own prompts and are not comparable across rows.
Precision. Every model ships or trains at least partly below BF16, and the direction is 4-bit weights with the format seen during training: gpt-oss quantised the MoE weights to MXFP4 in post-training, MiMo-V2.6 moved to MXFP4 QAT from mid-training, GLM-5 does INT4 QAT in SFT with a kernel shared by training and offline quantisation, Nemotron pretrains in NVFP4. The exclusions are just as consistent — read off the released configs: gpt-oss keeps attention, router, embeddings and LM head unquantised; MiniMax-M2 keeps the gate, the expert-score bias and the LM head; MiMo keeps several attention output projections; Nemotron keeps attention and latent projections in BF16 and Mamba output projections in MXFP8. Precision-sensitive parts are the token mixers and the routers; the experts are where the bytes are. Formats are derived in quantization.
Choosing for a deployment target
The explorer below runs the same cost model as the third part of the NumPy block. A deployment is the fewest abstract GPUs that hold the weights plus sequences of cache; a decode step costs
where the last factor is the expected fraction of routed experts some token in the batch selects. It is deliberately crude — no kernel efficiencies, no overlap, perfect sharding — and it compares whole models of very different sizes (5B–80B active), so read it for which term dominates under each target, not for absolute speed.
128K 토큰에서 시퀀스당 메모리는 16배 범위에 걸친다. Nemotron 3 Ultra(1.9 GiB)와 MAI-Base-2(2.5 GiB)에서 MiniMax-M2(31 GiB)까지다. 1M에서는 전역 경로가 작은 세 하이브리드(Nemotron, MAI, MiMo)만 25 GiB 아래에 남고, 그 길이까지 학습한 것은 Nemotron 3(그리고 그림에 없는 MiMo-V2.6)뿐이다. 아래 NumPy 블록이 config에서 표를 다시 계산하고 리뷰의 숫자와 맞춰 본다.
import numpy as np
# 모델별 token-mixing 층 (HF config + 보고서 리뷰). kind: full | swa | mla_dsa | mamba
MODELS = {
"gpt-oss-120b": dict(P=116.83e9, A=5.13e9, E=128, k=4, sub=72, ctx=131072, mtp=1.0, draft=0, layers=[
dict(kind="full", n=18, kv=8, dk=64, dv=64, hq=64), dict(kind="swa", n=18, kv=8, dk=64, dv=64, hq=64, W=128)]),
"MiMo-V2-Flash": dict(P=309e9, A=15e9, E=256, k=8, sub=96, ctx=262144, mtp=3.6, draft=3, layers=[
dict(kind="full", n=9, kv=4, dk=192, dv=128, hq=64), dict(kind="swa", n=39, kv=8, dk=192, dv=128, hq=64, W=128)]),
"MiniMax-M2": dict(P=229.9e9, A=9.8e9, E=256, k=8, sub=124, ctx=196608, mtp=1.0, draft=0, layers=[
dict(kind="full", n=62, kv=8, dk=128, dv=128, hq=48)]),
"GLM-5": dict(P=744e9, A=40e9, E=256, k=8, sub=156, ctx=202752, mtp=2.76, draft=4, layers=[
dict(kind="mla_dsa", n=78, latent=576, vdim=512, idx=128, idx_h=32, hq=64, topk=2048)]),
"MAI-Base-2": dict(P=2.8e12, A=80e9, E=512, k=7, sub=204, ctx=262144, mtp=1.0, draft=0, layers=[ # dh, W, ctx: Base-1 값
dict(kind="full", n=17, kv=2, dk=128, dv=128, hq=96), dict(kind="swa", n=85, kv=16, dk=128, dv=128, hq=96, W=512)]),
"Nemotron-3-Ultra": dict(P=550e9, A=55e9, E=512, k=22, sub=108, ctx=1048576, mtp=4.39, draft=7, layers=[
dict(kind="full", n=12, kv=2, dk=128, dv=128, hq=64), dict(kind="mamba", n=48, H=256, Pd=64, N=128)]),
}
def seq_memory(m, T, b=2, bs=4):
"""컨텍스트 T에서 시퀀스 하나가 decode step 사이에 들고 있는 바이트."""
tot = 0.0
for l in m["layers"]:
if l["kind"] == "full": tot += l["n"] * l["kv"] * (l["dk"] + l["dv"]) * T * b
if l["kind"] == "swa": tot += l["n"] * l["kv"] * (l["dk"] + l["dv"]) * min(T, l["W"]) * b
if l["kind"] == "mla_dsa": tot += l["n"] * (l["latent"] + l["idx"]) * T * b
if l["kind"] == "mamba": tot += l["n"] * l["H"] * l["Pd"] * l["N"] * bs
return tot
def step_reads(m, T, b=2, bs=4):
"""decode step마다 시퀀스 하나가 읽는 캐시 바이트 (DSA: indexer key 전부, latent는 top-k)."""
tot = 0.0
for l in m["layers"]:
if l["kind"] in ("full", "swa"): tot += seq_memory(dict(layers=[l]), T, b)
if l["kind"] == "mla_dsa": tot += l["n"] * (l["idx"] * T + l["latent"] * min(T, l["topk"])) * b
if l["kind"] == "mamba": tot += 2 * l["n"] * l["H"] * l["Pd"] * l["N"] * bs
return tot
def step_flops(m, T):
f = 2 * m["A"]
for l in m["layers"]:
if l["kind"] == "full": f += l["n"] * 2 * l["hq"] * (l["dk"] + l["dv"]) * T
if l["kind"] == "swa": f += l["n"] * 2 * l["hq"] * (l["dk"] + l["dv"]) * min(T, l["W"])
if l["kind"] == "mla_dsa": f += l["n"] * (2 * l["idx_h"] * l["idx"] * T + 2 * l["hq"] * (l["latent"] + l["vdim"]) * min(T, l["topk"]))
if l["kind"] == "mamba": f += l["n"] * 6 * l["H"] * l["Pd"] * l["N"]
return f
# (1) 토큰당 KV와 128K / 1M에서의 메모리 -----------------------------------------------------
print(f"{'model':<17}{'KV/token':>10}{'fixed/seq':>11}{'@128K':>10}{'@1M':>10}")
for name, m in MODELS.items():
grow = seq_memory(m, 2 * 2**20) - seq_memory(m, 2**20)
print(f"{name:<17}{grow / 2**20 / 1024:>7.1f}KiB{(seq_memory(m, 2**20) - grow) / 2**20:>8.0f}MiB"
f"{seq_memory(m, 2**17) / 2**30:>7.2f}GiB{seq_memory(m, 2**20) / 2**30:>7.1f}GiB")
# 보고서 리뷰와 대조
oss = seq_memory(MODELS["gpt-oss-120b"], 131072) / 2**30
mimo_allGA = dict(layers=[dict(kind="full", n=48, kv=4, dk=192, dv=128)])
ratio = seq_memory(mimo_allGA, 2**20) / seq_memory(MODELS["MiMo-V2-Flash"], 2**20)
mai1 = dict(layers=[dict(kind="full", n=13, kv=8, dk=128, dv=128), dict(kind="swa", n=65, kv=8, dk=128, dv=128, W=512)])
print(f"\nchecks: gpt-oss @131K {oss:.2f} GiB (review 4.5) | MiMo all-GA/hybrid @1M {ratio:.2f} (48/9 = 5.33)"
f" | MAI @256K Base-1 {seq_memory(mai1, 2**18) / 2**30:.1f} vs Base-2 {seq_memory(MODELS['MAI-Base-2'], 2**18) / 2**30:.1f} GiB (review 13.1 / 4.6)")
# (2) MoE 층·토큰당 all-to-all 원소 수 (dispatch + combine, 상한) ------------------------------
a2a = {"gpt-oss-120b": (4, 2880, None), "MiMo-V2-Flash": (8, 4096, None), "MiniMax-M2": (8, 3072, None),
"GLM-5": (8, 6144, None), "MAI-Base-2": (7, 8704, 4096), "Nemotron-3-Ultra": (22, 8192, 2048)}
print("\nall-to-all elements/token/MoE layer:",
", ".join(f"{n} {2 * k * (l or d) / 1e3:.0f}K" + (f" (no latent: {2 * k * d / 1e3:.0f}K)" if l else "")
for n, (k, d, l) in a2a.items()))
# (3) 배포 비용 모델 (explorer 그림과 같다) ----------------------------------------------------
HBM, BW, FLOPS, EFF = 192e9, 8e12, 2.25e15, 0.5 # 가상의 B200급 GPU (가정)
def deploy(m, T, B, wbits=8, mtp=False, b=2):
tau = m["mtp"] if mtp else 1.0 # step마다 수락되는 토큰
q = m["draft"] + 1 if mtp else 1 # step마다 시퀀스당 검증하는 토큰
mem = seq_memory(m, T, b, 2 * b)
G = int(np.ceil((m["P"] * wbits / 8 + B * mem) / (0.9 * HBM)))
touched = m["A"] + (m["P"] - m["A"]) * (1 - (1 - m["k"] / m["E"]) ** (B * q - 1))
cache = B * step_reads(m, T, b, 2 * b)
nbytes = touched * wbits / 8 + cache
hop = 0.0 if G == 1 else (5e-6 if G <= 8 else 20e-6)
t = max(nbytes / (G * BW), B * q * step_flops(m, T) / (G * FLOPS * EFF)) + m["sub"] * hop
return dict(G=G, tpot=1e3 * t / tau, cost=G * t / (B * tau) * 1e6, share=cache / nbytes)
for target, T, B, key in [("long-context agent", 131072, 64, "cost"), ("low-latency chat", 4096, 1, "tpot"),
("cheap batch", 8192, 256, "cost")]:
print(f"\n{target}: T={T:,}, B={B}, FP8 weights, MTP off, ranked by {key}")
rows = sorted(((deploy(m, T, B), n) for n, m in MODELS.items()), key=lambda r: r[0][key])
for r, n in rows:
print(f" {n:<17} GPUs {r['G']:>2} TPOT {r['tpot']:6.2f} ms GPU-s/1M tok {r['cost']:7.0f} cache {r['share']:4.0%}")세 대조가 리뷰를 재현한다(gpt-oss 131K에서 4.5 GiB, MiMo의 극한 48/9 = 5.33배, MAI 256K에서 13.1 → 4.6 GiB). all-to-all 줄은 MoE 선택들을 한 축에 놓는다. MoE 층·토큰마다 dispatch + combine은 원소 개를 옮긴다(선택된 expert가 모두 다른 장치에 있다고 가정한 상한). LatentMoE 덕분에 Nemotron은 top-22를 360K 대신 90K 원소로, MAI는 top-7을 122K 대신 57K로 돌린다. 폭 6144에서 top-8인 GLM-5는 latent가 없는 설계 중 가장 무겁다. MoE 층 하나가 all-to-all 하나이므로, 층을 줄였다는 GLM의 이유와 맞는다.
같은 해, 반대의 증거
행렬에서 가장 중요한 열은 보고서들이 서로 엇갈리는 열이다. 네 보고서가 full보다 싼 attention을 실험했고 다른 결론에 이르렀다.
| 보고서 | 실험 | 결과 | 결정 |
|---|---|---|---|
| MiMo-V2-Flash | 32B dense, 250B 토큰 → 32K, 같은 SFT. 전부-global 대 SWA(W = 128 / 512) ± sink | SWA-128 + sink ≥ 전부-global: MMLU 58.3 대 57.3, GSM-Inf. 17.3 대 12.3, NoLiMa 51.2 대 49.7, GPQA-D 48.1 대 41.7. RULER-32K 동점(89.4). W = 512는 긴 컨텍스트에서 더 나쁨(NoLiMa 38.5, MRCR 19.6) | 5:1 SWA-128 + sink |
| MiniMax-M2 | M2 규모, 수천억–수조 토큰. hybrid-SWA 변형(비율, RoPE, mixing, sink 토큰) | MMLU/MATH 동일. RULER-128K CWE 90 → 72, MQ 99 → 93. MTOB 번역 15–18점 하락. SFT 후 SWE-verified 54.7 → 50.2, τ²-telecom 32.5 → 21.0 (IFBench와 τ²-retail은 오히려 상승) | full attention |
| GLM-5 | GLM-9B, 128K. 층의 절반을 SWA(교대 또는 탐색한 배치)나 Gated DeltaNet / SimpleGDN으로 | 단순 교대 RULER@128K −30.35. 가장 나은 변형도 “층의 절반이 full attention을 유지해도” RULER 최대 −5.69, RepoQA −7.33 | MLA + DSA (어디든 볼 수 있음) |
| Nemotron (Waleffe 등) | 8B, Mamba-2 하이브리드 대 Transformer, 같은 데이터. 비율·배치 ablation | 약 8% attention에서 loss 최소. 하이브리드가 표준 과제 12개 모두(+2.65)와 MMLU(+3.5)에서 앞섬. 순수 Mamba는 약 500토큰 넘으면 phonebook 실패 | mixer 5–8개당 attention 약 1개 |
gpt-oss는 ablation을 보고하지 않는다. MAI는 scaling ladder의 efficiency gain으로 Gemma 3의 5:1을 채택했고, Base-2 보고서에 긴 컨텍스트 retrieval 비교는 없다.
이것들은 모순이라기보다 서로 다른 실험이다. 규모(9B–32B ablation 대 MiniMax의 실제 규모 실험), window와 전역 경로(MiMo는 128토큰 window에 전용 global 층 9개, GLM은 절반-SWA, MiniMax의 변형은 완전히 명시되지 않음), sink 설계(head별 학습 logit 대 sink 토큰), 무엇보다 평가가 다르다. 모든 보고서에서 짧은 컨텍스트·표준 벤치마크는 거의 움직이지 않고(MiniMax: MMLU 85.5 대 85.6), 손실은 128K retrieval, 긴 in-context learning(MTOB), multi-hop, 저장소 QA, SFT 뒤 agent 과제에서만 나타난다. MiMo의 긴 컨텍스트 증거는 32K(RULER-32K, MRCR)에서 멈추고, MiniMax의 손실은 32K 너머에서 시작한다. 둘 다 옳을 수 있다.
네 보고서를 가로질러 살아남는 것은 짧은 설계 규칙 목록이다. 일부 층에는 정확한 전역 경로를 둔다(모든 설계가 그렇고 크기만 다르다). local 층이 global 역할을 하려 들지 않게 한다(MiMo의 W = 512 결과, GLM의 단순 교대). 그리고 배포 길이에서, 사후학습 뒤에, retrieval 위주·agent 과제로 측정한다. 차이가 드러나는 곳은 거기뿐이다.
KV 그림에서 GLM-5는 'DeepSeek Sparse Attention'을 쓰는데도 128K에서 메모리를 가장 많이 쓰는 모델 축에 남는다. 왜인가?
top-k 선택은 읽는 시점에 일어난다. indexer가 캐시된 토큰 개를 모두 점수화하고(각각 128차원 key를 읽는다) main attention은 선택된 576차원 latent 2,048개만 읽는다. 지워지는 것은 없으므로 저장된 캐시는 여전히 층·토큰마다 이고, 78층 모두에 있다. BF16으로 토큰당 107 KiB다. MLA만 보면 층당으로는 작다(GQA-8×128의 2,048개 대비 576개). 합계가 큰 것은 모든 층이 전역이기 때문이다. 그림을 “읽는 바이트”로 바꾸면 GLM-5가 메모리 선 아래로 내려간다.
MoE, MTP, 정밀도: 조용한 선택들
MoE. 활성 비율은 3–5%에 모이고, top-22인 Nemotron 3 Ultra가 10%로 예외다. 다른 것은 각 랩이 어떤 MoE 비용을 최적화한다고 말하는가다. GLM-5는 all-to-all 횟수(층 수 감소), MAI와 Nemotron은 all-to-all 한 번의 바이트(LatentMoE), MAI는 잘게 쪼갠 expert의 wall-clock 효율(dropless multi-round, 인프라가 따라온 뒤에야 모든 층 MoE), MiniMax는 활성 파라미터당 품질(fine-grained + sigmoid ablation), gpt-oss는 가능한 가장 단순한 배치(expert 128, top-4, shared 없음, 선택된 4개 위의 softmax)다. 여섯 중 셋이 shared expert를 둔다. load balancing과 routing의 세부는 MoE 레슨에 있다.
MTP. 여섯 중 넷이 MTP head를 학습하며, 넷 모두 그것을 사전학습 loss보다 speculative decoding drafter로 설명한다. MiMo는 RL rollout 꼬리를 위해 일부러 가볍게(dense FFN + SWA) 만들었다. GLM-5와 Nemotron은 깊이 사이에 파라미터를 공유해 head 하나가 추론 때 쓰이는 다단계 용도로 학습되게 했다(4 step에서 2.76, draft 7개에서 4.39). MiniMax는 새 모듈을 main 모델 가중치 복사로 초기화해 main 모델을 흔들지 않게 하고, RL 동안에도 함께 학습해 정책이 움직여도 수락률이 떨어지지 않게 한다. 수락 길이는 각 랩의 자체 프롬프트로 잰 값이라 행 사이에 비교할 수 없다.
정밀도. 모든 모델이 적어도 일부를 BF16 아래로 학습하거나 배포하며, 방향은 학습 중에 본 형식의 4비트 가중치다. gpt-oss는 사후학습에서 MoE 가중치를 MXFP4로 양자화했고, MiMo-V2.6은 mid-training부터 MXFP4 QAT로 옮겼고, GLM-5는 학습과 오프라인 양자화가 같은 커널을 쓰는 INT4 QAT를 SFT에서 하고, Nemotron은 NVFP4로 사전학습한다. 제외 목록도 똑같이 일관된다. 공개된 config에서 읽으면 gpt-oss는 attention, router, embedding, LM head를 양자화하지 않고, MiniMax-M2는 gate, expert score bias, LM head를, MiMo는 attention output projection 몇 개를 남기며, Nemotron은 attention과 latent projection을 BF16에, Mamba output projection을 MXFP8에 둔다. 정밀도에 민감한 것은 token mixer와 router이고, 바이트가 몰린 곳은 expert다. 형식은 양자화에서 유도한다.
배포 목표에 따라 고르기
아래 explorer는 NumPy 블록 셋째 부분과 같은 비용 모델을 돌린다. 배포는 가중치와 시퀀스 개의 캐시를 담는 최소 개수의 가상 GPU이고, decode step의 비용은
이다. 마지막 인자는 batch 안의 어떤 토큰이라도 고르는 routed expert의 기대 비율이다. 일부러 거칠게 만들었다. 커널 효율도, overlap도 없고 sharding은 완벽하다고 본다. 그리고 크기가 매우 다른(활성 5B–80B) 모델 전체를 비교하므로, 절대 속도가 아니라 목표마다 어느 항이 지배하는가를 읽자.
What the three targets show (presets; change T and B to see where each regime ends):
- Long-context agent (128K, B = 64). The step is dominated by cache for full attention (MiniMax-M2: 91% of step bytes, 14 GPUs just to hold 64 sequences) and for the 1:1 window (gpt-oss: 75%). The designs that cut the growing term — 5:1 windows, 2 global KV heads, a Mamba state — bring the cache share down to 9–42% and with it the GPU count. Ranked by memory per sequence (attention design alone) the order is Nemotron < MAI < MiMo < gpt-oss < GLM-5 < MiniMax. Turn MTP on: while the step is memory-bound, verifying tokens costs almost the same bytes as verifying one, so the gain approaches the reported accept length. Treat that as an upper bound: the model ignores the draft’s own cost and assumes the accept length measured on each lab’s prompts.
- Low-latency chat (4K, B = 1). Attention type is irrelevant (cache ≤ 10% of bytes); the step is the active-weight read plus communication. gpt-oss wins by a factor of two because 5B active parameters in MXFP4 fit on one GPU, so there is no inter-GPU hop at all — the card’s own reason for MXFP4. A 2.8T-parameter model (MAI-Base-2) needs 17 GPUs and pays cross-node latency on each of its 204 sub-layers.
- Cheap batch inference (8K, B = 256). Every expert is read each step, so total parameters × bits are amortised over the batch and the compute term appears; small total and active win (gpt-oss, MiMo). Dropping weights to 4 bits helps the bandwidth-bound models most. At 8K, full attention still costs MiniMax 70% of its bytes.
No design wins all three. Small active + low-bit weights + MTP is the low-latency recipe; a sub-linear growing cache (windows, few global KV heads, SSM) is the long-context recipe — and the one whose quality needs the most checking; low total parameters per active parameter (high sparsity is a cost at large batch, because every expert is read) is the batch recipe.
MiMo-V2-Flash (5:1 SWA-128 + sink, ablation at 32B up to 32K) and MiniMax-M2 (hybrid-SWA variants failed at scale beyond 32K) reach opposite decisions. Which conclusion does the evidence in this lesson best support?
The experiments differ in scale, window, global path, sink design and evaluation length, and in every report standard short benchmarks are flat while the differences appear in 128K retrieval, long in-context learning and post-SFT agent tasks. MiMo’s long-context evidence stops at 32K, where MiniMax’s losses only begin. Both reports can be right about their own configuration; the transferable rule is to measure where the cost advantage is supposed to pay off. Nemotron’s and GLM’s ablations point the same way: keep an exact global path, and test retrieval at length.
Summary
- Six models, one problem (cheap long-context decode for agents), six answers: 1:1 windows with a sink (gpt-oss), 5:1 tiny windows with a sink (MiMo), 5:1 windows with few global KV heads (MAI), compressed cache + learned top-k reads (GLM-5), a Mamba state with a few GQA anchors (Nemotron), and full attention (MiniMax-M2).
- One formula covers every cache: global layers , windows , SSM constant. Memory, bytes read and mixing FLOPs are different quantities — DSA cuts the last two, not the first. At 128K, per-sequence memory spans 16× (1.9 GiB → 31 GiB).
- On hybrid attention the reports disagree because their experiments differ in scale, window, global path, sink design and evaluation length. What survives: keep an exact global path, keep local layers local, and evaluate at the deployment length on retrieval and agent tasks after post-training.
- MoE choices differ in which cost is targeted (all-to-all count, bytes per all-to-all, wall-clock efficiency, quality per active parameter); MTP is adopted as a drafter by four of six; precision converges on 4-bit weights seen during training, with mixers and routers kept higher.
- For deployment: low-latency chat rewards small active parameters, low-bit weights and MTP; long-context agents reward a sub-linear growing cache (and demand recall checks); cheap batch rewards a small total. No single design wins all three.
세 목표가 보여 주는 것(프리셋 기준. T와 B를 바꿔 각 영역이 어디서 끝나는지 보자):
- 긴 컨텍스트 agent (128K, B = 64). full attention(MiniMax-M2: step 바이트의 91%, 시퀀스 64개를 담는 데만 GPU 14장)과 1:1 window(gpt-oss: 75%)에서는 캐시가 step을 지배한다. 자라는 항을 줄인 설계(5:1 window, global KV head 2개, Mamba state)는 캐시 비율을 9–42%로 낮추고 GPU 수도 함께 줄인다. 시퀀스당 메모리로 순위를 매기면(attention 설계만) Nemotron < MAI < MiMo < gpt-oss < GLM-5 < MiniMax 순이다. MTP를 켜 보자. step이 메모리에 묶여 있는 동안에는 개 토큰을 검증하는 바이트가 하나를 검증할 때와 거의 같으므로, 이득이 보고된 수락 길이에 가까워진다. 이것은 상한으로 읽자. 모델은 draft 자체의 비용을 무시하고, 각 랩이 자기 프롬프트로 잰 수락 길이를 그대로 가정한다.
- 저지연 채팅 (4K, B = 1). attention 종류는 무관하다(캐시는 바이트의 10% 이하). step은 활성 가중치 읽기에 통신을 더한 것이다. gpt-oss가 두 배 차이로 이긴다. MXFP4의 활성 5B가 GPU 한 장에 들어가 GPU 사이 통신이 아예 없기 때문이며, 카드가 MXFP4를 쓴 이유 그대로다. 2.8T 파라미터 모델(MAI-Base-2)은 GPU 17장이 필요하고 sub-layer 204개마다 노드 사이 지연을 낸다.
- 값싼 batch 추론 (8K, B = 256). step마다 모든 expert를 읽으므로 총 파라미터 × 비트가 batch에 나눠지고 연산 항 가 나타난다. 총·활성 파라미터가 작은 쪽(gpt-oss, MiMo)이 이긴다. 가중치를 4비트로 내리면 대역폭에 묶인 모델이 가장 많이 얻는다. 8K에서도 full attention은 MiniMax 바이트의 70%를 차지한다.
셋 모두에서 이기는 설계는 없다. 작은 활성 + 저비트 가중치 + MTP가 저지연 처방이고, 길이에 덜 비례하는 캐시(window, 적은 global KV head, SSM)가 긴 컨텍스트 처방이자 품질 검증이 가장 많이 필요한 처방이며, 활성 파라미터당 총 파라미터가 작은 것(큰 batch에서는 모든 expert를 읽으므로 높은 sparsity가 비용이다)이 batch 처방이다.
MiMo-V2-Flash(5:1 SWA-128 + sink, 32B에서 32K까지 ablation)와 MiniMax-M2(hybrid-SWA 변형이 규모를 키우자 32K 너머에서 실패)는 반대 결정에 이르렀다. 이 레슨의 증거가 가장 잘 뒷받침하는 결론은?
두 실험은 규모, window, 전역 경로, sink 설계, 평가 길이가 다르고, 모든 보고서에서 짧은 표준 벤치마크는 평평한 반면 차이는 128K retrieval, 긴 in-context learning, SFT 뒤 agent 과제에서 나타난다. MiMo의 긴 컨텍스트 증거는 32K에서 멈추고, MiniMax의 손실은 거기서 시작한다. 두 보고서 모두 자기 구성에 대해서는 옳을 수 있다. 옮겨 갈 수 있는 규칙은 비용 우위가 보상받아야 할 곳에서 측정하라는 것이다. Nemotron과 GLM의 ablation도 같은 방향이다. 정확한 전역 경로를 남기고, 길이에서 retrieval을 시험하라.
정리
- 모델 여섯, 문제 하나(agent를 위한 싼 긴 컨텍스트 decode), 답 여섯: sink를 둔 1:1 window(gpt-oss), sink를 둔 5:1 작은 window(MiMo), global KV head가 적은 5:1 window(MAI), 압축 캐시 + 학습된 top-k 읽기(GLM-5), GQA anchor 몇 개를 둔 Mamba state(Nemotron), full attention(MiniMax-M2).
- 모든 캐시를 식 하나로 쓴다. 전역 층은 에, window는 에 비례하고 SSM은 상수다. 메모리, 읽는 바이트, mixing FLOPs는 서로 다른 양이며 DSA는 뒤의 둘을 줄이지 첫째를 줄이지 않는다. 128K에서 시퀀스당 메모리는 16배(1.9 GiB → 31 GiB) 범위에 걸친다.
- hybrid attention에 대해 보고서들이 엇갈리는 것은 실험의 규모, window, 전역 경로, sink 설계, 평가 길이가 다르기 때문이다. 살아남는 것: 정확한 전역 경로를 남기고, local 층은 local에 두고, 사후학습 뒤 배포 길이에서 retrieval·agent 과제로 평가하라.
- MoE 선택은 어떤 비용을 겨냥하는가(all-to-all 횟수, all-to-all당 바이트, wall-clock 효율, 활성 파라미터당 품질)에서 갈리고, MTP는 여섯 중 넷이 drafter로 채택했으며, 정밀도는 학습 중 본 4비트 가중치로 수렴하고 mixer와 router는 더 높게 남긴다.
- 배포: 저지연 채팅은 작은 활성 파라미터, 저비트 가중치, MTP에 보상하고, 긴 컨텍스트 agent는 길이에 덜 비례하는 캐시에 보상하며(그리고 recall 검증을 요구하며), 값싼 batch는 작은 총 파라미터에 보상한다. 셋 모두에서 이기는 단일 설계는 없다.
더 읽을거리Further reading
- OpenAI, gpt-oss-120b & gpt-oss-20b Model Card (arXiv 2508.10925, 2025) — 1:1 window/dense 교대, 학습된 sink, MXFP4 MoE 가중치. 리뷰는 /study/reports/gpt-oss/.1:1 window/dense alternation, learned sink, MXFP4 MoE weights. Review at /study/reports/gpt-oss/.
- Xiaomi LLM-Core, MiMo-V2-Flash Technical Report (arXiv 2601.02780, 2026) — 5:1 SWA-128 + sink bias, 32B ablation, 경량 MTP. V2.6은 HF 저장소의 PDF. 리뷰는 /study/reports/mimo-v2/.5:1 SWA-128 + sink bias, the 32B ablation, light MTP. V2.6 is a PDF in the HF repo. Review at /study/reports/mimo-v2/.
- MiniMax, The MiniMax-M2 Series (arXiv 2605.26494, 2026) — hybrid attention을 버리고 full attention으로 돌아간 세 가지 이유와 Table 2–3. 리뷰는 /study/reports/minimax-m2/.The three reasons for returning to full attention, Tables 2–3. Review at /study/reports/minimax-m2/.
- GLM-5 Team, GLM-5: from Vibe Coding to Agentic Engineering (arXiv 2602.15763, 2026) — MLA + Muon Split, MLA-256, DSA, 9B 효율 attention ablation, 공유 MTP. 리뷰는 /study/reports/glm-5/.MLA + Muon Split, MLA-256, DSA, the 9B efficient-attention ablation, shared MTP. Review at /study/reports/glm-5/.
- Microsoft AI, Frontier Pre-training at Microsoft AI (MAI-Base-2 report, 2026) and MAI-Thinking-1 report — local 5 : global 1, 전역 KV head 2개, LatentMoE, 모든 층 MoE, MXFP8. 리뷰는 /study/reports/mai-base-2/.Local 5 : global 1, 2 global KV heads, LatentMoE, MoE in every layer, MXFP8. Review at /study/reports/mai-base-2/.
- Gemma Team, Gemma 3 Technical Report (arXiv 2503.19786, 2025) — MAI가 그대로 따른 local 5 : global 1 배치의 출처.The source of the local 5 : global 1 layout that MAI follows.
- Hugging Face configs — openai/gpt-oss-120b, XiaomiMiMo/MiMo-V2-Flash, MiniMaxAI/MiniMax-M2, zai-org/GLM-5 — 층 유형 목록, head 수·차원, sink 설정, 체크포인트 양자화 설정을 이 레슨의 계산에 썼다.Layer-type lists, head counts and dims, sink flags and checkpoint quantization settings used in this lesson's calculations.