Skip to content
mamba·

Benchmark · run 5fe4bd2a · 2026-08-17

Nine tasks, graded by exit code.

One loop, one prompt, one parser. The backends differ only in the model. Pass and fail are the check command’s exit code, never a reading of the transcript.

Read before the numbers

The cloud lane ran uncapped with three internal retries per step. The self-hosted lane ran at a 512-token output ceiling with one attempt per step. The columns are not apples-to-apples and the self-hosted figure is a lower bound.

Pass rate — 9 execution-graded tasks
Cloud lane9 / 9 · 100%Self-hosted 4B4 / 9 · 44%Stub (control)0 / 8 · 0%

Conditions. Pass/fail is the check command exit code, never a transcript. Cloud lane uncapped with three internal retries per step; self-hosted lane at a 512-token ceiling, one attempt per step — not apples-to-apples, and the self-hosted bar is a lower bound. Single RTX 4000 SFF Ada, 20 GB. Run 5fe4bd2a, 2026-08-17.

Cost per successful task
Cloud lane$0.2268Self-hosted 4B$0.0475 · 4.8× cheaper

Conditions. Total spend divided by tasks that passed: $2.0410 / 9 against $0.1900 / 4. A 4.8× advantage, not the 10.7× raw spend suggests, because five of nine self-hosted attempts produced nothing. Same run and hardware as above; axis scales from zero.

Task × backend

TaskTierCloud laneSelf-hosted 4BStub
t1-file-specT1PASS · 8 sPASS · 634 sFAIL
t1-json-transformT1PASS · 16 sFAIL · 388 sFAIL
t1-py-fibT1PASS · 11 sPASS · 292 sFAIL
t1-rust-addT1PASS · 16 sPASS · 797 sFAIL
t2-lifeos-successrateT2PASS · 19 sFAIL · 1500 s
t2-py-fixbugT2PASS · 15 sFAIL · 300 sFAIL
t2-py-refactorT2PASS · 17 sFAIL · 900 sFAIL
t2-sh-logparseT2PASS · 9 sPASS · 641 sFAIL
t3-py-cli-featureT3PASS · 24 sFAIL · 353 sFAIL
Pass rate9 / 9 · 100%4 / 9 · 44%0 / 8 · 0%

MeasuredLatest run per task, from bench/history.jsonl. Wall-time includes queuing on a single stream; the stub backend is a control that always fails, present to prove the harness grades rather than rewards.

Why the small model fails at depth

A transformer keeps every past token addressable in a KV cache. A state-space model does not — it compresses all history into a fixed-size recurrent state. That is the efficiency win, and it is a lossy channel. In an agent loop context grows monotonically, because every tool result is appended.

A model with a very small attention budget has little addressable memory to fall back on when the recurrent state saturates. The predicted failure is therefore not an invented fact but degradation into incoherence at depth — which from outside looks exactly like a truncated tool call. Ember marks both the attention layers below and the truncation failures above. Same colour, same idea.

NEMOTRON-3-NANO-4B52 layers · depth order →Layer 1: Mamba-2 (SSM)Layer 2: MLP / FFNLayer 3: Mamba-2 (SSM)Layer 4: MLP / FFNLayer 5: Mamba-2 (SSM)Layer 6: MLP / FFNLayer 7: Mamba-2 (SSM)Layer 8: MLP / FFNLayer 9: Mamba-2 (SSM)Layer 10: MLP / FFNLayer 11: Self-attentionLayer 12: MLP / FFNLayer 13: Mamba-2 (SSM)Layer 14: MLP / FFNLayer 15: Mamba-2 (SSM)Layer 16: MLP / FFNLayer 17: Mamba-2 (SSM)Layer 18: MLP / FFNLayer 19: Mamba-2 (SSM)Layer 20: MLP / FFNLayer 21: Self-attentionLayer 22: MLP / FFNLayer 23: Mamba-2 (SSM)Layer 24: MLP / FFNLayer 25: Mamba-2 (SSM)Layer 26: MLP / FFNLayer 27: Mamba-2 (SSM)Layer 28: MLP / FFNLayer 29: Mamba-2 (SSM)Layer 30: MLP / FFNLayer 31: Self-attentionLayer 32: MLP / FFNLayer 33: Mamba-2 (SSM)Layer 34: MLP / FFNLayer 35: Mamba-2 (SSM)Layer 36: MLP / FFNLayer 37: Mamba-2 (SSM)Layer 38: MLP / FFNLayer 39: Mamba-2 (SSM)Layer 40: MLP / FFNLayer 41: Self-attentionLayer 42: MLP / FFNLayer 43: Mamba-2 (SSM)Layer 44: MLP / FFNLayer 45: Mamba-2 (SSM)Layer 46: MLP / FFNLayer 47: Mamba-2 (SSM)Layer 48: MLP / FFNLayer 49: Mamba-2 (SSM)Layer 50: MLP / FFNLayer 51: Mamba-2 (SSM)Layer 52: MLP / FFNMamba-2 (SSM)22 · 42%MLP / FFN26 · 50%Self-attention4 · 8%
IllustrativeIllustrative of the published hybrid pattern — a small attention budget evenly dispersed among Mamba-2/MLP pairs. Not a verified layer map: before this is labelled otherwise, the array must be rebuilt from the model config.

The box these ran on

GPU

RTX 4000 SFF Ada

Memory

20,475 MiB

Served model

nemotron-3-nano:4b

Throughput

18.7 tok/s

Probe · GPU vs wall

0.37 s / 77 s

Fine-tune set

21,087 train / 1,761 val

MeasuredRead from the host on 2026-08-19 with nvidia-smi and ollama list. The 0.37 s GPU / 77 s wall probe is single-stream queuing, not model speed.