Token Level Routing Inference System for Edge Devices
Jianshu She, Wenhao Zheng, Zhengzhong Liu, Hongyi Wang, Eric Xing, Huaxiu Yao, Qirong Ho
TL;DR
The paper tackles the challenge of running high-quality language inference on edge devices by introducing token-level routing between a fast on-device small language model and a cloud-based large model. It presents two complementary frameworks, CITER and Co-LLM, to learn per-token routing or deferral policies, integrated into a full system with ONNX-based on-device inference and SGLang cloud serving. Empirical results on CommonsenseQA show that routing roughly 7% of tokens to the cloud yields over 60% relative improvement in small-model accuracy while keeping cloud traffic low, demonstrating a practical path to high-quality edge inference. The work highlights the orchestration of multi-round prefilling, stateful routing metadata, and lightweight APIs to enable real-world deployments with privacy-preserving edge execution and scalable cloud assistance.
Abstract
The computational complexity of large language model (LLM) inference significantly constrains their deployment efficiency on edge devices. In contrast, small language models offer faster decoding and lower resource consumption but often suffer from degraded response quality and heightened susceptibility to hallucinations. To address this trade-off, collaborative decoding, in which a large model assists in generating critical tokens, has emerged as a promising solution. This paradigm leverages the strengths of both model types by enabling high-quality inference through selective intervention of the large model, while maintaining the speed and efficiency of the smaller model. In this work, we present a novel collaborative decoding inference system that allows small models to perform on-device inference while selectively consulting a cloud-based large model for critical token generation. Remarkably, the system achieves a 60% performance gain on CommonsenseQA using only a 0.5B model on an M1 MacBook, with under 7% of tokens generation uploaded to the large model in the cloud.
