Skip to main content
QUICK REVIEW

[Paper Review] Tuning Language Models by Proxy

Alisa Liu, Xiaochuang Han|arXiv (Cornell University)|Jan 16, 2024
Topic ModelingComputer Science3 citations
TL;DR

This paper introduces proxy-tuning, a lightweight decoding-time method that customizes large language models (LLMs) without accessing their weights by using a smaller, tuned model as a proxy. By applying the logit difference between the proxy's tuned and untuned outputs to steer the base model, it achieves 88% of the performance gap between Llama2-70B and its directly fine-tuned chat version across knowledge, reasoning, and safety benchmarks, while preserving factual knowledge better than direct tuning.

ABSTRACT

Despite the general capabilities of large pretrained language models, they consistently benefit from further adaptation to better achieve desired behaviors. However, tuning these models has become increasingly resource-intensive, or impossible when model weights are private. We introduce proxy-tuning, a lightweight decoding-time algorithm that operates on top of black-box LMs to achieve the same end as direct tuning, but by accessing only its predictions over the output vocabulary, not its parameters. Our method tunes a smaller LM, then applies the difference between the predictions of the small tuned and untuned LMs to shift the original predictions of the larger untuned model in the direction of tuning, while retaining the benefits of larger-scale pretraining. In experiments, when we apply proxy-tuning to Llama2-70B using proxies of only 7B size, we can close 88% of the gap between Llama2-70B and its truly-tuned chat version, when evaluated across knowledge, reasoning, and safety benchmarks. We then demonstrate the generality of proxy-tuning by applying it to domain adaptation on code, and task-specific finetuning on question-answering and math problems. Finally, we show how to proxy-tune a truly black-box LM, GPT-3.5, for temporal adaptation, increasing its knowledge about recent events. Our work demonstrates the promise of using small tuned LMs to efficiently customize large, potentially proprietary LMs through decoding-time guidance.

Motivation & Objective

  • To address the challenge of customizing large, potentially proprietary language models that cannot be fine-tuned due to weight access restrictions.
  • To develop a method that efficiently adapts large pretrained models to desired behaviors using minimal computational resources.
  • To preserve the factual knowledge and general capabilities of large models while enabling instruction-following, domain adaptation, and task-specific tuning.
  • To demonstrate that decoding-time guidance via a small proxy model can outperform direct fine-tuning in knowledge retention and performance.

Proposed method

  • Proxy-tuning uses a smaller, fine-tuned language model (the 'expert') and its untuned counterpart (the 'anti-expert') to generate a logit difference vector.
  • This difference vector is applied as a learnable offset to the logits of the large base model during decoding, steering its output toward the desired behavior.
  • The method operates entirely at inference time, requiring no updates to the base model's weights or hyperparameters.
  • The approach is generalizable and can be applied to instruction tuning, domain adaptation (e.g., code), and task-specific fine-tuning (e.g., math, QA).
  • An optional runtime control parameter allows users to tune the strength of guidance, enabling trade-offs between different generation attributes.
  • The method relies only on the output probability distributions (logits) of the base model, making it applicable to black-box models.
Figure 1: Proxy-tuning “tunes” a large pretrained model without accessing its internal weights, by steering it using an “expert” (a small tuned model) and its corresponding “anti-expert” (the small model, untuned). The difference between the predicted logits of the expert and the anti-expert is appl
Figure 1: Proxy-tuning “tunes” a large pretrained model without accessing its internal weights, by steering it using an “expert” (a small tuned model) and its corresponding “anti-expert” (the small model, untuned). The difference between the predicted logits of the expert and the anti-expert is appl

Experimental results

Research questions

  • RQ1Can a small, fine-tuned language model effectively guide a much larger, untuned language model to achieve comparable performance on downstream tasks?
  • RQ2Does decoding-time steering via a proxy model preserve more factual knowledge than direct fine-tuning of large models?
  • RQ3To what extent can proxy-tuning close the performance gap between a large base model and its directly fine-tuned counterpart?
  • RQ4Can proxy-tuning be effectively applied to diverse adaptation tasks, including instruction following, domain-specific adaptation, and task-specific fine-tuning?
  • RQ5How does the influence of proxy-tuning manifest at the token level, particularly in reasoning and stylistic generation?

Key findings

  • Proxy-tuning achieved 88% of the performance gap between Llama2-70B and its directly fine-tuned chat version on knowledge, reasoning, and safety benchmarks.
  • On TruthfulQA, proxy-tuned models were more truthful than directly fine-tuned models, suggesting better preservation of factual knowledge.
  • For instruction tuning, proxy-tuning closed 91% of the performance gap between Llama2-13B and its directly fine-tuned version.
  • In code domain adaptation, proxy-tuning improved Llama2-13B by 17%–32% on coding benchmarks using a CodeLlama-7B proxy.
  • For task-specific fine-tuning on QA and math, proxy-tuned Llama2-70B achieved a 31% absolute improvement over the untuned 70B model and a 11% improvement over the tuned 7B expert.
  • Proxy-tuning significantly influenced reasoning and stylistic tokens (e.g., intermediate steps in math problems), while having less impact on final answers, indicating it shapes generation style more than knowledge.
Figure 2: The percentage of responses to TruthfulQA which are informative or true, when varying $\alpha$ in $s_{\mathcal{M}}+\alpha(s_{\mathcal{M^{+}}}-s_{\mathcal{M^{-}}})$ . We observe that $\alpha$ smoothly trades off between these two metrics.
Figure 2: The percentage of responses to TruthfulQA which are informative or true, when varying $\alpha$ in $s_{\mathcal{M}}+\alpha(s_{\mathcal{M^{+}}}-s_{\mathcal{M^{-}}})$ . We observe that $\alpha$ smoothly trades off between these two metrics.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.