ActionCodec2

A Streaming Action Tokenizer

Today’s VLAs act in chunks: plan a second, then go blind. ActionCodec2 gives every control step its own tokens — no neural network, a guaranteed error bound at every step.

Skip to the three-line quickstart ↓

chunked — the robot waits for the whole chunk to decode streaming — one token per control step, run as it arrives
Same task, same VLA. ActionCodec2 (left) is done while FAST and X-Tokenizer are still fumbling. Real robot, 5×. More ↓

01Why streaming

Chunkwise locks; streaming reacts

Chunk tokenizer

Encodes 1–2 s of motion at once. The robot waits for the whole chunk, then runs it open-loop.

Streaming tokenizer

Gives every control step its own tokens. The robot moves as each token lands and can react at any step.

02Covering

Tokenization as a covering problem

Accurate at every step, even on motion never seen in training: the reconstruction stays within ε.

1

One step, one axis. Only the range reachable in one step needs cells.

true actiontokenized actionallowed error ±ε

2

The same step in rotation, with cells covering the ball of reachable turns.

true orientationtokenized orientationallowed error ±ε

3

How few tokens that takes: for a real arm, 400 bins per axis become 17.

per axis · arm range 4 m · ±5 mm tolerance · 15 actions per second · top speed 1.2 m/s

400 → 17bins per axis for a real arm — and 17 is provably the fewest that keep every step within ε

03Set-BPE

Set-BPE: order-free lossless packing

One second of motion starts as 7 tokens per step, 105 in all. Set-BPE merges tokens that occur together, as unordered sets — across axes, then across steps — down to about 9 on average. It is lossless, so the ε bound is untouched, and the stream stays causal: each step runs as soon as its tokens arrive.

One second of a real robot arm, into tokens and back

real motionrebuilt from tokensexecutedone moveone step, several axesseveral steps

8.0–11.9%fewer tokens than order-dependent BPE, on held-out data

Why not learn a VQ codebook instead?

training datatokens per action: fewer → morean action never seen in training

04Universal

One universal tokenizer, at the size and precision you need

Everything above, fitted on data from 24 embodiments and released with 1k to 16k tokens at 1, 5 or 10 mm precision. The default, used in every experiment here, is 4k tokens at 5 mm. No version has weights to train or load, so any autoregressive VLA can adopt one as its action vocabulary.

  1. 01

    20khours

    Data from 24 embodiments

    309M frames in all: 105M end-effector and 204M joint.

  2. 02

    1k–16ktokens

    Universal

    1k, 2k, 4k, 8k or 16k tokens; the default is 4k. Out of distribution it may lose compression, never accuracy.

  3. 03

    0trained weights

    NN-free

    Closed-form covering primitives and exact greedy Set-BPE. No network, no training.

  4. 04

    8.8tokens/s

    Compact

    With the default 4k / 5 mm version, for 15 Hz end-effector motion (10.8 for joints). Set-BPE packs them losslessly, with 11.9% fewer tokens than order-dependent BPE.

  5. 05

    1 / 5 / 10mm

    Bounded tracking error

    At every step of a rollout of any length. The default 5 mm version also bounds rotation to 0.02 rad.

  6. 06

    1step at a time

    Streaming

    Tokens for every control step, so the policy reacts to each new observation instead of waiting for a chunk.

  7. 07

    x−1o

    Physical meaning

    Every token names a motion: x−1o moves 1 cm left with the gripper open, so an agent can write tokens directly.

  8. 08

    drop-in

    Plug and play

    The action vocabulary of any autoregressive VLA. The decoder is stateless, with no weights to load.

  9. 09

    Try it

    On Hugging Face

    All versions on Hugging Face

Three lines to use it. Any robot, any autoregressive VLA.

quickstart.py
import numpy as np
from transformers import AutoProcessor

codec = AutoProcessor.from_pretrained(
    "ZibinDong/ActionCodec2-1st-order",
    trust_remote_code=True,
)

tokens = codec.encode(actions, fps=15)
decoded_actions = codec.decode(tokens, fps=15)

05Benchmarks

State of the art among action tokenizers

One VLA (G0.5), one training recipe; only the action tokenizer changes.

1

Four benchmarks: ActionCodec2 variants take the top places on all four. Axes are zoomed to where the methods differ.

baselines ACodec2 fit to the benchmark ACodec2+ pretrained once ACodec2II fit, second order ACodec2+II pretrained, second order Each axis is zoomed to where the methods differ, so bar lengths are not proportional to the score.
2

On the real robot: zero-shot DROID-Franka rollouts, side by side. Every tokenizer is off the shelf, except X-Tokenizer, which is also fine-tuned on DROID.

0:00 / 0:00
Snack storing and serving. Put the yellow candies and the blue candy on the pink plate, and the cola on the green plate.
0:00 / 0:00
Nested-cup arrangement. Put the blue cup into the pink cup, the two into the yellow cup, then the whole stack onto the green plate.

73.9%average task progress for ACodec2+ across the four suites, vs 50.8 / 52.8 for FAST and X-Tokenizer — and it finishes visibly faster

06RL fine-tuning

RL-friendly: from about 5% to 93% success

PPO on a harder LIBERO-Object: objects and basket re-placed every episode. From about 5% success, ActionCodec2 variants climb to 83–93%. Among the baselines, ACodec comes closest at 91%; FAST, X-Tokenizer and OATaligned level off at 72–78%, and OATofficial never takes off.

Tokenizer

Dashed buttons: learning curve only, no rollout clips.

PPO step

Rolling mean over PPO steps, band ± one rolling std. Click the plot to jump to step 0, 100 or 200.

25 rollouts from one checkpoint, objects re-placed each time; a green check marks a success. At step 0 every policy still drifts left, a habit from standard LIBERO.

07In-chunk feedback

Correcting course inside a chunk

ActionCodec2 decodes step by step, so new observations can enter while a chunk is still being generated. Closed-loop ACodec2+ also reads the measured robot or object state after every executed action; open-loop ACodec2+ and the baselines see it only at the start of each chunk. Three LIBERO suites disturb the robot or the objects in the middle of a chunk, and every policy is trained there with PPO.

Suite

Every object and the basket wander across the table at 0.18–0.30 m/s and turn every 0.25–0.45 s, so the target has moved by the time a chunk ends.

ACodec2+ / closed-loop46.2% grasp rate
bbq sauce✓ success
butter✓ success
ACodec2+ / open-loop27.6% grasp rate
cream cheese✗ failure
orange juice✗ failure
FAST9.2% grasp rate
salad dressing✗ failure
milk✗ failure

Grasp rate averages the ten tasks, 50 fixed seeds each, after 200 PPO iterations; the clips come from the same checkpoints. In these clips, open-loop and FAST execute all 20 actions of each chunk.

46.2%grasp rate under random motion for closed-loop ACodec2+, vs 27.6% open-loop and at most 18.0% for any baseline

08Agents

ActionCodec2 as an agent's interface

What if a VLM agent could write action tokens itself — and pack what works into reusable macros? Every token is a fixed motion with a readable name: x−1o moves 1 cm left, gripper open.

Look up, act, reflect, grow the library

1

Retained macros beat pose commands. With a library that carries over, decisions per submission fall from 17.0 to 8.3 over four rounds, against about 45 for language commands with absolute pose targets.

Three control interfaces for one VLM agent on RMBench. Language commands take about 45 decisions and 1,000 thinking tokens per submission; ActionCodec2 tokens with a retained macro library fall from 17 to 8.3 decisions and from 1,231 to 235 thinking tokens over four rounds while the library grows to 13 macros. On a new task, reusing the 13 macros takes 16 decisions instead of 63 and 2,853 thinking tokens instead of 4,534.
(a) One decision under each interface (illustrative). (b) Four chained rounds of RMBench blocks-try per interface (GPT-6 Astra, low effort). (c) A new block-rearrange task, from scratch vs with the 13 macros (Claude Opus 5.5, low effort).
2

What the agent learned: 13 macros, each named and described in its own words.

Pick any of the 13 macros

head camerawrist camera

duration
times used
tokens
0 s
3

The macros carry over. On a new task: 63 decisions and a failure from scratch, 16 and a success with the macros.

The same new task, run twice

Move the cube between the mats onto the empty mat, press the button once, then move the other cube into the gap.

head cameraleft wristright wrist

One segment per decision; orange segments call a macro.

Thinking

Output

right arm
left arm
4

A long-horizon case study, from scratch: 20 episodes of Multi-Drawer Search on a bimanual robot. The agent explores and fails; each breakthrough becomes new macros. Pick a milestone to replay it.

Nine first-time milestones, replayed

Search two cabinets for a measuring cup and tongs; place each in the red bin, cup first.

Thinking

Macros

Citation

Cite

BibTeX