Lune

ACL2025Top-tier venue

Nudging: Inference-time Alignment of LLMs via Guided Decoding

Yu Fei, Yasaman Razeghi, Sameer Singh

Abstract

Large language models (LLMs) require alignment to effectively and safely follow user instructions. This process necessitates training an aligned version for every base model, resulting in significant computational overhead. In this work, we propose NUDGING, a simple, training-free algorithm that aligns any base model at inference time using a small aligned model. NUDGING is motivated by recent findings that alignment primarily alters the model's behavior on a small subset of stylistic tokens (e.g., discourse markers). We find that base models are significantly more uncertain when generating these tokens. Building on this insight, NUDGING employs a small aligned model to generate nudging tokens to guide the base model's output during decoding when the base model's uncertainty is high, with only a minor additional inference overhead. We evaluate NUDGING across 3 model families on a diverse range of open-instruction tasks. Without any training, nudging a large base model with a 7×-14× smaller aligned model achieves zero-shot performance comparable to, and sometimes surpassing, that of large aligned models. By operating at the token level, NUDGING enables off-the-shelf collaboration between model families. For instance, nudging Gemma-2-27b with Llama-2-7b-chat outperforms Llama-2-70b-chat on various tasks. Overall, our work offers a modular and cost-efficient solution to LLM alignment. Our code and demo are available at: https://fywalter.github.io/nudging/ .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

9 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • SpecEM: Training-Free LLM Ensembling via Iterative Drafting, Verification, and Online Feedback cites Fast Inference from Transformers via Speculative Decoding
  • Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Training language models to follow instructions with human feedback
  • Base Models Know How to Reason, Thinking Models Learn When cites Efficient Memory Management for Large Language Model Serving with PagedAttention
  • The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learning cites Training language models to follow instructions with human feedback
  • Few Tokens, Big Leverage: Preserving Safety Alignment by Constraining Safety Tokens during Fine-tuning cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Few Tokens, Big Leverage: Preserving Safety Alignment by Constraining Safety Tokens during Fine-tuning cites The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learning
  • Don't Throw Away Your Pretrained Model cites Training language models to follow instructions with human feedback
  • Optimizing Diversity and Quality through Base-Aligned Model Collaboration cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Optimizing Diversity and Quality through Base-Aligned Model Collaboration cites The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learning
  • Optimizing Diversity and Quality through Base-Aligned Model Collaboration cites Fast Inference from Transformers via Speculative Decoding
  • Optimizing Diversity and Quality through Base-Aligned Model Collaboration cites Training language models to follow instructions with human feedback
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers9

  1. Base Models Know How to Reason, Thinking Models Learn WhenConstantin Venhoff, Iván Arcuschin, Phil Torr, Arthur Conmy et al.ICML 2026 · 20 citations
  2. Don't Throw Away Your Pretrained ModelShangbin Feng, Wenhao Yu, Yike Wang, Hongming Zhang et al.ICLR 2026 · 10 citations
  3. SpecEM: Training-Free LLM Ensembling via Iterative Drafting, Verification, and Online FeedbackBo Lv, Nayu Liu, Chen Tang, Xin Liu et al.NeurIPS 2025 · 7 citations
  4. Optimizing Diversity and Quality through Base-Aligned Model CollaborationYichen Wang, Chenghao Yang, Tenghao Huang, Muhao Chen et al.ICML 2026 · 7 citations
  5. Few Tokens, Big Leverage: Preserving Safety Alignment by Constraining Safety Tokens during Fine-tuningGuoli Wang, Haonan Shi, Tu Ouyang, An WangKDD 2026 · 5 citations

Builds on8

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  2. Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
  3. Fast Inference from Transformers via Speculative DecodingYaniv Leviathan, Matan Kalman, Yossi MatiasICML 2023 · 1,472 citations
  4. Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng et al.SOSP 2023 · 1,016 citations
  5. The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context LearningBill Yuchen Lin, Abhilasha Ravichander, Ximing Lu, Nouha Dziri et al.ICLR 2024 · 299 citations

Related papers

  1. Any-Depth Alignment: Unlocking Innate Safety Alignment of LLMs to Any-DepthJiawei Zhang, Andrew Estornell, David D. Baek, Bo Li et al.ICLR 2026 · 3 citations
  2. LIONs: An Empirically Optimized Approach to Align Language ModelsXiao Yu, Qingyang Wu, Yu Li, Zhou YuEMNLP 2024
  3. SAFT: Safety-Preserving Adaptation via Fine-Tuning Transfer for Large Language ModelsZhiwen Ruan, Yan Yang, Zhuocheng Liang, Yun Chen et al.KDD 2026
  4. Dynamic Rewarding with Prompt Optimization Enables Tuning-free Self-Alignment of Language ModelsSomanshu Singla, Zhen Wang, Tianyang Liu, Abdullah Ashfaq et al.EMNLP 2024 · 1 citation
  5. Emulated Disalignment: Safety Alignment for Large Language Models May Backfire!Zhanhui Zhou, Jie Liu, Zhichen Dong, Jiaheng Liu et al.ACL 2024
Dusk over the sea between two cliffs drawn in fine vertical lines