SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.04275 · 2023

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

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 2 functions out of this paper's own repositories and ran 2 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
xhan77/in-context-alignment canonical 1 of 1
copy not recorded — 1 of 1
FunctionStatusWhere it lives
generate_auto_eval_text Ran xhan77/in-context-alignment/eval_outputs.py
pointer only (licence: NONE) · get_code("6d95fc3a505cef98")
mean_pooling Ran this paper's copy was not recorded; identical code first harvested from chenyiqun/MMOA-RAG
pointer only · get_code("fe0e2df4d9cb5edd")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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. 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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2308.04275")
get_code_for_paper("2308.04275")
have("2308.04275")

Connect an agent — have() is free.