Papers for

ai inference engineers

Papers whose findings have a practical use for this group, as judged from the abstract. Open a paper to read what it means in practice.

Deep learning model over 700 billion parameters runs on 24 GB laptop

DeepInfer-Mac: Running a 750B-Class MoE on a 24 GB Laptop

Abstract: DeepInfer-Mac runs the 750B-class DeepSeek-V4.1-Flash model on a MacBook Air with 24 GB of unified memory. A mixed low-bit conversion occupies 338 GiB on the internal SSD. About 7.6 GiB of weights remain resident; routed experts and Engram rows are loaded when needed. This separation makes the model executable, but it leaves each generated token waiting for a succession of storage reads. We organize expert weights so that reads fill reusable GPU buffers directly, and couple cache allocation with the lifetime of those buffers. In end-to-end runs, the system generates English, Chinese and code at 0.21-0.72 tokens per second, with a largest sampled process footprint of 16.73 GiB across the tested requests. Matched decode comparisons show a 21.0% throughput gain from next-layer prefetching over resident-expert overlap alone, at the cost of additional reads. Longer prompts remain costly. We describe the design, provide the implementation and measurement scripts, and identify the limits of this operating point: a model far larger than memory can run locally, while storage and prefill still govern the user's wait.

Tue 27 OctPerformance
The gist
Running very large AI language models usually needs huge computers with lots of memory. This paper shows how a model with about 750 billion parameters can run on a laptop with only 24 GB of memory by storing most data on the hard drive and loading parts as needed. The authors found ways to organize and load the data efficiently, though it still takes a moment to generate each word. Their work explores how to balance storage limits and speed for large models on small devices.
Open → 2610.36564v1

Multiple megakernels improve streaming inference over single monolithic kernels

One Megakernel is Not Enough: Predicting Where to Cut for Streaming Inference

Abstract: We address a fundamental question: How far should kernel fusion extend and which boundaries are worth preserving? Unlike the general convention of using one monolith megakernel at lower batch sizes or supporting only a selective model component as megakernel and rest of the model as conventional graph, we show that the best configuration is a composition of multiple megakernels with no overlapping conventional graph component, or a fully conventional graph. We present a framework that selects megakernel regions in a streaming inference model from conventional-graph profiles and standalone kernel benchmarks, without running any candidate design end to end. It simulates each candidate's tile and event graphs to predict time to first output and selects the measured best design in all 13 combinations of model and batch size we tested. Across NH-TTS, Qwen3-TTS and Llama-1B, the best composition ranges from two to four megakernels to fully conventional execution and none is a single megakernel. We introduce four model categories (megakernel-stable/ receding/ advancing/ averse) that capture how a model's best megakernel composition changes with batch size. Using NH-TTS model on H100 NVL GPU, we demonstrate that preserving three specialized megakernels can improve both latency and throughput despite introducing additional kernel boundaries. At batch size 32, this design delivers 21.4% lower mean batch-p95 time to first audio (TTFA) and 28% higher throughput than the evaluated monolith megakernel. Against conventional TensorRT graph execution, it reduces engine-level mean batch TTFA p95 by 4.05x and increases throughput by 19.7%.

Mon 26 OctPerformanceDistributed, Parallel, and Cluster ComputingMachine Learning
The gist
When computers process speech or text with AI, they run many small programs called kernels. Usually, people either combine all these kernels into one big program or keep them mostly separate. The authors found that breaking the AI work into a few joined parts, called megakernels, works better than either extreme. Their method predicts which parts should be grouped without testing everything by hand. Using this approach, they made AI systems run faster and produce output sooner on special high-end GPUs.
Open → 2610.35336v1

Adding 2 4 sparsity is less effective than lowering precision for large language models

Is 2:4 Sparsity Still Worth It? Semi-Structured Sparsity versus Quantization in LLM Inference

Abstract: NVIDIA tensor cores have supported 2:4 semi-structured sparsity since Ampere, and the pattern composes with quantization. When the two are combined, the practical question is which step to take next: from a given precision, add 2:4 sparsity or drop to the next lower precision? We compare the two at equal bits, with sparsity metadata counted, and at equal nominal tensor-core tiers, over all six GEMM operands of a transformer layer, with kernels measured on three GPU generations and online pruning and quantization included. Our results show that as long as a lower precision is available, adding 2:4 is the worse step, both less accurate and slower, because the energy that 2:4 discards from each group of four along the hardware-forced axis does not shrink with bits, while quantization error does. Once quantization reaches the lowest precision the hardware supports, 2:4 still speeds up linear layers by 1.3--1.7\x{}, and on an H100 a retrained 2:4 model served in FP8 by vLLM reaches 27\% higher prefill throughput than the dense FP8 model, with GSM8K accuracy on par. Its quality has to be won back by retraining, however, which restores perplexity long before reasoning; on Blackwell, whose sparse FP4 uses a pairwise 4:8 pattern, the loss is larger and our retraining budget did not recover it.

Tue 20 OctMachine LearningPerformance
The gist
The paper explores two ways to make large language models run faster on NVIDIA GPUs: using 2:4 sparsity (dropping half of certain groups of data) and lowering the precision (using fewer bits for numbers). The authors found that lowering precision is usually better than adding 2:4 sparsity because dropping data in 2:4 sparsity doesn’t save as much energy or improve speed compared to reducing precision. However, when the lowest precision is already used, 2:4 sparsity can speed things up, but it usually needs retraining to keep the model accurate. The study tested these methods on different GPUs and layers of transformer models.
Open → 2610.28947v1

Synchronization limits performance in multi-node cpu decoding of ternary models

Weight Placement Is Not Enough: Synchronization in Multi-Node CPU Decoding of Ternary LLMs

Abstract: Ternary LLMs read only a few gigabytes per decoded token, yet on dual-socket servers with four NUMA nodes the fastest ternary runtime we found uses less than half of the memory bandwidth. Placing each weight on the node of the thread that reads it is necessary but not enough: in a decode engine with node-local weights that reuses ik_llama.cpp's kernels, threads on two generations of Xeon servers still spend 20-48% of each token waiting at synchronization points. Per-thread barrier traces show that most of the wait is for the slowest threads of each node; the barriers' own latency (microseconds each, but up to 12% of the token for the smallest model) and serial per-node work are smaller parts. On identical kernels, a Megatron-style column split beats a row-owned split without cross-node reductions in every configuration we measured, and isolating the number of barriers shows that most of its gain comes from its threads waiting less for each other and for their node leaders, and only a minority from having fewer barriers. Where decoding is DRAM-bound, the resulting engine is 1.5-2.1x faster than ik_llama.cpp with all cores and 1.5-1.9x faster than ik_llama.cpp at its fastest thread count (3.2x and 2.8x for a small model that runs from the L3 cache), at the same accuracy and with less energy per token.

Tue 20 OctDistributed, Parallel, and Cluster Computing
The gist
Decoding small ternary language models on powerful servers can be slower than expected because threads often wait for each other. The authors found that simply placing model weights close to the threads that use them is not enough to fix this. They tested different ways to split work among threads and found that one used in Megatron models reduces waiting time between threads, speeding up the process significantly. This improvement doesn't sacrifice accuracy and also uses less energy per word generated.
Open → 2610.28620v1

TideKV reduces memory use for longer AI language model prompts

TideKV: Delayed KV Eviction via Layer-Wise Chunked Prefill for Memory-Efficient Long-Context LLM Inference

Abstract: Long-context large language model (LLM) inference is important for modern intelligent applications but remains constrained by peak memory during prompt prefill. Existing KV cache compression reduces decoding memory but typically requires full-prompt prefill to preserve global context, retaining a high construction peak. Online chunk-level eviction lowers memory earlier but selects before each layer has observed the complete prompt, potentially degrading cache construction and decoding. We present TideKV, an on-GPU cache-construction architecture using layer-major delayed eviction. TideKV processes all prompt chunks within each Transformer layer, retains full-prompt KV only for the active layer, and evicts at layer end. This schedule preserves full-prompt-aware selection while reducing activation and temporary memory. Experiments across multiple computing platforms show that TideKV preserves the inference quality and final cache size of the evaluated compression methods. At 64K on A100, it reduces the construction-time transient footprint by 83.89%. On RTX 4090, it increases time to first token by only 1.06% at 64K and enables 128K prefill. TideKV also completes 128K on Jetson, whereas matched post-prefill compression runs out of memory on both resource-constrained platforms. These results show that delayed layer-end eviction substantially expands feasible context lengths without sacrificing cache utility.

Sat 17 OctMachine LearningDistributed, Parallel, and Cluster Computing
The gist
When large language models read very long texts, they need a lot of memory to remember what they've seen so far. The researchers developed TideKV, a new way to manage this memory use so the model can handle much longer texts without running out of memory. TideKV waits to clear some memory until each layer of the model has fully processed the current chunks, which keeps performance high but uses less memory at peak times. Tests showed it works well on different computer platforms, letting models process longer inputs more efficiently.
Open → 2610.24499v1

Small model steers large model to shorter reasoning chains

DoubtLess: Training-Free Contrastive Decoding for Efficient Reasoning

Abstract: Reasoning models achieve strong performance through long chains of thought (CoT), but often spend more tokens than needed to solve a problem. Existing ways to shorten the CoT require additional training for each model, add a fixed steering vector to the model's hidden states, or use decoding heuristics such as stopping early or banning words like "wait", which can reduce accuracy. We propose DoubtLess, a training-free decoding method in which a much smaller reasoning model steers the large one towards brevity. The small model reads the large model's CoT so far twice, once prompted to be brief (the brief thinker) and once prompted to be verbose (the verbose thinker), and the difference between its two logit vectors, scaled by a strength, is added to the large model's logits at every step of the CoT. On seven benchmarks of competition mathematics, graduate-level science and competitive programming, DoubtLess shortens the CoT of Qwen3-32B by 31% with unchanged accuracy, outperforming five inference-time baselines. We also show that DoubtLess reduces thinking tokens per turn by 20% in a self-debugging coding agent with unchanged task performance. It also generalizes to two other model families with unchanged accuracy. When combined with training-based compression, it further shortens the CoT of a model already trained for brevity. Ablations and behavioral analysis show that DoubtLess reduces repeated checking, with most token savings coming after the correct answer first appears in the CoT. Our code is available at https://github.com/leoluolol/DoubtLess.

Tue 13 OctComputation and LanguageArtificial IntelligenceMachine Learning
The gist
Long reasoning steps in AI models often use more words than needed. The authors propose DoubtLess, a way to make big AI models think more briefly without retraining them. It uses a smaller AI model to compare short and long explanations and adjusts the big model's word choices accordingly. Tests show DoubtLess can make reasoning 31% shorter without losing accuracy in solving math, science, and programming problems.
Open → 2610.18862v1

Frequency step cache speeds up autoregressive video diffusion with better quality

Frequency-Step Cache: Separating Synchronization and Repair for Efficient Autoregressive Video Diffusion

Abstract: Autoregressive (AR) video generation enables long-horizon synthesis but requires repeated forward passes through large diffusion transformers. Training-free caching reduces this cost by reusing intermediate computation, yet existing controllers often couple two decisions: when to synchronize the cache exactly and how much computation to repair between synchronizations. We introduce Frequency-Step Cache (FSC), which separates these roles. FSC schedules exact full-computation anchors on a dense-to-sparse trajectory, while a lightweight latent-space risk based on frequency-resolved drift and token age controls inter-anchor repair through whole-step replay, selective token recomputation, or full repair. On SkyReels-V2, whole-step reuse provides most of the acceleration, while selective token computation is most effective as fidelity repair. A controlled ablation shows that using one reactive signal for both synchronization and repair reduces fidelity at matched latency, with the same separation advantage observed on FramePack and Matrix-Game. Across multiple autoregressive video backbones, FSC improves speed-quality trade-offs. On SkyReels-V2, FSC-Speed reaches 2.36x speedup versus MotionCache's 2.275x while improving SSIM by 0.019 and PSNR by 0.5 dB. At MotionCache-matched speed, FSC-Quality improves SSIM by 0.031 and PSNR by 1.0 dB and lowers LPIPS by 0.024. Without retuning, FSC-Quality transfers to SkyReels-V2 14B at 2.12x speedup versus 1.79x for MotionCache.

Sun 11 OctComputer Vision and Pattern RecognitionMachine Learning
The gist
Autoregressive video generation involves predicting video frames one after another, which can be very slow and computationally expensive. The authors present Frequency-Step Cache (FSC), a new method that cleverly separates when to fully recompute frames and how to fix small errors in between. This separation allows the system to run faster while maintaining or improving video quality compared to previous caching methods. They tested FSC on multiple video datasets and found it improves speed and quality trade-offs consistently.
Open → 2610.15922v1

Speculative decoding training reduces rounds in large language models

Training Parallel Speculative Draft Models by Directly Minimizing Expected Decoding Rounds

Abstract: Speculative decoding accelerates large language model inference by using a low-cost draft model to propose tokens that the full-size target model verifies in parallel. Parallel and semi-autoregressive (semi- AR) drafters improve drafting efficiency by proposing an entire block in a single forward pass, but training them raises a new difficulty: the draft distribution for a given position depends on where the decoding round starts, and where rounds start depends on how many tokens earlier rounds accepted. Existing training objectives typically rely on block-local surrogates that ignore this cross-round coupling, and therefore do not directly optimize the global decoding efficiency. In this work, we develop a theoretical framework for training and evaluating these drafters by representing speculative decoding as a Markov reward process. This formulation yields the Expected Decoding Rounds (EDR) objective, which weights local rejection costs by state occupancies and exactly equals the expected number of decoding rounds. Unlike prior surrogate objectives, EDR introduces no auxiliary hyperparameters. We then derive an exact temporal-difference gradient that supports unbiased stochastic optimization from target-model rollouts. The same framework also yields an exact offline evaluator for round counts, enabling paired drafter comparisons on shared target rollouts without running speculative decoding. Finetuning two state-of-the- art drafters, DSpark and DFly, with EDR consistently improves mean accepted length and outperforms existing training objectives across nine benchmarks spanning math reasoning, code generation, and chat.

Wed 7 OctMachine LearningArtificial IntelligenceComputation and Language
The gist
Making large language models faster can be done by using a smaller model to guess parts of the output quickly, and then checking those guesses with the big model. The authors studied how to train the smaller model better by thinking about the whole guessing and checking process, not just parts of it. They created a new way to measure how well the small model helps reduce the total checking done by the big model. Their method helps train these smaller models to do better at speeding up the bigger models in tasks like math, coding, and chatting.
Open → 2610.10411v1

Efficient kv cache sharing method speeds up multi-lora agent inference

PReCache: Efficient KV Cache Sharing for Multi-LoRA Agents via Low-Rank Precomputation and Neutral Reconstruction

Abstract: Multi-LoRA agent systems enable efficient role specialization by sharing a common backbone model. However, each agent repeatedly processes the growing shared trajectory and constructs its own KV cache, introducing substantial memory and computation redundancy in long-horizon tasks. Existing KV cache sharing methods reduce this repeated prefill, but they either require additional training or architectural constraints or retain substantial model computation. Moreover, direct cache reuse causes the current agent to rely on cache states generated by the previous agent's adapter, weakening the role-specific behavior encoded by its own LoRA. We present PReCache, a training-free KV cache sharing framework with two designs, namely PreLRShared and ReBaseShared, that share the base cache computed using the pretrained weights and precompute a compact agent-specific low-rank (LR) cache. To remove repeated prefill, PreLRShared precomputes each agent's LR cache when the shared context is first processed, allowing the current agent to use its own LR cache without reprocessing context processed by previous agents. To improve sharing accuracy, ReBaseShared reconstructs the shared base cache from adapter-free hidden states, reducing the remaining error caused by the previous agent's adapted representation. To minimize its reconstruction cost, we propose two inference schemes tailored to single-stream inference and concurrent serving, performing the same reconstruction after each agent's turn or alongside its execution, respectively. Across multiple models and agent benchmarks, PreLRShared achieves up to a 3.1x TTFT speedup and a 2.3x improvement in per-request throughput over inference without KV cache sharing. ReBaseShared best preserves accuracy overall among the evaluated cache-sharing methods, with an average drop of only 1.1 points relative to inference without cache sharing.

Mon 28 SeptMachine Learning
The gist
When AI agents share a common large model but have different roles, they each keep their own memory of past steps, which wastes time and memory. The authors propose PReCache, a way to share those memories more efficiently without extra training. PReCache uses a shared base memory with small extra parts customized for each agent, letting each agent skip repeating shared work. Their approach speeds up processing and keeps accuracy close to normal methods.
Open → 2609.34054v1

Improving draft model training to speed up large language model decoding

Acceptance-Aware Draft Model Training for Speculative Decoding

Abstract: Speculative decoding accelerates large language model (LLM) inference by using a lightweight draft model to generate multiple candidate tokens that are verified by the target model in a single forward pass. Its speedup is largely determined by the acceptance length, yet existing draft-model training methods mainly optimize cross-entropy or Kullback-Leibler (KL) divergence as proxies. These objectives encourage distribution matching but do not directly optimize acceptance length, and the acceptance mechanism also differs between greedy and sampling-based decoding. In this work, we propose acceptance-length-aware training losses that directly optimize the expected number of accepted tokens within a speculative window. For greedy verification, we derive an expected accepted length (EAL) loss that explicitly maximizes expected acceptance length. For sampling-based decoding, we introduce a window total variation (WTV) loss that optimizes the overlap between temperature-scaled draft and target distributions while accounting for sequential acceptance dependencies. Both objectives can be further combined with a group-relative reinforcement learning stage (GRPO) using simulated acceptance length as the reward. Experiments across different target and draft models, tasks, and decoding settings show that our losses consistently improve acceptance length over KL-based training. WTV provides particularly strong gains under sampling-based decoding, while EAL better matches greedy verification. These results show that directly optimizing the acceptance objective, with losses tailored to the decoding mode, is more effective than conventional distribution-matching objectives.

Mon 21 SeptMachine Learning
The gist
Large language models can be slowed down because they check each generated word carefully. Speculative decoding uses a quicker model to guess many words at once, which the main model then verifies, making things faster. The authors found that current training methods don’t directly focus on making these guesses accepted more often, which would boost speed. They created new ways to train the quick model to better match what the main model will accept, leading to faster and more efficient language generation.
Open → 2609.24150v1

DeepSeek inference on AMD GPUs improved for speed and accuracy

DeepSeek-V4-Flash on AMD gfx90a: Correctness Recovery and Inference Performance Engineering

Abstract: We present the enablement, correctness recovery, and performance engineering of DeepSeek-V4-Flash inference on AMD Instinct MI250 GPUs using the gfx90a/CDNA2 architecture. The system integrates native safetensors loading, tensor and expert parallelism, FP4 routed mixture-of-experts computation, FP8 dense projections, sparse attention, HIP graph execution, and OpenAI-compatible serving within SGLang. An initially fast execution path was found to be numerically incorrect because of a routed-expert W2 layout mismatch. We identify the output permutation, repair the weight layout at load time, and establish fixed-token and hash-based correctness checks before further optimization. On the corrected path, decode performance is improved through packed FP4 weights, INT8 activation quantization, CDNA2 dot-product instructions, peer-read all-reduce, and topology-aware kernel geometry. Prefill is accelerated using CDNA2 MFMA kernels, improved packed-weight reuse, reduced sparse-attention overhead, larger chunks, and retuned expert sorting. On four MI250 GCDs, TP4/EP1 native autoregressive decode reaches approximately 74.5 tok/s, while a 4,604-token prompt reaches 2.061-2.062 s TTFT, or approximately 2,234 input tok/s. The results show that efficient DeepSeek-V4-Flash inference on CDNA2 is limited not only by memory bandwidth, but also by FP4 execution-format mismatch, low-M utilization, and per-layer synchronization costs.

Mon 14 SeptDistributed, Parallel, and Cluster ComputingHardware ArchitecturePerformance
The gist
Running complex AI models on AMD graphics cards can be tricky because of how the data and calculations are handled. The authors fixed a critical error in how the AI model's pieces fit together, making sure the results are correct. They then made the system run faster by using special ways to pack data and by improving hardware instructions and memory use. This work shows that both memory speed and how data is processed impact the AI’s performance on AMD GPUs.
Open → 2609.15627v1

Boost speeds up language model inference by using both GPU and host memory

BOOST: Concurrent Access to Host Memory and HBM to Accelerate LLM Inference

Abstract: GPU memory bandwidth and capacity limit throughput in large language model (LLM) inference. The GPU memory system consists of a primary tier of high-bandwidth memory (HBM) and a secondary tier of host memory connected via CPU-to-GPU interconnect. Current serving systems treat the tiers hierarchically: they serve exclusively from HBM when data fits, and otherwise prefetch data from host memory to HBM before use. In both cases, the host memory bandwidth is never well utilized. Prefetching expands capacity by utilizing host memory, but consumes HBM bandwidth for writes, reducing the bandwidth available for demand loads. We observe that fully utilizing both host and HBM bandwidth requires each wave of GPU threadblocks to access both tiers concurrently and in proportion to their bandwidth ratio. Existing bandwidth-proportional placement strategies fail to provide concurrency because they are not aware of GPU waves, and the large 2MB GPU page size. This paper presents BOOST, the first runtime system that provides concurrent and proportional access to both GPU memory tiers, extracting the combined bandwidth of host memory and HBM for LLM inference without kernel changes. The key insight in BOOST is to use kernel access patterns to make page allocation and runtime data management wave-aware. For static model weights, BOOST applies modulo-based page placement that eliminates access-ratio variance; for dynamically provisioned attention key-value (KV) pairs, it makes the free KV page pool wave-aware. We integrate BOOST into vLLM and evaluate on a Grace Hopper system. At iso-batch size, BOOST improves Time-per-Output-Token (TPOT) by 4.3% over HBM-only serving, whereas prefetching degrades TPOT by 6%. In high-throughput serving, BOOST improves throughput by 31% on average, outperforming prefetching by 15%.

Fri 11 SeptDistributed, Parallel, and Cluster ComputingHardware ArchitectureMachine Learning
The gist
Large language models often slow down because their data is limited by GPU memory size and speed. The authors found that current methods either only use the fast GPU memory or slow data transfers from the computer’s main memory, which wastes potential speed. They created BOOST, a system that lets many GPU threads use both types of memory efficiently at the same time, improving speed without changing the model itself. This method speeds up token output time and increases overall throughput compared to existing approaches.
Open → 2609.13592v1

Agreement on model answers often stops reasoning too early

Stable Answers, Unfinished Reasoning: Why Self-Consensus Is Not a Safe Early-Exit Signal

Abstract: A natural way to cut reasoning-model inference cost is to repeatedly probe a single partial trajectory for its current answer and stop once probes agree -- self-consensus. We ask whether any such rule is both safe and token-saving, and whether one can be selected once and reused. A preregistered sweep of 3,520 consensus rules, replayed on frozen trajectories from two models and three benchmarks, clears none of three acceptance gates fixed in advance; the frontier reproduces on a held-out split and on two unseen models -- while a boundary-confidence control (DEER) swept through the same pipeline clears all three. The reason lies in the signal: agreement establishes that the current answer persists under a fixed probing procedure, not that the reasoning has terminated -- a consensus-termination gap. Stopping on it commits non-terminal answers. At a rule still saving 32% of the tokens, one stop in nine fires on an answer the trajectory itself later abandons, and most of those stops cut off a correction it would otherwise have made. Widening the agreement window does not remove them: the share levels off near 7%, and by then the saving has fallen to 8%. Probe re-wording and a hand-labelled error taxonomy show the agreed answer is often a placeholder the model had not settled on. Used on its own as the stop signal, agreement fails not because it is insufficiently strict, but because it repeatedly measures the wrong object.

Wed 9 SeptComputation and Language
The gist
Cutting the time it takes for AI to answer questions by stopping when it repeats the same answer seems smart, but this paper shows it is risky. The authors show that just because an AI repeats the same answer several times doesn't mean it has finished thinking; it might change its mind later. They tested many ways to decide when to stop early but none were safe except a method called DEER. So relying on repeated answers alone can cut off important corrections and lead to mistakes.
Open → 2609.09989v1