SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.09555 · 2026

Compiler-First State Space Duality and Portable O(1) Autoregressive Caching

Cosmo Santoni

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2603.09555.json · badge: /api/ran/2603.09555.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
CosmoNaught/mamba2-jax community
Papers with Code archive
3 ran · 1 no recorded run
FunctionStatusWhere it lives
_pad_seq_dim Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CosmoNaught/mamba2-jax/mamba2_jax/modeling.py
code served (permissive licence) · get_code("1c1570e713cb8b07")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ArrayImpl, ndim 3, dtype family float, shape (2, 5, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import jax.numpy as jnp
import numpy as np

# Create a small test array with shape (batch=2, seq=3, features=4)
# This will be padded along the sequence dimension (axis=1)
x = jnp.array(np.random.randn(2, 3, 4), dtype=jnp.float32)

# Define pad_size - number of zeros to pad at the end of sequence dimension
pad_size = 2

ARGS = {
    "x": x,
    "pad_size": pad_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 3, dtype family float, shape (2, 5, 4) — shape (2, 5, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
segsum Ran
ran, violated the contract we drafted
CosmoNaught/mamba2-jax/mamba2_jax/modeling.py
code served (permissive licence) · get_code("31f8b1d88653bd4c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ArrayImpl, ndim 2, dtype family float, shape (4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import jax.numpy as jnp
import numpy as np

# Create a small test input tensor
# The function expects input of shape (..., T) and returns (..., T, T)
# Let's create a simple 1D array with T=4 elements
x = jnp.array([1.0, 2.0, 3.0, 4.0])

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (4, 4) — shape (4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ssd_forward Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CosmoNaught/mamba2-jax/mamba2_jax/modeling.py
code served (permissive licence) · get_code("6c01ca80a21a483b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import jax
import jax.numpy as jnp

# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')

# Define small tensor dimensions with distinct sizes
batch_size = 2
seq_len = 8
num_heads = 3
head_dim = 4
state_size = 5
chunk_size = 4

# Create input tensors
x = jnp.ones((batch_size, seq_len, num_heads, head_dim), dtype=jnp.float32)
dt = jnp.ones((batch_size, seq_len, num_heads), dtype=jnp.float32) * 0.1
A = jnp.ones((num_heads,), dtype=jnp.float32) * -0.5
B_mat = jnp.ones((batch_size, seq_len, num_heads, state_size), dtype=jnp.float32)
C_mat = jnp.ones((batch_size, seq_len, num_heads, state_size), dtype=jnp.float32)
D = jnp.ones((num_heads,), dtype=jnp.float32) * 0.1
dt_bias = jnp.ones((num_heads,), dtype=jnp.float32) * 0.01
dt_min = 0.001
dt_max = 0.1

# Optional initial states
initial_states = jnp.ones((batch_size, 1, num_heads, head_dim, state_size), dtype=jnp.float32) * 0.01

ARGS = {
    'x': x,
    'dt': dt,
    'A': A,
    'B_mat': B_mat,
    'C_mat': C_mat,
    'chunk_size': chunk_size,
    'D': D,
    'dt_bias': dt_bias,
    'dt_min': dt_min,
    'dt_max': dt_max,
    'initial_states': initial_states,
    'return_final_states': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_ssd_single_chunk Not yet run
unverified (harvested, no recorded run)
CosmoNaught/mamba2-jax/mamba2_jax/modeling.py
code served (permissive licence) · get_code("e45297636d686a11")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

State-space models (SSMs) such as Mamba-2 are typically released with fused CUDA and Triton kernels, tying practical inference to NVIDIA CUDA devices or separate kernel ports. State space duality (SSD) exposes four compiler-facing properties: a diagonal state matrix, a chunkable recurrence, einsum-dominated compute, and static control flow. Those properties are sufficient for the fusion and tiling passes in XLA (Accelerated Linear Algebra) to produce competitive code without custom kernels. An SSD inference path expressed in standard JAX primitives, with the autoregressive cache registered as a JAX PyTree (a nested container that JAX traces as part of the compiled program), reaches roofline-consistent utilisation on both Google Cloud TPU v6e and NVIDIA L40S from a single source. On TPU v6e, single-stream prefill reaches approximately 140 TFLOPS, or 15% model FLOP utilisation (MFU), the batch-1 roofline ceiling, and cached decode reaches up to 64% hardware bandwidth utilisation (HBU). The same source runs unmodified on NVIDIA L40S, where cached decode throughput is sequence-length independent across all five model scales (130M to 2.7B). WikiText-103 perplexity matches the Triton reference within ±0.0005 points across all five model scales (130M to 2.7B), and hidden states agree to float32 rounding tolerance. The implementation is available at https://github.com/CosmoNaught/mamba2-jax.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2603.09555")
get_code_for_paper("2603.09555")
have("2603.09555")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2603.09555.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2603.09555.svg)](https://syntology.ai/paper/2603.09555)

Connect an agent — have() is free.