ICL method for LLM alignment, no tuning required
Top 87.6% on sourcepulse
URIAL (Untuned LLMs with Restyled In-context Alignment) is a tuning-free method for aligning Large Language Models (LLMs) using only in-context learning (ICL). It targets researchers and practitioners seeking to understand and implement LLM alignment without the computational cost of fine-tuning, offering a strong baseline and interpretable approach.
How It Works
URIAL achieves alignment by providing a base LLM with a system prompt and a few (K=1 to 8) stylistic examples within the context window. This approach leverages the LLM's inherent ICL capabilities to guide its behavior, effectively mimicking the outcomes of fine-tuning-based alignment methods with significantly less overhead. The method's advantage lies in its simplicity, speed, and the ability to study alignment phenomena in a controlled, parameter-free manner.
Quick Start & Requirements
conda
for environment setup. Install vllm
and other dependencies via pip install -r requirements.new.txt
.vllm
for efficient inference.src/unified_infer.py
, with example commands provided for AlpacaEval and MT-Bench.CUDA_VISIBLE_DEVICES
and dtype
(e.g., bfloat16
) specified.Highlighted Details
inst_1k_v4
, inst_1k
, inst_2k
, etc.) with varying K-shot examples and token counts.just-eval
library for scoring.src/unified_utils.py
.Maintenance & Community
The project is part of AI2 Mosaic's Re-Align project. The primary contributors are listed in the paper citation. Further community interaction details (e.g., Discord/Slack) are not explicitly mentioned in the README.
Licensing & Compatibility
The repository does not explicitly state a license. The paper is available on arXiv. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
The README indicates that some evaluation content may be outdated and will be updated. The specific performance gains and limitations may vary depending on the base LLM used and the chosen URIAL prompt configuration.
1 year ago
1+ week