Papers for

ai service 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.

Selecting key tokens improves long document training for large language models

Which Long Documents Matter? A Controlled Study of Data Selection for Context Extension

Abstract: Natural long documents are widely used for context extension, but which selection pipelines are effective remains unclear. We conduct a controlled comparison on Qwen2.5-3B at 128K under matched 6B-token continued-training budgets. Random sampling of natural long documents (random-long) outperforms repacking at longer evaluation lengths. Within the same candidate pool, selecting documents with high LongPPL key-token density yields further gains, unlike the evaluated generic-quality and LLM-judge selectors. We introduce truncLongPPL to reduce scoring cost by computing key-token density over a truncated prefix. At 128K, scoring the first half of the reference span yields downstream performance close to full-span scoring with a measured $2.28\times$ end-to-end scoring speedup. Across three training seeds, truncLongPPL achieves the highest mean scores among evaluated pipelines, exceeding random-long by 4.54 points on validation HELMET and 3.28 on held-out RULER, with gains most consistent in retrieval. At a 256K target context, it gains 2.82 average RULER points over random-long on Qwen2.5-3B. In short/long mixed training across Qwen2.5-3B, Qwen3-8B, and OLMo~3-7B, it gains 1.47--7.31 average RULER points over random-long mixing, with seven-task short-context averages within 0.23 points of the corresponding baselines. After supervised fine-tuning (SFT), Qwen3-8B and OLMo~3-7B models trained with selected long documents outperform their random-long counterparts by 1.13--1.67 points on LongBench v2 and 0.62--1.44 points on MRCR.

Sat 17 OctComputation and LanguageArtificial Intelligence
The gist
When teaching large language models to understand really long texts, selecting which parts of those texts to use is very important. The authors compared different ways to pick these long documents and found that choosing documents based on a special measure called LongPPL key-token density works better than picking them randomly. They also developed a faster way to calculate this measure that keeps most of the benefits. Models trained with this method performed better on various tests measuring how well they handle long text.
Open → 2610.24469v1

First passage attention improves selective memory in language models

First Passage Attention

Abstract: Augmenting softmax attention with forget gates typically relies on summing decay contributions along the key--query path. Because such accumulation is monotonic, these mechanisms cannot selectively erase intermediate context while preserving older, structurally relevant tokens. We propose First Passage Attention (FPA), which shifts from path summation to path extrema by lowering a key's logit proportionally to the deepest dip of a learned scalar field below that key's level over the intervening span. FPA encompasses the Forgetting Transformer (FoX) as a special case, and when the field and levels follow a shared learned walk, the alive keys with unpenalised logits naturally form a stack. We show that a constant-dimension FPA head realises any subset of keys left alive by subsequent dips, whereas softmax heads with positional biases or token-level forget gates require a head dimension linear in the number of keys. In synthetic experiments, one-layer FPA heads converge to these target sets while comparable softmax and FoX baselines fail on every seed. Scaling to a 110M-parameter language model, FPA matches FoX in perplexity and uniquely achieves perfect passkey retrieval at $8\times$ the training length, even with its key--value cache compressed to about $25\%$.

Thu 15 OctComputation and Language
The gist
Language models read and remember tokens in a sequence, but they usually can't forget unimportant parts selectively while keeping important older information. The authors propose First Passage Attention (FPA), a new method that can better decide which parts of a sequence to keep or forget by looking at dips in a learned signal rather than adding up effects. Their experiments show FPA can remember key tokens longer and more accurately than existing methods, even on long sequences. This makes it promising for building language models that understand and use context more effectively.
Open → 2610.22714v1

Delta Tokenizer speeds up chat input tokenization on multicore CPUs

Delta Tokenizer: Reference-Identical Tokenization of Session Deltas and Segment-Parallelism for Long Prompts on Multicore CPUs

Abstract: An agent that drives an LLM sends the model the same conversation again and again, and each turn adds only a little text at the end. Inference engines reuse the KV cache of the shared prefix, so only the new tokens pass through the model. However, tokenization has no such shortcut. The CPU front end of the serving engine converts every request back into token IDs from its first character, which lengthens the time to first token (TTFT) and consumes CPU on every turn. We present Delta Tokenizer, a CPU tokenization front end that tokenizes only the delta between a request and the previous request of the same session. It retains the earlier token sequence, encodes again only the appended text and the short tail whose tokens the append could affect, and joins the two only at a position the tokenizer's splitting rules themselves cannot move, which keeps the result exact. For long requests with no state to reuse, it cuts the text where practical tokenizers already keep neighboring pieces independent, encodes the pieces on several cores at once, and concatenates the outputs into the reference encoding, exactly. A shared CPU pool schedules these chunks together with the short incremental updates, so an update runs between two chunks rather than behind an entire long job. The incremental path shortens the tokenization of a session turn by roughly 40x relative to the Hugging Face reference tokenizer, and on 16 cores the chunk-parallel path encodes a four-million-character request 8.2x faster than a serial encode and 1.6-2.1x faster than LoPT. Inside SGLang, Delta Tokenizer reduces the median TTFT through the chat interface by 59% at 100K tokens and brings the P99 TTFT of agent sessions down 9.5x under load and 23x when long requests tie up the front end. Every output we checked matches the reference, among them 41.8 billion documents encoded by its fast encoder.

Wed 14 OctComputation and LanguageDistributed, Parallel, and Cluster ComputingPerformance
The gist
When chatting with large language models, computers have to break down the text into tokens every time, which can be slow especially for long conversations. The authors designed Delta Tokenizer, a tool that only processes the new added words instead of the full conversation again, making tokenizing much faster. It also splits long texts into parts and uses many CPU cores to handle them in parallel without changing the token results. This reduces the wait time significantly and works exactly the same as the standard tokenizer but much faster.
Open → 2610.19801v1

Kv repurpose enables flexible reuse of kv cache in large language models

KV-Repurpose: A Testbed for Evaluating Non-Prefix KV-Cache Reuse

Abstract: KV-cache reuse in large language model serving is commonly limited to exact prompt prefixes, preventing reuse when the same retrieved document appears after different system prompts, conversation histories, or dynamic metadata. We present KV-Repurpose, an open-source, vLLM-based system for developing and evaluating segment-wise KV-cache reuse beyond exact prefixes. The system combines cache-aware segment scheduling, prompt construction, capacity management, workload generation, and runtime monitoring. Experiments on long-context benchmarks show that naive segment reuse largely preserves output quality for single-document question answering and summarization, while exposing clear limitations in cross-document reasoning. Under a Zipfian RAG-style workload in which 20% of requests share a fixed prefix, KV-Repurpose achieves a substantially higher token-level cache hit rate than prefix caching at the same 30 GB cache capacity, 63.9% versus 3.3%, resulting in lower TTFT. Even with 1 TB of cache capacity, prefix caching reaches only a 17.9% hit rate in this workload. Source code is available under the Apache-2.0 license at https://github.com/taiga333/eval-kv-repurpose.

Fri 9 OctComputation and Language
The gist
Large language models often save parts of previous computations in a structure called a KV-cache, but usually they can only reuse this cache when the new input starts exactly the same as an old one. The authors created KV-Repurpose, a system that allows reuse of cached parts even when the inputs are not exact matches, like when the same document is asked about after different conversation starters. They show this can greatly increase cache reuse and speed up responses, especially under certain workloads, without much loss in answer quality. However, this method has limits when questions require connecting information across multiple documents.
Open → 2610.13060v1

Lifelong model editing improves knowledge updates in large language models

Generalizable Lifelong Model Editing via Preference Optimization

Abstract: Knowledge editing enables rapid updates of specific factual knowledge in large language models (LLMs) without full retraining. However, more realistic scenarios call for a lifelong framework that handles continual updates rather than one-off modifications. In such settings, existing editing methods often overfit to target prompts, significantly degrading both the generalization of the edited knowledge and the model's general capabilities. To address this issue, we propose GLIME (Generalizable Lifelong Model Editing), which combines knowledge editing with preference optimization over generation behavior. GLIME further incorporates replay-based editing and a gradient constraint to preserve previously edited knowledge. Experimental results show that GLIME significantly improves knowledge generalization in lifelong editing settings while maintaining both editing performance and general capabilities.

Tue 29 SeptArtificial Intelligence
The gist
Large language models sometimes need to update their knowledge quickly, but changing facts over time without retraining the entire model is hard. Existing methods often only work well for one specific question and can forget what they've learned before. The authors developed a method called GLIME that lets models update their knowledge continuously while keeping old updates and general skills intact. GLIME uses techniques to guide the model's behavior so changes apply broadly, not just to one prompt.
Open → 2609.36748v1