{"about":{"site":"https://codewithpapers.app","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.","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"},"url":"/paper/cutting-down-on-prompts-and-parameters-simple","title":"Cutting Down on Prompts and Parameters: Simple Few-Shot Learning with Language Models","arxiv_id":"2106.13353","date":"2021-06-24","proceeding":"Findings (ACL) 2022 5","authors":["Robert L. Logan IV","Ivana Balažević","Eric Wallace","Fabio Petroni","Sameer Singh","Sebastian Riedel"],"abstract":"Prompting language models (LMs) with training examples and task descriptions has been seen as critical to recent successes in few-shot learning. In this work, we show that finetuning LMs in the few-shot setting can considerably reduce the need for prompt engineering. In fact, one can use null prompts, prompts that contain neither task-specific templates nor training examples, and achieve competitive accuracy to manually-tuned prompts across a wide range of tasks. While finetuning LMs does introduce new parameters for each downstream task, we show that this memory overhead can be substantially reduced: finetuning only the bias terms can achieve comparable or better accuracy than standard finetuning while only updating 0.1% of the parameters. All in all, we recommend finetuning LMs for few-shot learning as it is more accurate, robust to different prompts, and can be made nearly as efficient as using frozen LMs.","url_abs":"https://arxiv.org/abs/2106.13353v2","url_pdf":"https://arxiv.org/pdf/2106.13353v2.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":[{"paper_slug":"cutting-down-on-prompts-and-parameters-simple","repo_url":"https://github.com/ucinlp/null-prompts","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"cutting-down-on-prompts-and-parameters-simple","repo_url":"https://github.com/facebookresearch/perfect","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"prompt-engineering","task_name":"Prompt Engineering"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2106.13353","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.13353"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/perfect","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ucinlp/null-prompts","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":10},"by_repo_kind":{"official":{"samples":10,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"73b104c2f2ab39f3","entry":"get_clf_head","repo":"ucinlp/null-prompts","repo_kind":"official","path":"nullprompt/models.py","file_url":"https://github.com/ucinlp/null-prompts/blob/HEAD/nullprompt/models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"73b104c2f2ab39f3"}},{"code_sha256_prefix":"52e0b2b6dde2c6f5","entry":"get_linear_schedule_with_warmup","repo":"ucinlp/null-prompts","repo_kind":"official","path":"nullprompt/trainers/finetune.py","file_url":"https://github.com/ucinlp/null-prompts/blob/HEAD/nullprompt/trainers/finetune.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"52e0b2b6dde2c6f5"}},{"code_sha256_prefix":"dc526f2f69d8e783","entry":"get_lm_head","repo":"ucinlp/null-prompts","repo_kind":"official","path":"nullprompt/models.py","file_url":"https://github.com/ucinlp/null-prompts/blob/HEAD/nullprompt/models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dc526f2f69d8e783"}},{"code_sha256_prefix":"aa82a18e8211ca6c","entry":"get_optimizer","repo":"ucinlp/null-prompts","repo_kind":"official","path":"nullprompt/trainers/finetune.py","file_url":"https://github.com/ucinlp/null-prompts/blob/HEAD/nullprompt/trainers/finetune.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"aa82a18e8211ca6c"}},{"code_sha256_prefix":"2f89b905c683adc9","entry":"get_word_embeddings","repo":"ucinlp/null-prompts","repo_kind":"official","path":"nullprompt/models.py","file_url":"https://github.com/ucinlp/null-prompts/blob/HEAD/nullprompt/models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2f89b905c683adc9"}},{"code_sha256_prefix":"5d03070f1d676296","entry":"load_label_map","repo":"ucinlp/null-prompts","repo_kind":"official","path":"nullprompt/utils.py","file_url":"https://github.com/ucinlp/null-prompts/blob/HEAD/nullprompt/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5d03070f1d676296"}},{"code_sha256_prefix":"e28c77e9a3880f76","entry":"load_transformers","repo":"ucinlp/null-prompts","repo_kind":"official","path":"nullprompt/utils.py","file_url":"https://github.com/ucinlp/null-prompts/blob/HEAD/nullprompt/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e28c77e9a3880f76"}},{"code_sha256_prefix":"378294d453c3b8ad","entry":"pad_squeeze_sequence","repo":"ucinlp/null-prompts","repo_kind":"official","path":"nullprompt/data.py","file_url":"https://github.com/ucinlp/null-prompts/blob/HEAD/nullprompt/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"378294d453c3b8ad"}},{"code_sha256_prefix":"6c2a94ad9c81a93a","entry":"prime","repo":"ucinlp/null-prompts","repo_kind":"official","path":"nullprompt/data.py","file_url":"https://github.com/ucinlp/null-prompts/blob/HEAD/nullprompt/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6c2a94ad9c81a93a"}},{"code_sha256_prefix":"a80b2839bd8d317b","entry":"randomize_label_map","repo":"ucinlp/null-prompts","repo_kind":"official","path":"nullprompt/utils.py","file_url":"https://github.com/ucinlp/null-prompts/blob/HEAD/nullprompt/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a80b2839bd8d317b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}