| # | Model | Score | Steps | In tok | Out tok | Avg cost | Avg time |
|---|---|---|---|---|---|---|---|
| 1 | GLM-5.3 | 0.8196 ±0.069 | 473 | 213.6M | 614k | $61.42 | 7.6h |
| 2 | Claude Fable 5.1 | 0.8187 ±0.024 | 670 | 287.5M | 1.2M | $171.77 | 8.3h |
| 3 | Kimi K3 | 0.7379 ±0.070 | 627 | 277.1M | 826k | $100.99 | 15.7h |
| 4 | Qwen3.8-Max | 0.7366 ±0.060 | 497 | 163.7M | 1.8M | $52.96 | 18.0h |
| 5 | DeepSeek V4 Flash Exp | 0.7262 ±0.152 | 749 | 295.7M | 756k | $5.25 | 13.5h |
| 6 | Grok 4.6 | 0.6077 ±0.188 | 183 | 42.8M | 659k | $49.33 | 4.0h |
| 7 | GPT-5.6 | 0.5617 ±0.164 | 370 | 104.3M | 241k | $101.96 | 4.5h |
| 8 | Inkling | 0.4710 ±0.430 | 99 | 5.3M | 28k | $5.18 | 1.3h |
| 9 | Gemini 3.7 Flash | 0.3885 ±0.232 | 318 | 99.7M | 538k | $10.96 | 1.5h |
| 10 | Muse Spark 1.2 | 0.3055 ±0.420 | 294 | 83.5M | 532k | $15.81 | 2.2h |
State-space models like Mamba2 replace attention with a recurrent selective-scan, which makes their inference profile very different from a transformer's: long prefill is a chunked parallel scan, while decode is a per-token recurrence over convolution and SSM cache state. Production inference engines squeeze this path with hand-tuned Triton kernels, and the gap between a straightforward eager PyTorch implementation and an optimized one is large.
The workspace is a standalone port of the real Hugging Face GraniteMoeHybridMambaLayer, with weights extracted from the pinned checkpoint ibm-granite/granite-4.0-h-1b-base (layer-0 Mamba weights, final norm, and tied embedding head). Everything runs in bfloat16 on CUDA, which constrains optimization choices such as Triton intrinsics and accumulation precision.
The agent must implement CandidateBlock in /app/src/candidate_impl.py(a stub subclassing the reference is provided) and make the layer's inference path faster without changing its semantics. The performance bar is an optimized implementation built on the same production Triton kernels vendored in /app/vllm_ops/: match it, then beat it.
forward(hidden_states, cache=None, attention_mask=None) signature; the internal cache layout may change as long as the returned cache still exposes conv_state, ssm_state, has_previous_state, and decode-position semantics.torch.compile, Triton, custom CUDA kernels, CUDA streams, and calls into transformers are all allowed. /app/reference_impl.py, /app/task_fixtures.py, and /app/vllm_ops/ must stay untouched; all changes go in the single candidate file.A ready-to-run workspace at /app: the fixed reference port (reference_impl.py, a clean port of the HF torch_forward path that does not call transformers inside the forward), the extracted checkpoint slice in assets/, the vendored vLLM Triton kernels in vllm_ops/ as building blocks, and fixed utilities in task_fixtures.py including the visible correctness and benchmark workloads.
Local loops are provided: verify_api.py checks parity against both the reference and the pinned transformers implementation, and run_dev_bench.py runs a local latency comparison. The hidden optimized baseline itself is not exposed to candidate code. There is no internet access at run time; the image bakes a ready .venv, so uv run --no-sync python ... works offline, and a sandbox-timer CLI reports the remaining budget.
A clean-room verifier runs in a fresh container on the captured /app: it restages pristine copies of the fixed files (task_fixtures.py, reference_impl.py, vllm_ops/) so only the candidate file carries over, then runs a correctness gauntlet followed by a paired GPU benchmark. Candidate code executes only inside an unprivileged worker process; the trusted parent owns workload generation, comparisons, and timing.
transformers implementation on hidden prefill and decode workloads: hidden states, conv and SSM cache states, readout logits, and readout KL divergence. Any failure zeroes the result before performance is considered.| Base image | nvidia/cuda:12.8.1-devel-ubuntu22.04 |
| Tools available | CUDA, PyTorch, C/C++ toolchain, Python 3 |
| Compute | 8 CPUs · 64 GB RAM |
| GPU | 1× B200 |
| Time limit | 20h |
This task is an improved revision of Granite Mamba2 Inference Optimization from FrontierSWE V1.
/appis rescored in a separate pinned container that restages pristine fixed files, with the candidate worker running as an unprivileged user in per-user private IPC directories and a frozen Triton autotune cache, replacing V1's in-place hash checks./app/submission/ tree (helper files allowed) to the single file /app/src/candidate_impl.py, with source scans rejecting references to verifier internals or delegation to the trusted baseline./app/.timer daemon files were replaced by the sandbox-timer CLI./app/vllm_ops/; the hidden optimized baseline calls the same kernels./app/reference_impl.py is a standalone port of the GraniteMoeHybridMambaLayer torch_forward path; the pinned package (4.57.6) is also installed in the image and used as a parity target.mamba-ssm==2.3.1, causal-conv1d==1.6.1) compiled into the image as CUDA extensions the optimized baseline relies on; not vendored.