Streamlining the Collaborative Chain of Models into A Single Forward Pass in Generation-Based Tasks

In Retrieval-Augmented Generation (RAG) and agent-based frameworks, the "Chain of Models" approach is widely used, where multiple specialized models work sequentially on distinct sub-tasks.This approach is effective but increases resource demands as each model must be deployed separately.Recent advancements attempt to address this by applying prompt tuning, which allows a shared base model to adapt to multiple tasks with minimal parameter changes.However, a key challenge remains: intermediate outputs, passed between models as plain text, require recomputation of hidden states (i.e., Key and Value (KV) states in Transformers) during inference.In this paper, we introduce FTHSS, a novel prompt-tuning method that enables models to share KV hidden states, eliminating redundant forward passes and reducing KV cache storage.By modifying input and attention masks during training, FTHSS allows models to effectively utilize KV hidden states from prior models in both singleand multi-round scenarios.Empirical results on four tasks show that FTHSS matches the performance of traditional model chains while improving inference efficiency.

Authors

Institutions

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.findings-acl.330
Primary Topic
Model-Driven Software Engineering Techniques
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Streamlining the Collaborative Chain of Models into A Single Forward Pass in Generation-Based Tasks

Chao Zhang, Yuhao Chen, Yong Chen, Yuanjie Lyu et al.
Model-Driven Software Engineering Techniques
article

Streamlining the Collaborative Chain of Models into A Single Forward Pass in Generation-Based Tasks

Chao Zhang, Yuhao Chen, Yong Chen, Yuanjie Lyu, Tong Xu
article en

Abstract

In Retrieval-Augmented Generation (RAG) and agent-based frameworks, the "Chain of Models" approach is widely used, where multiple specialized models work sequentially on distinct sub-tasks.This approach is effective but increases resource demands as each model must be deployed separately.Recent advancements attempt to address this by applying prompt tuning, which allows a shared base model to adapt to multiple tasks with minimal parameter changes.However, a key challenge remains: intermediate outputs, passed between models as plain text, require recomputation of hidden states (i.e., Key and Value (KV) states in Transformers) during inference.In this paper, we introduce FTHSS, a novel prompt-tuning method that enables models to share KV hidden states, eliminating redundant forward passes and reducing KV cache storage.By modifying input and attention masks during training, FTHSS allows models to effectively utilize KV hidden states from prior models in both singleand multi-round scenarios.Empirical results on four tasks show that FTHSS matches the performance of traditional model chains while improving inference efficiency.

University of Science and Technology of China (CN)
National Natural Science Foundation of China, National Science and Technology Major Project
Openalex Percentile: Top 80%
Model-Driven Software Engineering Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.