Stable Token-level Scheduling for Serverless LLM Inference
Organizations: Cloud & Smart System Services Lab, Department of Computer Science and Engineering, National Institute of Technology Karnataka, Surathkal, India
Abstract
Serverless inference is emerging as an efficient deployment model for Large Language Models (LLMs) due to its ability to elastically scale resources, improve GPU utilization through resource sharing, and reduce infrastructure costs. However, existing approaches primarily optimize time to first token (TTFT) while overlooking inter-token latency (ITL), a key determinant of user experience during response generation. We observe that LLM inference comprises a computation-intensive prefill stage and a bandwidth-bound decode stage, where admitting new requests can disrupt ongoing decoding and increase latency. To address this, we propose Token Window Pacing (TWP), a closed-loop scheduling framework that leverages runtime feedback from ITL, queue depth, and workload characteristics to regulate request admission at the token level instead of the batch level. TWP dynamically adjusts a selfregulating token window and incorporates chunk-based prefill to minimize interference from incoming requests. Experiments on realistic serverless workloads show that TWP delivers stable TTFT, significantly reduces latency spikes, lowers P99 tail latency, minimizes ITL variation, and improves throughput by up to 45% over ServerlessLLM and 58% over conventional schedulers. These results demonstrate that feedback-driven tokenlevel scheduling enables stable, high-throughput serverless LLM inference without modifying the underlying model.
Figures & tables
| Symbol | Meaning |
|---|---|
| Token window at step | |
| Initial token window | |
| Total tokens remaining across active requests | |
| Active batch size | |
| Baseline decode step latency (bandwidth-bound) | |
| Saturation batch size |
| Scheduler | Policy |
|---|---|
| FCFS [ 27 ] | Admit in arrival order; no concurrency bound. |
| Round-Robin [ 28 ] | Route requests to containers in rotation. |
| Priority [ 29 ] | Admit in shortest-prompt-first order. |
| DynamicBatch [ 30 ] | Cap batch size when ITL exceeds a static target threshold; no token-level feedback. |
| ServerlessLLM [ 2 ] | Implemented within our runtime using FCFS-style admission with locality-aware startup scheduling, fast checkpoint loading, and live migration support. |
| Scheduler | Throughput | P99 Latency | TTFT | ITL | CV ITL |
|---|---|---|---|---|---|
| (req/s) | (ms) | (ms) | (ms) | ||
| Low Load | |||||
| FCFS | 363.09 | 2130.93 | 52.99 | 44.29 | 0.0141 |
| DynamicBatch | 363.09 | 2130.93 | 52.17 | 43.26 | 0.0145 |
| Priority | 433.87 | 2134.36 | 52.20 | 43.47 | 0.0142 |
| RoundRobin | 334.48 | 2147.98 | 52.17 | 43.30 | 0.0147 |
LLM Inference Scheduling
Large language model inference scheduling allocates requests, batches, compute, and KV-cache memory to balance latency, throughput, and service-level objectives.
See all 160 papers