paper-with-me

Papers

Learning to Compress Prompts with Gist Tokens

2023-04-17 · NeurIPS 2023 11 · Jesse Mu, Xiang Lisa Li, Noah Goodman

Prompting is the primary way to utilize the multitask capabilities of language models (LMs), but prompts occupy valuable space in the input context window, and repeatedly encoding the same prompt is computationally inefficient. Finetuning and distillation methods allow for specialization of LMs without prompting, but require retraining the model for each task. To avoid this trade-off entirely, we present gisting, which trains an LM to compress prompts into smaller sets of "gist" tokens which can be cached and reused for compute efficiency. Gist models can be trained with no additional cost over standard instruction finetuning by simply modifying Transformer attention masks to encourage prompt compression. On decoder (LLaMA-7B) and encoder-decoder (FLAN-T5-XXL) LMs, gisting enables up to 26x compression of prompts, resulting in up to 40% FLOPs reductions, 4.2% wall time speedups, and storage savings, all with minimal loss in output quality.

📄 PDF Abstract BibTeX arXiv:2304.08467

Code (1)

jayelm/gisting 공식 구현 pytorch

Tasks

Decoder

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Position-Wise Feed-Forward Layer 설명 없음

Similar Papers 제목 키워드 기반

Say More with Less: Understanding Prompt Learning Behaviors through Gist Compression

2024-02-25 · Xinze Li, Zhenghao Liu, Chenyan Xiong, Shi Yu 외

Large language models (LLMs) require lengthy prompts as the input context to produce output aligned with user intentions, a process that incurs extra costs during inference. In this paper, we propose the Gist COnditioned…

DecoderLanguage ModelingLanguage ModellingPrompt Learning

UniGist: Towards General and Hardware-aligned Sequence-level Long Context Compression

2025-09-19 · Chenlong Deng, Zhisong Zhang, Kelong Mao, Shuaiyi Li 외 arxiv

Large language models are increasingly capable of handling long-context inputs, but the memory overhead of key-value (KV) cache remains a major bottleneck for general-purpose deployment. While various compression strateg…

Simplified Sparse Attention via Gist Tokens

2026-04-22 · Yuzhen Mao, Michael Y. Li, Emily B. Fox arxiv

Sparse attention can reduce the cost of long-context inference, but most variants introduce new architectural components. We introduce Simplified Sparse Attention (SSA), a simpler approach to sparse attention that requir…

ProCut: LLM Prompt Compression via Attribution Estimation

2025-08-04 · Zhentao Xu, Fengyi Li, Albert Chen, Xiaofeng Wang arxiv

In large-scale industrial LLM systems, prompt templates often expand to thousands of tokens as teams iteratively incorporate sections such as task instructions, few-shot examples, and heuristic rules to enhance robustnes…

Token-Efficient Prompt Injection Attack: Provoking Cessation in LLM Reasoning via Adaptive Token Compression

2025-04-29 · Yu Cui, Yujun Cai, Yiwei Wang

While reasoning large language models (LLMs) demonstrate remarkable performance across various tasks, they also contain notable security vulnerabilities. Recent research has uncovered a "thinking-stopped" vulnerability i…