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 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.
23 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- High-Resolution Image Synthesis with Latent Diffusion Models cites Diffusion Models Beat GANs on Image Synthesis
- Parallel Scaling Law for Language Models cites Diffusion Models Beat GANs on Image Synthesis
- Parallel Scaling Law for Language Models cites Language Models are Few-Shot Learners
- Parallel Scaling Law for Language Models cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Controlled Text Generation via Language Model Arithmetic cites Language Models are Few-Shot Learners
- Controlled Text Generation via Language Model Arithmetic cites Training language models to follow instructions with human feedback
- Diffusion Models Beat GANs on Image Synthesis cites Language Models are Few-Shot Learners
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models cites Training language models to follow instructions with human feedback
- Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
- Fine-Tuned Language Models Generate Stable Inorganic Materials as Text cites Language Models are Few-Shot Learners
Cited 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 on30
- 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
