paper-with-me

홈 › Papers

EFIM: Efficient Serving of LLMs for Infilling Tasks with Improved KV Cache Reuse

2025-05-28 · Tianyu Guo, Hande Dong, Yichong Leng, Feng Liu, Cheater Lin, Nong Xiao, Xianwei Zhang

Large language models (LLMs) are often used for infilling tasks, which involve predicting or generating missing information in a given text. These tasks typically require multiple interactions with similar context. To reduce the computation of repeated historical tokens, cross-request key-value (KV) cache reuse, a technique that stores and reuses intermediate computations, has become a crucial method in multi-round interactive services. However, in infilling tasks, the KV cache reuse is often hindered by the structure of the prompt format, which typically consists of a prefix and suffix relative to the insertion point. Specifically, the KV cache of the prefix or suffix part is frequently invalidated as the other part (suffix or prefix) is incrementally generated. To address the issue, we propose EFIM, a transformed prompt format of FIM to unleash the performance potential of KV cache reuse. Although the transformed prompt can solve the inefficiency, it exposes subtoken generation problems in current LLMs, where they have difficulty generating partial words accurately. Therefore, we introduce a fragment tokenization training method which splits text into multiple fragments before tokenization during data processing. Experiments on two representative LLMs show that LLM serving with EFIM can lower the latency by 52% and improve the throughput by 98% while maintaining the original infilling capability.EFIM's source code is publicly available at https://github.com/gty111/EFIM.

📄 PDF Abstract BibTeX arXiv:2505.21889

Code (1)

gty111/efim 공식 구현

Similar Papers 제목 키워드 기반

A Multi-Transformation Evolutionary Framework for Influence Maximization in Social Networks

2022-04-07 · Chao Wang, Jiaxuan Zhao, Lingling Li, Licheng Jiao 외

Influence maximization is a crucial issue for mining the deep information of social networks, which aims to select a seed set from the network to maximize the number of influenced nodes. To evaluate the influence spread …

Fundamentals of RIS-Aided Localization in the Far-Field

2022-06-03 · Don-Roberts Emenonye, Harpreet S. Dhillon, R. Michael Buehrer

This paper develops fundamental bounds for localization in orthogonal frequency division multiplexing (OFDM) systems aided by reconfigurable intelligent surfaces (RISs). Specifically, we start from the assumption that th…

Enabling Autoregressive Models to Fill In Masked Tokens

2025-02-09 · Daniel Israel, Aditya Grover, Guy Van Den Broeck

Historically, LLMs have been trained using either autoregressive (AR) or masked language modeling (MLM) objectives, with AR models gaining dominance in recent years. However, AR models are inherently incapable of masked …

DecoderLanguage ModelingLanguage ModellingMasked Language Modeling

Constrained Decoding of Diffusion LLMs with Context-Free Grammars

2025-08-13 · Niels Mündler, Jasper Dekoninck, Martin Vechev arxiv

Large language models (LLMs) have shown promising performance across diverse domains. Many practical applications of LLMs, such as code completion and structured data extraction, require adherence to syntactic constraint…

Code Completion

KILM: Knowledge Injection into Encoder-Decoder Language Models

2023-02-17 · Yan Xu, Mahdi Namazifar, Devamanyu Hazarika, Aishwarya Padmakumar 외

Large pre-trained language models (PLMs) have been shown to retain implicit knowledge within their parameters. To enhance this implicit knowledge, we propose Knowledge Injection into Language Models (KILM), a novel appro…

DecoderEntity Disambiguation