There are two mugs on the table. The instruction names both of them and gives each one a different destination. As the arm moves, its wrist camera will see a different scene. Where can a policy keep a little of what it has already seen? Kyutai’s REKI gives that question a concrete answer in the form of learned registers. I wanted to see which parts of that computation we could follow in C-Kernel-Engine, starting with a single frame that someone else can replay.

What should the robot predict?
Imagine I pause the simulator just before the gripper moves. I give the policy two RGB pictures from that instant, one task instruction, and eight numbers describing the arm. What I want back is a short movement I can try. REKI produces a table with ten rows. The first three entries in a row request a change in end-effector position, the next three request a change in orientation, and the seventh controls the gripper. The model can use the mug colours to choose a movement without ever producing a mug label or a bounding box.
Read the diagram from the two inputs on the left. Pictures and words go through the vision-language backbone. Arm state takes a shorter route into the action expert. Both routes affect the same output. Open Action expert, select Cross-attention, then inspect graph_slots to see where the two routes meet. Released inference contract.
Start with the action calculation
Use a Linux machine with Git, a C compiler called cc and Python 3.11 or newer with venv. In the small example, a test constructs fixed tensors, compiles the CKE graph, warms it, compares its trajectory to PyTorch and changes its state input. The released replay later in the article uses the same test with a bigger geometry and the publisher’s weights. If you already installed CKE for SmolVLA, use that checkout and virtual environment and run just the pytest command.
git clone --filter=blob:none https://github.com/C-Kernel-Engine/C-Kernel-Engine.git
cd C-Kernel-Engine
git checkout --detach afadd2c5e75cced16a95be5cc2499b7b57685538
python3 -m venv .venv
source .venv/bin/activate
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
python -m pip install numpy pytest safetensors jsonschema
python -m pytest -qs \
'tests/test_v8_reki_conditioned_schedule.py::test_generated_reki_conditioning[synthetic]'You should see four errors, one for each small solver step, followed by 1 passed. Those four numbers measure the largest discrepancy in any useful action coordinate at each iteration. On my laptop the largest was about 0.000000060. This checks the assembly of the computation before asking the reader to download a multi-gigabyte checkpoint.
What does a LIBERO observation contain?
The released LIBERO profile is for a simulated Franka arm. It accepts an overhead view, a wrist view, an instruction and eight state measurements. The state consists of three end-effector position coordinates, three orientation coordinates in axis-angle representation and two gripper readings. The reference adapter remaps the state using the profile, converts orientation as specified, and normalizes it for the policy. The output profile describes seven delta end-effector action coordinates. Those coordinates have a different meaning from the SO100 channels in the SmolVLA experiment. The names, units, normalization and control mode are part of the interface to a robot. Inspect the released state and action specification.
| Who computes it? | What crosses the boundary? | What does the next stage do? |
|---|---|---|
| Publisher preprocessing and CPU vision-language model | Two images and instruction → 182 rows of width 2,048 in this packet | The action expert uses these rows to attend to the observed scene and task. The packet also stores the normalized state and rotary position tables. |
| Generated CKE state and time projections | A state vector and a denoising time → scale, shift and gate coefficients | These coefficients condition how the expert transforms its action rows during that step. |
| Generated CKE action expert | 32 register rows plus 10 action rows on the first step, hidden width 768 | Ten layers run attention and feed-forward operations. Later solver steps reuse cached register information. |
| Generated CKE readout and Euler update | 10 future rows, 7 meaningful channels in a 32-wide internal representation | The replay compares normalized coordinates after every solver step. A consuming controller still needs the profile’s inverse transform and actuation convention. |
Where do 182 scene rows come from?
The released policy couples a Qwen3.5-2B backbone to a ten-layer action expert. The backbone configuration has 24 vision blocks and 24 language layers. In our saved packet, each camera has a 1 × 16 × 16 patch grid. The spatial merger combines 2 × 2 patches at a time. That leaves 64 visual rows per camera. Across the two views there are 128 image rows, each 2,048 features wide, embedded in a multimodal sequence of 182 positions. The other 54 positions include the instruction and formatting. The language backbone contextualizes the sequence before the action expert reads it.
That distinction matters for reproducing the run. The capture script uses the released weights to prepare the backbone output on CPU. The CKE test opens the saved hidden tensor with shape [1,182,2048], the state and the rotary tables. Its native timer starts downstream of those two camera encodings. A different instruction can change the sequence length. The training configuration allows up to four cameras; the released LIBERO adapter names two, and this replay exercises exactly those two. Pixel and prompt capture · Backbone layer configuration · REKI training configuration.
Open one transformer layer
At solver time 1.0, the expert has 42 rows of width 768. The first 32 are registers. The other ten are projections of the noisy action rows. Follow a query from future action row zero. In self-attention it can look at all 42 rows, including the other nine proposed moves. A register query can look at the registers, while the range mask hides the noisy action keys from it. That asymmetry is why changing the noise does not require regenerating register memory on every solver pass.
For one head, a query and a key each have 64 features. Their dot product gives a score. Divide by √64 = 8, exclude keys outside the permitted range, and apply softmax across the remaining keys. This gives weights that sum to one. Multiplying those weights by the value rows produces one 64-feature result. In cross-attention, the action query compares against the 182 scene positions. Across twelve heads, the attention output is 768 features wide again. A learned output projection and a gated residual add return it to the action row.
The feed-forward branch acts within each row. Two projections widen 768 features to 3,072. The expert computes SiLU(gate) ⊙ up, projects back to 768, then adds the gated update. Attention lets one row read from other rows; the feed-forward branch changes what its own features encode. Ten layers repeat that sequence with distinct layer weights. The ten solver passes reuse those learned layers. Layer-by-layer PyTorch calculation and mask · Publisher action expert.
Why give an action model registers?
A register here is a learned vector that the transformer can read and write. It occupies a row beside the action rows. At the beginning of this recorded example there are 32 register rows. Attention can transfer information between rows according to the allowed ranges. A later action row can use information carried by a register, even if that information has no obvious interpretation like “the cup is at x.” These learned vectors are distinct from a robotics state estimate with named physical coordinates. Kyutai’s architecture and memory explanation · What a named physical state looks like.
There are two kinds of reuse worth keeping straight. Within this observation, CKE runs the first denoising step with all 42 rows, saves per-layer register keys and values, and reuses them while computing the next nine steps with ten action rows. Across observations, REKI’s design can carry memory forward as the camera view changes. The one-frame released replay checks the first mechanism. A separate reduced CKE regression exercises register carry between two observations. Episode-level memory quality would require a longer recorded sequence and a task benchmark. Register carry regression.
The LIBERO model card specifies a history of three frames spaced one second apart. The publisher policy keeps register memory across successive observations. Frame zero has no prior episode history, so we also ran the small two-observation CKE test, which explicitly supplies the first observation’s register state to the second. Policy reset and observation interface.
How does the measured state change the output?
Think of two otherwise identical observations in which the wrist starts from different positions. In the action graph, a dense projection and GELU transform the state vector. A second projection puts it in the same conditioning space as the encoded solver time. Their sum produces coefficients for the expert layers. For one row y, the final normalization can be read as r = y / √(mean(y²) + ε), followed by r × (1 + scale) + shift. Earlier blocks also use gates to control residual contributions. That is one concrete route from the measured state into every predicted action. The test flips the state, checks for a change in the meaningful channels, then restores the state and recovers the original result.
The action expert uses 12 heads of width 64 and feed-forward width 3,072. Cross-attention reads scene features. Self-attention mixes action and permitted register information. Projections put those results back into the residual stream. Each of ten iterations predicts a change for all ten future rows and integrates it with x_next = x − 0.1 × v. Here v is a velocity in the learned trajectory, so interpreting it as a wrist speed in metres per second would send the wrong quantity to a controller. Channels outside the seven-coordinate action profile are masked on solver input. State, time and schedule builder.
How does noise become a command?
During training, take a demonstrated action chunk A and Gaussian noise E of the same shape. At a sampled time t, construct X(t) = (1 − t)A + tE. At zero we have the demonstration; at one we have noise. The slope of that straight path is E − A. The training target teaches the expert to estimate this velocity from the mixed chunk, time and observation. The learned field averages over plausible actions given what the robot sees. At inference it can start from fresh noise and follow the field toward an action.
In this replay the expert runs at times 1.0, 0.9, …, 0.1. Before each evaluation the circuit masks unused channels. The projected output predicts a velocity for each row. Accumulating it with a negative time step gives the next latent. All ten future rows change together. Publisher training target and sampler · Generated cached schedule.
From a name in the circuit to a C call
I rebuilt the released-profile graph with the same geometry and packing flags as the recorded test. It contains 3,393 ordered calls to 22 kernel providers. Of these, 920 are packed BF16 projections, 200 are range-limited attention calls, and 100 are SwiGLU calls. The latter two counts are easy to predict: two attention branches and one MLP in each of ten layers, evaluated ten times. The inventory in the top diagram lets you select any of the 22 providers and open a real call, its kernel contract and its C implementation.
Take step_0.layers.0.self_attn.v_proj. Its input slot reads the output of step_0.layers.0.self_attn.norm. Its weight binding reads layers.0.self_attn.v_proj.weight. The call multiplies 42 rows of width 768 by a 768-output projection. On the next solver pass there are ten active query rows. The call name changes to identify a different activation, while its weight binding still selects layer zero’s value matrix. The compiler resolves the provider through its kernel map, plans the buffers in an arena and emits the checked native entry ck_reki_conditioned_schedule. Packed projection contract · Checked graph compiler.
from collections import Counter
from version.v8.scripts.build_reki_conditioned_schedule_v8 import build_circuit
import json
graph, config, weights = build_circuit(
10, 10, register_rows=32, prior_rows=0, source_rows=182,
action_width=32, valid_action_width=7, width=768, source_width=2048,
heads=12, inner=3072, rotary_dim=64, layers=10,
packed_projections=True, panel_conditioning=True,
)
calls = graph["block_types"]["block"]["body"]["ops"]
counts = Counter(call["kernel"] for call in calls)
print(len(calls), len(counts)) # 3393 calls, 22 providers
print(json.dumps(next(op for op in calls
if op["id"] == "step_0.layers.0.self_attn.v_proj"), indent=2))Reproduce the recorded action boundary
Use the same virtual environment. The released CPU replay selects an AVX2/FMA build and a packed projection path that requires AVX-512 BF16 hardware; our replay used a Ryzen 9 9950X3D. Allow about 4.5 GiB for the checkpoint plus working memory and build space. Download publisher-reproduced.npz into the CKE root. It contains the fixed reference VLM features and positions. A public checkout includes a capture tool with the exact LIBERO dataset revision, expected observation files and their hashes for researchers reproducing that boundary.
git clone https://github.com/kyutai-labs/reki.git reki-reference
git -C reki-reference checkout --detach 62c9aa5b66ce2353d017148cb53a98cd63298296
model=https://huggingface.co/kyutai/reki-2b-libero/resolve
revision=589bd83a1237d45764fec65830a134ed8a5e3b69
mkdir -p model/reki
curl -fL "$model/$revision/model.safetensors" -o model/reki/model.safetensors
export CK_REKI_REFERENCE="$PWD/reki-reference"
export CK_REKI_LIBERO_CHECKPOINT="$PWD/model/reki/model.safetensors"
# This released layer check works with just the public checkpoint and source.
python -m pytest -qs tests/test_v8_reki_adaptive_norm.py::test_libero_checkpoint_adaptive_norm
curl -fL https://www.antsand.com/uploads/shivasnotes-replays/43754e3947b043cb/publisher-reproduced.npz -o publisher-reproduced.npz
export CK_REKI_LIBERO_RECORDING="$PWD/publisher-reproduced.npz"
CK_NUM_THREADS=4 OMP_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 \
python -m pytest -qs 'tests/test_v8_reki_conditioned_schedule.py::test_generated_reki_conditioning[recorded]'Read the actual output, one row at a time
I captured the final native buffer from the recorded CKE test before its state-perturbation probe. Below are the first seven columns across all ten rows. The horizontal axis advances through proposed control commands. The last gripper coordinate stays close to 1 while several pose channels change substantially. These are normalized model coordinates; the adapter applies the released statistics and rotation convention before the simulator can use them.

Inspect all 70 generated values, rounded to four decimals
| Row | Pos 1 | Pos 2 | Pos 3 | Rot 1 | Rot 2 | Rot 3 | Gripper |
|---|---|---|---|---|---|---|---|
| 0 | -0.1318 | -0.0793 | -0.0040 | -0.0963 | -0.0888 | -0.2024 | 1.0002 |
| 1 | -0.1290 | -0.0995 | -0.0066 | -0.0964 | -0.0864 | -0.2007 | 0.9986 |
| 2 | -0.1295 | -0.1425 | -0.0103 | -0.0939 | -0.0848 | -0.1996 | 0.9989 |
| 3 | -0.1372 | -0.2062 | -0.0167 | -0.0901 | -0.0845 | -0.1988 | 0.9986 |
| 4 | -0.1509 | -0.2996 | -0.0347 | -0.0848 | -0.0861 | -0.1981 | 0.9996 |
| 5 | -0.1620 | -0.3914 | -0.0643 | -0.0833 | -0.0900 | -0.1966 | 1.0001 |
| 6 | -0.1684 | -0.4654 | -0.0956 | -0.0864 | -0.0933 | -0.1962 | 1.0003 |
| 7 | -0.1693 | -0.5168 | -0.1182 | -0.0815 | -0.0949 | -0.1980 | 0.9992 |
| 8 | -0.1649 | -0.5940 | -0.1368 | -0.0158 | -0.0918 | -0.1997 | 1.0003 |
| 9 | -0.1561 | -0.7075 | -0.1478 | 0.1674 | -0.0730 | -0.2010 | 1.0025 |
Read the last decimal, then ask a different question
Our three checks answer different questions. The synthetic schedule checks whether the generated pieces compose on known small tensors. The two-observation regression checks whether cached register rows survive the hand-off. The released replay compares the actual conditioned schedule with an independent calculation at ten solver times × ten future rows × seven active coordinates. It also compares the conditioning projections. Negating the state must change the trajectory, a NaN must return an error while preserving the preceding final buffer, and restoring the state must recover the baseline exactly.
On the four-thread Ryzen replay, the largest absolute error across the ten iterations was 0.001056 in normalized action coordinates. The recorded test accepts up to 0.01. Its warm median across three timed calls was 0.521 seconds for generated C and 0.202 seconds for the cached CPU PyTorch reference. Both timers start with the camera-and-language features ready. Camera processing, checkpoint loading, compiling the graph and robot communication are outside those numbers. The test also compares the conditioning rows before the final action comparisons. Original replay and earlier timing.
On a repeat of the same pinned test with four CPU cores selected, the largest errors after steps 1, 5 and 10 were 0.000232, 0.000448 and 0.001056. The warm medians in this run were 0.323 s for generated C and 0.134 s for the cached CPU reference. The small synthetic and two-observation regressions also passed. Both native timing runs used the same recorded packet; the spread is a reason to keep the machine, thread count and timed boundary beside the measurement.
How often did the mug reach the plate? Kyutai reports 97.6% on its four-suite LIBERO evaluation, and 90.4% overall on its perturbed LIBERO-Plus evaluation. Those are results for the publisher's policies and benchmark protocols. Our observation-level comparison measures numerical agreement. To evaluate a CKE-backed policy as a robot system, I’d first replay several consecutive observations and check state and memory across resets. Then I’d run the same simulator episodes and count completed placements, including wrong-mug and wrong-plate outcomes. That would connect the number in a tensor to what actually happened on the table. Publisher results and benchmark definitions.
The pull requests behind REKI
7 merged PRsTo trace the ten action rows back to code, start with the visibility rules for a single register. The middle group shows where REKI exercised kernels shared with other models. The final two merges show exactly which parts of the recorded observation reached generated C.
Build the action expertFrom register visibility to a reusable action schedule.2 PRs
- PR #1307Which rows can a register see?817341fb
Added conditioned RMS normalization for action rows and checked the attention ranges for register memory. Perturbing hidden rows tested whether information could leak across that boundary. - PR #1310Carry register memory into a second observatione895b841
Connected self-attention, vision-language cross-attention and the feed-forward layers into a shared expert. A two-observation test carried the first frame’s register keys and values into the second. A separate released ten-layer diagnostic still exceeded its tolerance.
Shared CPU kernels checked with REKIProjection and attention changes, with the scope of each regression check.3 PRs
- PR #1380Split packed projections across CPU threadsb1f061c5
Different workers compute different output tiles while preserving each sum’s order. The released one-layer REKI check passed. The optional ten-layer diagnostic failed on both the base and the changed code. - PR #1392Check the same projections with wider CPU lanes370905fa
The AVX-512 path reuses a weight panel across four activation rows. The released one-layer REKI replay returned identical comparison metrics on both builds. It provides a numerical check, not a measured policy speedup. - PR #1403Check attention after vectorizing its inner loops0c767c23
The shared BF16 attention kernel processes independent keys or channels in parallel. REKI was among the consumers used for regression checks. The published speed measurements came from an isolated attention call and Cosmos runs.
Condition the expert and replay a recorded observationFollow the calculation from cached scene features to ten action rows.2 PRs
- PR #1421Generate the conditioning for each denoising step2df415c3
The circuit now calculates state projections, sinusoidal time features and modulation rows before running the expert. With captured vision-language features as input, the replay checked all ten Euler updates against CPU PyTorch. - PR #1424Replay a recorded LIBERO framecebae8cb
The publisher’s CPU vision-language model supplied 182 feature rows from two camera views and an instruction. Starting with those features, generated C produced ten rows of seven action coordinates. The worst difference over ten denoising steps was 0.00106.
Merge dates are in UTC. All entries are included in the CKE revision used for this article’s replay.
For the research context, Kyutai’s REKI paper describes register memory and the experiments. For the engineering context, compare this replay with our SmolVLA two-camera replay. SmolVLA’s generated test starts from prepared camera pixels. The REKI action test starts from cached scene features. Keeping those starting points in view makes the timing and parity results much easier to interpret.
Where to go deeper
- Read the reference math and the generated call side by side. Start at the state projection, follow the modulation rows, then compare the ten latents.
- Explore the recorded LIBERO dataset · Open the released LIBERO model card.
- For the runtime background, read what CKE compiles and why caching changes which matrix operations you pay for.
Lab hardware used in this article
- Ryzen · AMD Ryzen 9 9950X3D workstation
- Zen 5 · 16 cores, 32 threads · 128 MiB L3 · AVX-512 with BF16 and VNNI. Linux reports 150.7 GiB usable RAM. 4 TB NVMe and 12 TB HDD on an ASUS TUF X870E-PLUS WIFI7 board. Ubuntu 26.04 LTS. Lab inventory, 3 December 2026. Earlier runs used different memory configurations.
Comments
Join the conversation. Replies can go three levels deep.