{"about":{"non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","site":"https://codewithpapers.app","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/paper/stay-on-topic-with-classifier-free-guidance","title":"Stay on topic with Classifier-Free Guidance","arxiv_id":"2306.17806","date":"2023-06-30","proceeding":null,"authors":["Guillaume Sanchez","Honglu Fan","Alexander Spangher","Elad Levi","Pawan Sasanka Ammanamanchi","Stella Biderman"],"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.","url_abs":"https://arxiv.org/abs/2306.17806v1","url_pdf":"https://arxiv.org/pdf/2306.17806v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[],"tasks":[{"task_slug":"code-generation","task_name":"Code Generation"},{"task_slug":"common-sense-reasoning","task_name":"Common Sense Reasoning"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"lambada","task_name":"LAMBADA"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"sentence-completion","task_name":"Sentence Completion"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"text-to-image-generation-1","task_name":"Text to Image Generation"},{"task_slug":"text-to-image-generation","task_name":"Text-to-Image Generation"},{"task_slug":"zero-shot-learning","task_name":"Zero-Shot Learning"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"discriminative-fine-tuning","method_name":"Discriminative Fine-Tuning"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-2","method_name":"GPT-2"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"pythia","method_name":"Pythia"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[{"slug":"sudoer","name":"SUDOER","full_name":"System/User Dataset for Obedience Evaluation in Responses"}],"methods_introduced":[],"results":[{"leaderboard":"/sota/common-sense-reasoning-on-arc-easy","task":"Common Sense Reasoning","dataset":"ARC (Easy)","model":"LLaMA 65B + CFG (0-shot)","rank_in_archive_order":8,"of":47,"metrics":{"Accuracy":"84.2"},"uses_additional_data":false},{"leaderboard":"/sota/common-sense-reasoning-on-arc-easy","task":"Common Sense Reasoning","dataset":"ARC (Easy)","model":"LLaMA 30B + CFG (0-shot)","rank_in_archive_order":11,"of":47,"metrics":{"Accuracy":"83.2"},"uses_additional_data":false},{"leaderboard":"/sota/common-sense-reasoning-on-arc-easy","task":"Common Sense Reasoning","dataset":"ARC (Easy)","model":"LLaMA 13B + CFG (0-shot)","rank_in_archive_order":18,"of":47,"metrics":{"Accuracy":"79.1"},"uses_additional_data":false},{"leaderboard":"/sota/common-sense-reasoning-on-arc-easy","task":"Common Sense Reasoning","dataset":"ARC (Easy)","model":"LLaMA 7B + CFG (0-shot)","rank_in_archive_order":42,"of":47,"metrics":{"Accuracy":"58.9"},"uses_additional_data":false},{"leaderboard":"/sota/language-modelling-on-lambada","task":"Language Modelling","dataset":"LAMBADA","model":"LLaMA-65B+CFG (Zero-Shot)","rank_in_archive_order":4,"of":37,"metrics":{"Accuracy":"84.0"},"uses_additional_data":false},{"leaderboard":"/sota/language-modelling-on-lambada","task":"Language Modelling","dataset":"LAMBADA","model":"LLaMA-30B+CFG (zero-shot)","rank_in_archive_order":5,"of":37,"metrics":{"Accuracy":"83.9"},"uses_additional_data":false},{"leaderboard":"/sota/language-modelling-on-lambada","task":"Language Modelling","dataset":"LAMBADA","model":"LLaMA-13B+CFG (zero-shot)","rank_in_archive_order":8,"of":37,"metrics":{"Accuracy":"82.2"},"uses_additional_data":false},{"leaderboard":"/sota/sentence-completion-on-hellaswag","task":"Sentence Completion","dataset":"HellaSwag","model":"LLaMA 65B + CFG (0-shot)","rank_in_archive_order":20,"of":89,"metrics":{"Accuracy":"86.3"},"uses_additional_data":false},{"leaderboard":"/sota/sentence-completion-on-hellaswag","task":"Sentence Completion","dataset":"HellaSwag","model":"LLaMA 30B + CFG (0-shot)","rank_in_archive_order":25,"of":89,"metrics":{"Accuracy":"85.3"},"uses_additional_data":false},{"leaderboard":"/sota/sentence-completion-on-hellaswag","task":"Sentence Completion","dataset":"HellaSwag","model":"LLaMA 13B + CFG (0-shot)","rank_in_archive_order":39,"of":89,"metrics":{"Accuracy":"82.1"},"uses_additional_data":false},{"leaderboard":"/sota/text-generation-on-sciq","task":"Text Generation","dataset":"SciQ","model":"LLaMA-65B+CFG (zero-shot)","rank_in_archive_order":1,"of":3,"metrics":{"Accuracy":"96.6"},"uses_additional_data":false},{"leaderboard":"/sota/text-generation-on-sciq","task":"Text Generation","dataset":"SciQ","model":"LLaMA-30B+CFG (zero-shot)","rank_in_archive_order":2,"of":3,"metrics":{"Accuracy":"96.4"},"uses_additional_data":false},{"leaderboard":"/sota/text-generation-on-sciq","task":"Text Generation","dataset":"SciQ","model":"LLaMA-13B+CFG (zero-shot)","rank_in_archive_order":3,"of":3,"metrics":{"Accuracy":"95.1"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2306.17806","atlas_url":"https://app.syntology.ai/?focus=2306.17806","mcp":null,"developers":"https://syntology.ai/developers","held":true,"reason":"arxiv_id_in_atlas","checked_against":{"atlas_ids":549449,"atlas_ids_sha256":"afd72399dafd9906e9062927f70655952385a3d75488558e1f0484e950ab09b7","read_at":"2026-10-05T01:46:21Z"},"agent_calls":[{"tool":"get_citation_path","arguments":{"paper_1":"2306.17806"},"arguments_in":{"paper_2":"another paper's arXiv id or title"},"call":"get_citation_path(paper_1=\"2306.17806\", paper_2=\"…\")"},{"tool":"get_concepts_for_paper","arguments":{"arxiv_id":"2306.17806"},"call":"get_concepts_for_paper(arxiv_id=\"2306.17806\")"}],"by_repo":[],"by_repo_is":"one row per repository in the archive's code links, Syntology's graph links or the samples; samples 0 means no sample is linked to this paper, a statement about Syntology's coverage, not about the repository: with harvested_for_other_papers present, Syntology harvested the repository for that many other papers, and without it, Syntology harvested nothing from it; placed_by_identical_code counts samples whose link records no repository, placed here because identical code was harvested from this repository for another paper; ran counts executions on a synthesized input and instrument counts failures of Syntology's instrument, not of the code"},"code_links_note":"the archive holds no code link for this paper","arxiv_metadata":null,"syntology_extracted_results":null,"record_sha256":"3c0cf5b619da7f4d1045296975befffd20694913e87aea9c48b46961023219f5","record_changed_at":"2026-09-28","record_changed_at_basis":"first_hashed"}