Nightjar: Dynamic Adaptive Speculative Decoding for Large Language Models Serving

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Li, Rui, Zhang, Zhaoning, Zhang, Libo, Wang, Huaimin, Fu, Xiang, Lai, Zhiquan
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910038605430784
author Li, Rui
Zhang, Zhaoning
Zhang, Libo
Wang, Huaimin
Fu, Xiang
Lai, Zhiquan
author_facet Li, Rui
Zhang, Zhaoning
Zhang, Libo
Wang, Huaimin
Fu, Xiang
Lai, Zhiquan
contents Speculative decoding (SD) accelerates LLM inference by verifying draft tokens in parallel. However, this method presents a critical trade-off: it improves throughput in low-load, memory-bound systems but degrades performance in high-load, compute-bound environments due to verification overhead. Existing speculative decoding methods use fixed lengths and cannot adapt to workload changes or decide when to stop speculation. The cost of restarting speculative inference also remains unquantified. Under high load, the benefit of speculation diminishes, while retaining the draft model reduces KV-cache capacity, limiting batch size and degrading throughput. To overcome this, we propose Nightjar, a resource-aware adaptive speculative framework. It first adjusts to the request load by dynamically selecting the optimal speculative length for different batch sizes. Crucially, Nightjar proactively disables speculative decoding when the MAB planner determines that speculation is no longer beneficial, and during the disabled phase, offloads the draft model to the CPU only under GPU memory pressure. This reclaims memory for the KV cache, thereby facilitating larger batch sizes and maximizing overall system throughput. Experiments show that Nightjar achieves average 27.29% higher throughput and up to 20.18% lower latency compared to standard speculative decoding under dynamic request arrival rates in real-time LLM serving scenarios.
format Preprint
id arxiv_https___arxiv_org_abs_2512_22420
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Nightjar: Dynamic Adaptive Speculative Decoding for Large Language Models Serving
Li, Rui
Zhang, Zhaoning
Zhang, Libo
Wang, Huaimin
Fu, Xiang
Lai, Zhiquan
Distributed, Parallel, and Cluster Computing
Artificial Intelligence
Speculative decoding (SD) accelerates LLM inference by verifying draft tokens in parallel. However, this method presents a critical trade-off: it improves throughput in low-load, memory-bound systems but degrades performance in high-load, compute-bound environments due to verification overhead. Existing speculative decoding methods use fixed lengths and cannot adapt to workload changes or decide when to stop speculation. The cost of restarting speculative inference also remains unquantified. Under high load, the benefit of speculation diminishes, while retaining the draft model reduces KV-cache capacity, limiting batch size and degrading throughput. To overcome this, we propose Nightjar, a resource-aware adaptive speculative framework. It first adjusts to the request load by dynamically selecting the optimal speculative length for different batch sizes. Crucially, Nightjar proactively disables speculative decoding when the MAB planner determines that speculation is no longer beneficial, and during the disabled phase, offloads the draft model to the CPU only under GPU memory pressure. This reclaims memory for the KV cache, thereby facilitating larger batch sizes and maximizing overall system throughput. Experiments show that Nightjar achieves average 27.29% higher throughput and up to 20.18% lower latency compared to standard speculative decoding under dynamic request arrival rates in real-time LLM serving scenarios.
title Nightjar: Dynamic Adaptive Speculative Decoding for Large Language Models Serving
topic Distributed, Parallel, and Cluster Computing
Artificial Intelligence
url https://arxiv.org/abs/2512.22420