{"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/inference-time-policy-adapters-ipa-tailoring","title":"Inference-Time Policy Adapters (IPA): Tailoring Extreme-Scale LMs without Fine-tuning","arxiv_id":"2305.15065","date":"2023-05-24","proceeding":null,"authors":["Ximing Lu","Faeze Brahman","Peter West","Jaehun Jang","Khyathi Chandu","Abhilasha Ravichander","Lianhui Qin","Prithviraj Ammanabrolu","Liwei Jiang","Sahana Ramnath","Nouha Dziri","Jillian Fisher","Bill Yuchen Lin","Skyler Hallinan","Xiang Ren","Sean Welleck","Yejin Choi"],"abstract":"While extreme-scale language models have demonstrated exceptional performance on a variety of language tasks, the degree of control over these language models through pure prompting can often be limited. Directly fine-tuning such language models can be effective for tailoring them, but it can be either extremely costly (e.g., GPT-3) or not even feasible for the broader community (e.g., GPT-4). We propose Inference-time Policy Adapters (IPA), which efficiently tailors a language model such as GPT-3 without fine-tuning it. IPA guides a large base model during decoding time through a lightweight policy adapter trained to optimize an arbitrary user objective with reinforcement learning. On five challenging text generation tasks, such as toxicity reduction and lexically constrained generation, IPA consistently brings significant improvements over off-the-shelf language models. It outperforms competitive baseline methods, sometimes even including expensive fine-tuning. In particular, tailoring GPT-2 with IPA can outperform GPT-3, while tailoring GPT-3 with IPA brings a major performance boost over GPT-3 (and sometimes even over GPT-4). Our promising results highlight the potential of IPA as a lightweight alternative to tailoring extreme-scale language models.","url_abs":"https://arxiv.org/abs/2305.15065v2","url_pdf":"https://arxiv.org/pdf/2305.15065v2.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":"inference-time-policy-adapters-ipa-tailoring","repo_url":"https://github.com/gximinglu/ipa","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"adapter","method_name":"Adapter"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"base","method_name":"BASE"},{"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":"gpt-3","method_name":"GPT-3"},{"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":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.15065","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.15065"}},"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/gximinglu/ipa","reach":null}],"summary":{"ran":3,"ran_fixture":1,"ran_draft_wrong":3,"ran_honours":2,"unverified":2},"by_repo_kind":{"official":{"samples":11,"ran":9,"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":"09533ca3a50beeb9","entry":"Clause","repo":"gximinglu/ipa","repo_kind":"official","path":"policy.py","file_url":"https://github.com/gximinglu/ipa/blob/HEAD/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"09533ca3a50beeb9"}},{"code_sha256_prefix":"829dc5027203efb2","entry":"ConstrainedHypothesis","repo":"gximinglu/ipa","repo_kind":"official","path":"policy.py","file_url":"https://github.com/gximinglu/ipa/blob/HEAD/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"829dc5027203efb2"}},{"code_sha256_prefix":"26f86b735923a213","entry":"Literal","repo":"gximinglu/ipa","repo_kind":"official","path":"policy.py","file_url":"https://github.com/gximinglu/ipa/blob/HEAD/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"26f86b735923a213"}},{"code_sha256_prefix":"bbdcee6294271ede","entry":"add_control_code","repo":"gximinglu/ipa","repo_kind":"official","path":"policy.py","file_url":"https://github.com/gximinglu/ipa/blob/HEAD/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bbdcee6294271ede"}},{"code_sha256_prefix":"a5b9efe1547f6da6","entry":"get_response_logits","repo":"gximinglu/ipa","repo_kind":"official","path":"policy.py","file_url":"https://github.com/gximinglu/ipa/blob/HEAD/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a5b9efe1547f6da6"}},{"code_sha256_prefix":"17bed87cd7624c0f","entry":"init_batch","repo":"gximinglu/ipa","repo_kind":"official","path":"policy.py","file_url":"https://github.com/gximinglu/ipa/blob/HEAD/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"17bed87cd7624c0f"}},{"code_sha256_prefix":"3cb3f78a134bd16d","entry":"mask_pad","repo":"gximinglu/ipa","repo_kind":"official","path":"policy.py","file_url":"https://github.com/gximinglu/ipa/blob/HEAD/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3cb3f78a134bd16d"}},{"code_sha256_prefix":"429406ae7594ed3d","entry":"process_generation","repo":"gximinglu/ipa","repo_kind":"official","path":"policy.py","file_url":"https://github.com/gximinglu/ipa/blob/HEAD/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"429406ae7594ed3d"}},{"code_sha256_prefix":"ba8e7009fad31689","entry":"remove_control_code","repo":"gximinglu/ipa","repo_kind":"official","path":"policy.py","file_url":"https://github.com/gximinglu/ipa/blob/HEAD/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ba8e7009fad31689"}},{"code_sha256_prefix":"4e0ff675e558ddf8","entry":"Policy","repo":"gximinglu/ipa","repo_kind":"official","path":"policy.py","file_url":"https://github.com/gximinglu/ipa/blob/HEAD/policy.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":"4e0ff675e558ddf8"}},{"code_sha256_prefix":"967107de3b5957a5","entry":"get_model_output","repo":"gximinglu/ipa","repo_kind":"official","path":"policy.py","file_url":"https://github.com/gximinglu/ipa/blob/HEAD/policy.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":"967107de3b5957a5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}