Fundamental Limits of Prompt Compression: A Rate-Distortion Framework for Black-Box Language Models
Fuente:
arXiv
Guardado en:
| Autores principales: | , , , , , |
|---|---|
| Formato: | Preprint |
| Publicado: |
2024
|
| Materias: | |
| Acceso en línea: | |
| Etiquetas: |
Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
|
| _version_ | 1866909424127311872 |
|---|---|
| author | Nagle, Alliot Girish, Adway Bondaschi, Marco Gastpar, Michael Makkuva, Ashok Vardhan Kim, Hyeji |
| author_facet | Nagle, Alliot Girish, Adway Bondaschi, Marco Gastpar, Michael Makkuva, Ashok Vardhan Kim, Hyeji |
| contents | We formalize the problem of prompt compression for large language models (LLMs) and present a framework to unify token-level prompt compression methods which create hard prompts for black-box models. We derive the distortion-rate function for this setup as a linear program, and provide an efficient algorithm to compute this fundamental limit via the dual of the linear program. Using the distortion-rate function as the baseline, we study the performance of existing compression schemes on a synthetic dataset consisting of prompts generated from a Markov chain, natural language queries, and their respective answers. Our empirical analysis demonstrates the criticality of query-aware prompt compression, where the compressor has knowledge of the downstream task/query for the black-box LLM. We show that there is a large gap between the performance of current prompt compression methods and the optimal strategy, and propose Adaptive QuerySelect, a query-aware, variable-rate adaptation of a prior work to close the gap. We extend our experiments to a small natural language dataset to further confirm our findings on our synthetic dataset. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2407_15504 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | Fundamental Limits of Prompt Compression: A Rate-Distortion Framework for Black-Box Language Models Nagle, Alliot Girish, Adway Bondaschi, Marco Gastpar, Michael Makkuva, Ashok Vardhan Kim, Hyeji Machine Learning Computation and Language Information Theory We formalize the problem of prompt compression for large language models (LLMs) and present a framework to unify token-level prompt compression methods which create hard prompts for black-box models. We derive the distortion-rate function for this setup as a linear program, and provide an efficient algorithm to compute this fundamental limit via the dual of the linear program. Using the distortion-rate function as the baseline, we study the performance of existing compression schemes on a synthetic dataset consisting of prompts generated from a Markov chain, natural language queries, and their respective answers. Our empirical analysis demonstrates the criticality of query-aware prompt compression, where the compressor has knowledge of the downstream task/query for the black-box LLM. We show that there is a large gap between the performance of current prompt compression methods and the optimal strategy, and propose Adaptive QuerySelect, a query-aware, variable-rate adaptation of a prior work to close the gap. We extend our experiments to a small natural language dataset to further confirm our findings on our synthetic dataset. |
| title | Fundamental Limits of Prompt Compression: A Rate-Distortion Framework for Black-Box Language Models |
| topic | Machine Learning Computation and Language Information Theory |
| url | https://arxiv.org/abs/2407.15504 |