TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Stay on topic with Classifier-Free Guidance

Stay on topic with Classifier-Free Guidance

Guillaume Sanchez, Honglu Fan, Alexander Spangher, Elad Levi, Pawan Sasanka Ammanamanchi, Stella Biderman

2023-06-30Machine TranslationText-to-Image GenerationText GenerationSentence CompletionCommon Sense ReasoningText to Image GenerationCode GenerationImage GenerationZero-Shot LearningLanguage ModellingLAMBADA
PaperPDF

Abstract

Classifier-Free Guidance (CFG) 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.

Results

TaskDatasetMetricValueModel
Text GenerationSciQAccuracy96.6LLaMA-65B+CFG (zero-shot)
Text GenerationSciQAccuracy96.4LLaMA-30B+CFG (zero-shot)
Text GenerationSciQAccuracy95.1LLaMA-13B+CFG (zero-shot)
Common Sense ReasoningARC (Easy)Accuracy84.2LLaMA 65B + CFG (0-shot)
Common Sense ReasoningARC (Easy)Accuracy83.2LLaMA 30B + CFG (0-shot)
Common Sense ReasoningARC (Easy)Accuracy79.1LLaMA 13B + CFG (0-shot)
Common Sense ReasoningARC (Easy)Accuracy58.9LLaMA 7B + CFG (0-shot)
Language ModellingLAMBADAAccuracy84LLaMA-65B+CFG (Zero-Shot)
Language ModellingLAMBADAAccuracy83.9LLaMA-30B+CFG (zero-shot)
Language ModellingLAMBADAAccuracy82.2LLaMA-13B+CFG (zero-shot)
Sentence CompletionHellaSwagAccuracy86.3LLaMA 65B + CFG (0-shot)
Sentence CompletionHellaSwagAccuracy85.3LLaMA 30B + CFG (0-shot)
Sentence CompletionHellaSwagAccuracy82.1LLaMA 13B + CFG (0-shot)

Related Papers

Visual-Language Model Knowledge Distillation Method for Image Quality Assessment2025-07-21CUDA-L1: Improving CUDA Optimization via Contrastive Reinforcement Learning2025-07-18Making Language Model a Hierarchical Classifier and Generator2025-07-17Comparing Apples to Oranges: A Dataset & Analysis of LLM Humour Understanding from Traditional Puns to Topical Jokes2025-07-17Towards Formal Verification of LLM-Generated Code from Natural Language Prompts2025-07-17fastWDM3D: Fast and Accurate 3D Healthy Tissue Inpainting2025-07-17Synthesizing Reality: Leveraging the Generative AI-Powered Platform Midjourney for Construction Worker Detection2025-07-17FashionPose: Text to Pose to Relight Image Generation for Personalized Fashion Visualization2025-07-17