TACO-RL: Task Aware Prompt Compression Optimization with Reinforcement Learning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Shandilya, Shivam, Xia, Menglin, Ghosh, Supriyo, Jiang, Huiqiang, Zhang, Jue, Wu, Qianhui, Rühle, Victor
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912160573030400
author Shandilya, Shivam
Xia, Menglin
Ghosh, Supriyo
Jiang, Huiqiang
Zhang, Jue
Wu, Qianhui
Rühle, Victor
author_facet Shandilya, Shivam
Xia, Menglin
Ghosh, Supriyo
Jiang, Huiqiang
Zhang, Jue
Wu, Qianhui
Rühle, Victor
contents The increasing prevalence of large language models (LLMs) such as GPT-4 in various applications has led to a surge in the size of prompts required for optimal performance, leading to challenges in computational efficiency. Prompt compression aims to reduce the inference cost by minimizing input tokens without compromising on the task performance. However, existing prompt compression techniques either rely on sub-optimal metrics such as information entropy or model it as a task-agnostic token classification problem that fails to capture task-specific information. To address these issues, we propose a novel and efficient reinforcement learning (RL) based task-aware prompt compression method. To ensure low latency requirements, we leverage existing Transformer encoder-based token classification model while guiding the learning process with task-specific reward signals using lightweight REINFORCE algorithm. We evaluate the performance of our method on three diverse and challenging tasks including text summarization, question answering and code summarization. We demonstrate that our RL-guided compression method improves the task performance by 8% - 189% across these three scenarios over state-of-the-art compression techniques while satisfying the same compression rate and latency requirements.
format Preprint
id arxiv_https___arxiv_org_abs_2409_13035
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle TACO-RL: Task Aware Prompt Compression Optimization with Reinforcement Learning
Shandilya, Shivam
Xia, Menglin
Ghosh, Supriyo
Jiang, Huiqiang
Zhang, Jue
Wu, Qianhui
Rühle, Victor
Computation and Language
Machine Learning
The increasing prevalence of large language models (LLMs) such as GPT-4 in various applications has led to a surge in the size of prompts required for optimal performance, leading to challenges in computational efficiency. Prompt compression aims to reduce the inference cost by minimizing input tokens without compromising on the task performance. However, existing prompt compression techniques either rely on sub-optimal metrics such as information entropy or model it as a task-agnostic token classification problem that fails to capture task-specific information. To address these issues, we propose a novel and efficient reinforcement learning (RL) based task-aware prompt compression method. To ensure low latency requirements, we leverage existing Transformer encoder-based token classification model while guiding the learning process with task-specific reward signals using lightweight REINFORCE algorithm. We evaluate the performance of our method on three diverse and challenging tasks including text summarization, question answering and code summarization. We demonstrate that our RL-guided compression method improves the task performance by 8% - 189% across these three scenarios over state-of-the-art compression techniques while satisfying the same compression rate and latency requirements.
title TACO-RL: Task Aware Prompt Compression Optimization with Reinforcement Learning
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2409.13035