Skip to main content
QUICK REVIEW

[논문 리뷰] Tuning Language Models by Proxy

Alisa Liu, Xiaochuang Han|arXiv (Cornell University)|2024. 01. 16.
Topic ModelingComputer Science인용 수 3
한 줄 요약

이 논문은 가중치에 접근할 수 없는 대규모 언어 모델(LM)을 가중치를 수정하지 않고도 디코딩 시간에 맞춤형으로 설정할 수 있는 경량의 디코딩 기반 방법인 프록시 튜닝을 소개한다. 더 작은 튜닝된 모델을 프록시로 사용하여 기본 모델의 출력을 유도하는 로짓 차이를 적용함으로써, Llama2-70B와 그 직접 튜닝된 채팅 버전 사이의 성능 격차의 88%를 달성하며 지식, 추론, 안전성 벤치마크에서 성능을 확보한다. 또한 직접 튜닝하는 것보다 사실 지식을 더 잘 유지한다.

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.

연구 동기 및 목표

  • 가중치 접근 제한으로 인해 튜닝이 불가능한 대규모 또는 독점적인 언어 모델을 맞춤설정하는 데 도전하는 것.
  • 최소한의 계산 자원으로 대규모 사전학습된 모델을 원하는 행동에 효율적으로 적응시킬 수 있는 방법을 개발하는 것.
  • 대규모 모델의 사실 지식과 일반적 능력을 유지하면서 지시 따르기, 도메인 적응, 작업별 튜닝이 가능하도록 하는 것.
  • 작은 프록시 모델을 통한 추론 시간 가이드라인 제공이 직접 튜닝보다 사실 지식 유지와 성능 면에서 뛰어나다는 것을 입증하는 것.

제안 방법

  • 프록시 튜닝은 더 작은 튜닝된 언어 모델(‘전문가’)과 그 미튜닝된 대응 모델(‘반전문가’)을 사용하여 로짓 차이 벡터를 생성한다.
  • 이 차이 벡터는 디코딩 중에 기반 모델의 로짓에 학습 가능한 오프셋으로 적용되어 출력을 원하는 행동으로 유도한다.
  • 이 방법은 추론 시간에만 작동하며, 기반 모델의 가중치나 하이퍼파라미터를 수정할 필요가 없다.
  • 이 방법은 일반화 가능하며 지시 튜닝, 도메인 적응(예: 코드), 작업별 튜닝(예: 수학, 질의응답) 등에 적용할 수 있다.
  • 옵션으로 런타임 제어 파라미터를 제공하여 가이드라인의 강도를 조절할 수 있어 다양한 생성 속성 간의 트레이드오프를 가능하게 한다.
  • 이 방법은 기반 모델의 출력 확률 분포(로짓)에만 의존하므로 블랙박스 모델에도 적용 가능하다.
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

실험 결과

연구 질문

  • RQ1작고 튜닝된 언어 모델이 훨씬 더 큰, 튜닝되지 않은 언어 모델을 효과적으로 지도하여 하위 작업에서 유사한 성능을 달성할 수 있는가?
  • RQ2프록시 모델을 통한 추론 시간 유도가 직접 튜닝한 대규모 모델보다 더 많은 사실 지식을 유지하는가?
  • RQ3프록시 튜닝이 기반 모델과 직접 튜닝된 모델 간의 성능 격차를 어느 정도 메울 수 있는가?
  • RQ4프록시 튜닝은 지시 따르기, 도메인 특화 적응, 작업별 튜닝 등 다양한 적응 작업에 효과적으로 적용될 수 있는가?
  • RQ5프록시 튜닝의 영향력은 특히 추론과 스타일 생성에서 토큰 수준에서 어떻게 나타나는가?

주요 결과

  • 프록시 튜닝은 지식, 추론, 안전성 벤치마크에서 Llama2-70B와 그 직접 튜닝된 채팅 버전 사이의 성능 격차의 88%를 달성했다.
  • TruthfulQA에서 프록시 튜닝된 모델들은 직접 튜닝된 모델들보다 더 진실성 있는 답변을 보였으며, 사실 지식 유지가 더 우수하다는 것을 시사한다.
  • 지시 튜닝의 경우, 프록시 튜닝은 Llama2-13B와 그 직접 튜닝된 버전 사이의 성능 격차의 91%를 메웠다.
  • 코드 도메인 적응의 경우, CodeLlama-7B 프록시를 사용해 Llama2-13B의 성능이 코딩 벤치마크에서 17%~32% 향상되었다.
  • 질의응답 및 수학 작업별 튜닝의 경우, 프록시 튜닝된 Llama2-70B는 튜닝되지 않은 70B 모델 대비 31%p의 절대적 성능 향상을 보였고, 튜닝된 7B 전문가 모델 대비 11%p 향상되었다.
  • 프록시 튜닝은 추론 및 스타일 토큰(예: 수학 문제의 중간 단계)에 크게 영향을 주었으며, 최종 답변에는 덜 영향을 주어 생성 스타일을 더 강하게 형성하는 것으로 나타났다.
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.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.