Stay on Topic with Classifier-Free Guidance
Guillaume Sanchez, Alexander Spangher, Honglu Fan, Elad Levi, Stella Biderman
Abstract
Classifier-Free Guidance (CFG) [37] has recently emerged in text-to-image generation as a lightweight technique to encourage prompt-adherence in generations. In this work, we demonstrate that CFG can be used broadly as an inference-time technique in pure language modeling. We show that CFG (1) improves the performance of Pythia, GPT-2 and LLaMA-family models across an array of tasks: Q&A, reasoning, code generation, and machine translation, achieving SOTA on LAMBADA with LLaMA-7B over PaLM-540B; (2) brings improvements equivalent to a model with twice the parameter-count; (3) can stack alongside other inference-time methods like Chain-of-Thought and Self-Consistency, yielding further improvements in difficult tasks; (4) can be used to increase the faithfulness and coherence of assistants in challenging form-driven and content-driven prompts: in a human evaluation we show a 75% preference for GPT4All using CFG over baseline.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 8e85eea5-03df-48e4-945b-4372cbfe6595Cited by top-tier papers23
- Fine-Tuned Language Models Generate Stable Inorganic Materials as TextNate Gruver, Anuroop Sriram, Andrea Madotto, Andrew Gordon Wilson et al.ICLR 2024 · 120 citations
- Controlled Text Generation via Language Model ArithmeticJasper Dekoninck, Marc Fischer, Luca Beurer-Kellner, Martin T. VechevICLR 2024 · 58 citations
- Leveraging Hallucinations to Reduce Manual Prompt Dependency in Promptable SegmentationJian Hu, Jiayi Lin, Junchi Yan, Shaogang GongNeurIPS 2024 · 39 citations
- Erasing Conceptual Knowledge from Language ModelsRohit Gandikota, Sheridan Feucht, Samuel Marks, David BauNeurIPS 2025 · 35 citations
- Parallel Scaling Law for Language ModelsMouxiang Chen, Binyuan Hui, Zeyu Cui, Jiaxi Yang et al.NeurIPS 2025 · 33 citations
Builds on28
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 citations
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
Related papers
- Prompt Highlighter: Interactive Control for Multi-Modal LLMsYuechen Zhang, Shengju Qian, Bohao Peng, Shu Liu et al.CVPR 2024 · 6 citations
- Dynamic Classifier-Free Diffusion Guidance via Online FeedbackPinelopi Papalampidi, Olivia Wiles, Ira Ktena, Aleksandar Shtedritski et al.ICLR 2026 · 12 citations
- Adaptive Classifier-Free Guidance via Dynamic Low-Confidence MaskingPengxiang Li, Shilin Yan, Jiayin Cai, Renrui Zhang et al.NeurIPS 2025 · 23 citations
- Toward Guidance-Free AR Visual Generation via Condition Contrastive AlignmentHuayu Chen, Hang Su, Peize Sun, Jun ZhuICLR 2025
- Guidance Matters: Rethinking the Evaluation Pitfall for Text-to-Image GenerationDian Xie, Shitong Shao, Lichen Bai, Zikai Zhou et al.ICLR 2026 · 3 citations
