TokenRouter helps models hand off requests without restarting work
TokenRouter: Efficient Serving System for Token-Level LLM Routing · arXiv:2610.12242
In plain words
A response can move between language models as it is being written, but serving systems built for one model can make those handoffs slow and awkward.
TokenRouter is a serving system that lets developers describe when a request switches models, while its runtime handles the handoff and lets the request resume with its saved state.
In tests at concurrency four, TokenRouter produced output tokens faster than the stronger available baseline in each of 15 routing-algorithm and workload combinations. The size of the gain varied across those combinations.
The research
When a response switches between language models, a serving system designed around one model may delay the request or redo work when it returns. Can a serving system let each model run independently while preserving a request across those handoffs?
TokenRouter separates routing instructions from asynchronous model serving, so requests can switch models and resume without restarting their saved serving work.
The system comparison tested whether TokenRouter’s serving design could handle model switches more efficiently than existing implementations.
At concurrency four, across 15 matched algorithm-workload combinations, it generated output tokens faster than the stronger available baseline for each combination.
A separate R2R check compared the scheduler model’s predicted best batching threshold with hardware measurements. The match at every evaluated concurrency supports using the model to choose thresholds in those tested configurations.
The threshold model assumes routing probabilities stay constant across decoding steps and routing decisions are independent across requests.
Its reported match with measured optimal thresholds is limited to the evaluated R2R configurations and concurrency levels; the authors leave cases that violate the model’s assumptions for future work.
What the evidence shows
- The serving problem
TokenRouter is a serving system for token-level language-model routing: a request can change its target model while a response is being generated.
Existing systems built for serving one model can leave models waiting for each other, delay admitting requests into batches and require developers to modify complex serving code to support these switches.
- Describe each handoff
TokenRouter gives developers three operations to describe a request’s route: choose whether it continues locally or switches models, specify what request state to send, and convert the returning request so decoding can continue.
Its runtime runs a separate subserver for each model and handles the asynchronous handoffs, separating the routing description from the serving machinery.
- Keep work across switches
A request that returns to a model can otherwise be treated as new work, repeating prefix matching and cache allocation. TokenRouter keeps the request’s serving state while it is away, then resumes it when the peer model responds.
In a profile of the standard serving baseline, prefix matching and RadixCache updates accounted for 20.94% and 32.62% of small-model runtime per decoding step, respectively, over the final 128 steps of a 2,048-token generation.
- Compare serving rates
The main comparison tested whether the serving system could improve token generation rates across different routing algorithms and workloads. At concurrency four, TokenRouter’s decoding throughput, measured as generated output tokens divided by elapsed time, was 2.01 to 64.15 times that of the stronger available baseline across 15 algorithm-workload combinations.
Those combinations covered five routing algorithms and three workloads on an eight-GPU A100-80G server.
- Check the scheduler model
The scheduler waits for a model’s queue to reach a threshold before launching a batch, and a mathematical model selects a threshold predicted to maximize long-run committed-token throughput. In a separate check with the R2R two-model algorithm, the predicted best large-model threshold matched the hardware-measured best at every evaluated concurrency. The small-model threshold was fixed at one for that check.
Deep
- Original paper authors
- Tianyu Fu, Tengxuan Liu, Ruoxi Wang, Yixin Dong, Yi Ge
- Submitted to arXiv
- License
- CC BY 4.0