- The paper introduces RW-TTT, which formulates LLM serving as a read-write test-time training problem, clearly distinguishing between state READ and WRITE transitions.
- It details a batching planner that groups requests by backend, operator shape, state effect, and version to ensure atomicity and isolation of mutable states.
- Robust evaluations reveal up to 9.31× throughput improvements and validate behavioral correctness through rigorous benchmarks and operator-level optimizations.
RW-TTT: Batched Serving for Request-Owned Test-Time Training State
The deployment of test-time training (TTT) techniques in LLM serving introduces mutable, request-owned model-side state, which fundamentally breaks the shared, static-weight invariant that underpins modern high-throughput serving solutions. Conventional approaches such as vLLM, S-LoRA, and Punica either assume strictly-read-only model parameters or restrict per-request state (e.g., adapters) to immutable during inference. In contrast, TTT implies that streams can both read and update private fast weights, low-rank deltas, or streaming learner state dynamically throughout generation, leading to the need for explicit mechanisms to manage state ownership, versioning, and update atomicity.
To address this, RW-TTT formalizes LLM serving as a read-write TTT serving problem, distinguishing between READ transitions (where request-owned state is applied but not mutated) and WRITE transitions (which commit updates to request state). The system ensures versioned, rollback-safe state management that isolates each request’s mutable context, preventing state leakages and write conflicts in a batched environment. This formulation makes batching non-trivial since requests occupy distinct model state and advance at different rates.
Figure 1: Per-request READ/WRITE semantics illustrating sequential evaluation of the shared model with request-owned, versioned TTT state, supporting version-preserving READ and version-bumping WRITE events.
System Design: RW-TTT Serving Contract and Planner
RW-TTT introduces a serving system that tags every decode step by the request’s identity, the expected version, and the READ/WRITE effect. Legal batches are formed by grouping requests with identical backend type, operator shape, state effect, and version, thereby ensuring semantic correctness and atomicity of owner-specific state transitions.
The key primitives of the serving stack are as follows:
Evaluation: Throughput, Scaling, and Robustness
RW-TTT is evaluated with a Qwen3-4B In-Place-TTT checkpoint in a scenario comprising eight concurrent streams, 4096 prompt tokens, and 512 decode tokens. The scheduler-inclusive aggregate metric provides a hardware-realistic throughput baseline. Sequential execution yields an aggregate of 29.51 tok/s due to the lack of safe batching, and three naive independent batch-1 TTT replicas under a 33 GiB GPU memory budget achieve 79.78 tok/s. RW-TTT demonstrates significant throughput improvements:
Behavioral and Numerical Correctness
The serving contract is validated under the RULER benchmark suite (32K/64K context tasks). RW-TTT exactly preserves adapted model behavior relative to the sequential In-Place TTT path:
- RULER-32K: 76.41 vs. 76.30
- RULER-64K: 67.72 vs. 67.72
Additional validation layers include per-token NLL, PPL agreement across nine configs, and explicit stress injection of state-version or owner mapping faults (all pass). The contract thus ensures both semantic and calibrated numerical preservation, decoupling changes in server-side parallelism from adaptation semantics.
Operator-Level Optimizations
WRITE-side operations in TTT serving, typically the primary bottleneck, were targeted by custom Triton kernels. Microbenchmarking confirms substantial latency reductions: selective commit, dense update, and checkpoint WRITE show up to 3.1×, 2.5×, and 1.2× speedup over PyTorch eager execution, respectively.
Figure 4: WRITE-side operator speedups, measured as kernelized (Triton) vs. PyTorch eager latency, highlighting key state-commit bottlenecks.
Implications and Future Directions
RW-TTT clarifies the distinction between activation-side stateless batching and the new requirements for tracking, versioning, and isolating mutable model-side state across overlapping requests. The serving architecture decouples backend TTT update rules from server-side correctness, making it agnostic to future fast-weight, LoRA-style, or streaming adaptation methods. Immediate practical implications include enabling scalable deployment of online-adaptive LLMs with in-situ adaptation, without requiring full request isolation or incurring unacceptable throughput penalties.
Theoretically, the explicit read-write versioned state management sets the foundation for correctness-preserving speculative execution, fine-grained rollback, and dynamic co-scheduling policies targeting multi-tenant or heterogeneous adaptation backends. Open questions remain regarding phase skew mitigation, state packing for large-scale streaming, cross-request communication, and integration with ultra-long context or cross-modal adaptation strategies.
Conclusion
RW-TTT presents a robust, versioned batching contract and runtime system for request-owned mutable model state, recovering the serving throughput lost by naïve serialization while retaining strict per-request adaptation semantics. This architectural separation allows the serving stack to efficiently host adaptive LLMs using any underlying online update rule, ensuring scalable, correct deployment for next-generation context- or user-adaptive workloads. The design supports immediate application to both fast-weight and LoRA-style TTT, with extension potential for more general learnable stateful inference workflows.