In-Context Alignment: Chat with Vanilla Language Models Before Fine-Tuning

Xiaochuang Han
8/8/2023
24 citations
cs.CLcs.AIcs.LG

Official code: xhan77/in-context-alignment (34 stars, Python, last commit 2023-08-09).

Abstract

In this note, we explore inference-time alignment through in-context learning. We consider a vanilla pretrained language model Llama-2 before any fine-tuning and retrieve an average of 9 demonstration alignment examples when the model is prompted to follow chat-style instructions.

Show full abstract

Compared to direct prompting, the in-context alignment without changing model weights leads to a 7x increase in win-rate w.r.t. the text-davinci-003 model from OpenAI, making the vanilla language model comparable to strong baselines with alignment fine-tuning.

View on arXivView PDF

Code Implementations(1)

In-Context Alignment: Chat with Vanilla Language Models Before Fine-Tuning

340PythonAug 9, 20233 years ago

Similar Papers

Cite this paper

@article{han2023incontext,
  title  = {In-Context Alignment: Chat with Vanilla Language Models Before Fine-Tuning},
  author = {Xiaochuang Han},
  year   = {2023},
  eprint = {2308.04275},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2308.04275v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2308.04275.svg)](https://codeofpaper.com/paper/2308.04275)

Discussion