Concise and Precise Context Compression for Tool-Using Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Xu, Yang, Feng, Yunlong, Mu, Honglin, Hou, Yutai, Li, Yitong, Wang, Xinghao, Zhong, Wanjun, Li, Zhongyang, Tu, Dandan, Zhu, Qingfu, Zhang, Min, Che, Wanxiang
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914855734214656
author Xu, Yang
Feng, Yunlong
Mu, Honglin
Hou, Yutai
Li, Yitong
Wang, Xinghao
Zhong, Wanjun
Li, Zhongyang
Tu, Dandan
Zhu, Qingfu
Zhang, Min
Che, Wanxiang
author_facet Xu, Yang
Feng, Yunlong
Mu, Honglin
Hou, Yutai
Li, Yitong
Wang, Xinghao
Zhong, Wanjun
Li, Zhongyang
Tu, Dandan
Zhu, Qingfu
Zhang, Min
Che, Wanxiang
contents Through reading the documentation in the context, tool-using language models can dynamically extend their capability using external tools. The cost is that we have to input lengthy documentation every time the model needs to use the tool, occupying the input window as well as slowing down the decoding process. Given the progress in general-purpose compression, soft context compression is a suitable approach to alleviate the problem. However, when compressing tool documentation, existing methods suffer from the weaknesses of key information loss (specifically, tool/parameter name errors) and difficulty in adjusting the length of compressed sequences based on documentation lengths. To address these problems, we propose two strategies for compressing tool documentation into concise and precise summary sequences for tool-using language models. 1) Selective compression strategy mitigates key information loss by deliberately retaining key information as raw text tokens. 2) Block compression strategy involves dividing tool documentation into short chunks and then employing a fixed-length compression model to achieve variable-length compression. This strategy facilitates the flexible adjustment of the compression ratio. Results on API-Bank and APIBench show that our approach reaches a performance comparable to the upper-bound baseline under up to 16x compression ratio.
format Preprint
id arxiv_https___arxiv_org_abs_2407_02043
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Concise and Precise Context Compression for Tool-Using Language Models
Xu, Yang
Feng, Yunlong
Mu, Honglin
Hou, Yutai
Li, Yitong
Wang, Xinghao
Zhong, Wanjun
Li, Zhongyang
Tu, Dandan
Zhu, Qingfu
Zhang, Min
Che, Wanxiang
Computation and Language
Through reading the documentation in the context, tool-using language models can dynamically extend their capability using external tools. The cost is that we have to input lengthy documentation every time the model needs to use the tool, occupying the input window as well as slowing down the decoding process. Given the progress in general-purpose compression, soft context compression is a suitable approach to alleviate the problem. However, when compressing tool documentation, existing methods suffer from the weaknesses of key information loss (specifically, tool/parameter name errors) and difficulty in adjusting the length of compressed sequences based on documentation lengths. To address these problems, we propose two strategies for compressing tool documentation into concise and precise summary sequences for tool-using language models. 1) Selective compression strategy mitigates key information loss by deliberately retaining key information as raw text tokens. 2) Block compression strategy involves dividing tool documentation into short chunks and then employing a fixed-length compression model to achieve variable-length compression. This strategy facilitates the flexible adjustment of the compression ratio. Results on API-Bank and APIBench show that our approach reaches a performance comparable to the upper-bound baseline under up to 16x compression ratio.
title Concise and Precise Context Compression for Tool-Using Language Models
topic Computation and Language
url https://arxiv.org/abs/2407.02043