Open Models Almanac
Methodspost-trainingrollout & RL infrastructure

specific method · filed under post-training

Token-in-Token-out (TITO)

Token-in-Token-out (TITO) is an RL rollout API design in which the training pipeline consumes the exact token IDs and metadata produced by the inference engine instead of finalized text.1 It avoids re-tokenization mismatches in token boundaries, truncation, and special tokens, preserving exact correspondence between sampled actions and what is optimized.2

Trade-off TITO keeps token IDs stable across multi-turn interactions but risks misalignment between RL trajectories and the production chat template.3,4

How this definition was written

Summarised by glm-5.3-flash from 2 sources; every sentence is checked against the quote it cites.

  1. token-in-token-out (TITO) means the training pipeline consumes the exact tokenization and decoded-token stream produced by the inference engine, and uses it directly to build trajectories for learning — GLM-5: from Vibe Coding to Agentic Engineering
  2. re-tokenization can introduce subtle mismatches in token boundaries, whitespace/normalization handling, truncation, or special-token placement — GLM-5: from Vibe Coding to Agentic Engineering
  3. This ensures that token IDs are stable across multi-turn interactions, avoiding mismatches in the token ID representation of model outputs — laguna m1 xs2 technical report
  4. it introduces the possibility of misalignment between the multi-turn trajectories produced by such a system and the chat template used for pro- duction deployments — laguna m1 xs2 technical report

Also called token-in-token-out, token-in, token-out (TITO) API design, Token-in-Token-out Gateway, Token-in-Token-out (TITO) gateway.

sources
2
models
2
labs adopt it
2
strongest
used

Documented in

Poolside
Z.ai (Zhipu AI)

Evidence

3 quotes from 2 sources, one card per model, each opening with its strongest.

How sources treat it
used 3

Laguna-S-2.1

Poolsideadopted1 source

We use a token-in, token-out (TITO) API design for the actors used in our RL training. This ensures that token IDs are stable across multi-turn interactions

usedsoftware implementationin Laguna XS.2Poolside

GLM-5.2

Z.ai (Zhipu AI)adopted1 source

First, a Token-in-Token-out (TITO) gateway eliminates re-tokenization mismatches by preserving exact action-level correspondence.

usedsoftware implementationin GLM-5Z.ai
1 more from this model

token-in-token-out is critical for asynchronous RL training because it preserves exact action-level correspondence

usedsoftware implementationin GLM-5Z.ai
↑