{"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/suri-multi-constraint-instruction-following","title":"Suri: Multi-constraint Instruction Following for Long-form Text Generation","arxiv_id":"2406.19371","date":"2024-06-27","proceeding":null,"authors":["Chau Minh Pham","Simeng Sun","Mohit Iyyer"],"abstract":"Existing research on instruction following largely focuses on tasks with simple instructions and short responses. In this work, we explore multi-constraint instruction following for generating long-form text. We create Suri, a dataset with 20K human-written long-form texts paired with LLM-generated backtranslated instructions that contain multiple complex constraints. Because of prohibitive challenges associated with collecting human preference judgments on long-form texts, preference-tuning algorithms such as DPO are infeasible in our setting; thus, we propose Instructional ORPO (I-ORPO), an alignment method based on the ORPO algorithm. Instead of receiving negative feedback from dispreferred responses, I-ORPO obtains negative feedback from synthetically corrupted instructions generated by an LLM. Using Suri, we perform supervised and I-ORPO fine-tuning on Mistral-7b-Instruct-v0.2. The resulting models, Suri-SFT and Suri-I-ORPO, generate significantly longer texts (~5K tokens) than base models without significant quality deterioration. Our human evaluation shows that while both SFT and I-ORPO models satisfy most constraints, Suri-I-ORPO generations are generally preferred for their coherent and informative incorporation of the constraints. We release our code at https://github.com/chtmp223/suri.","url_abs":"https://arxiv.org/abs/2406.19371v2","url_pdf":"https://arxiv.org/pdf/2406.19371v2.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":"suri-multi-constraint-instruction-following","repo_url":"https://github.com/chtmp223/suri","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"form","task_name":"Form"},{"task_slug":"instruction-following","task_name":"Instruction Following"},{"task_slug":"text-generation","task_name":"Text Generation"}],"methods":[{"method_slug":"base","method_name":"BASE"},{"method_slug":"dpo","method_name":"DPO"},{"method_slug":"sft","method_name":"SFT"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.19371","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.19371"}},"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/chtmp223/suri","reach":{"status":"ok"}}],"summary":{"ran":10,"ran_violates":1,"unverified":4},"by_repo_kind":{"official":{"samples":15,"ran":11,"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":15,"samples":[{"code_sha256_prefix":"ed74b164b2fe6a65","entry":"apply_chat_template","repo":"chtmp223/suri","repo_kind":"official","path":"ft/lib/alignment_mod/data.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/ft/lib/alignment_mod/data.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ed74b164b2fe6a65"}},{"code_sha256_prefix":"67cf0babead8c2de","entry":"build_generator","repo":"chtmp223/suri","repo_kind":"official","path":"eval/automatic/ranking.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/eval/automatic/ranking.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"67cf0babead8c2de"}},{"code_sha256_prefix":"cc64fc0500364fe4","entry":"check_bib","repo":"chtmp223/suri","repo_kind":"official","path":"utils.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cc64fc0500364fe4"}},{"code_sha256_prefix":"0edeacd7a9034f53","entry":"extract_docstring","repo":"chtmp223/suri","repo_kind":"official","path":"ft/lib/alignment_mod/decontaminate.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/ft/lib/alignment_mod/decontaminate.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0edeacd7a9034f53"}},{"code_sha256_prefix":"4253aac010c4504f","entry":"is_openai_format","repo":"chtmp223/suri","repo_kind":"official","path":"ft/lib/alignment_mod/data.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/ft/lib/alignment_mod/data.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4253aac010c4504f"}},{"code_sha256_prefix":"a3791c5c2185e013","entry":"load_dataset_column","repo":"chtmp223/suri","repo_kind":"official","path":"ft/lib/alignment_mod/decontaminate.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/ft/lib/alignment_mod/decontaminate.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a3791c5c2185e013"}},{"code_sha256_prefix":"f43e59d239019e86","entry":"normalize_whitespace","repo":"chtmp223/suri","repo_kind":"official","path":"ft/lib/alignment_mod/decontaminate.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/ft/lib/alignment_mod/decontaminate.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f43e59d239019e86"}},{"code_sha256_prefix":"5bffca7d5514764e","entry":"sequence_prob","repo":"chtmp223/suri","repo_kind":"official","path":"eval/automatic/ranking.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/eval/automatic/ranking.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5bffca7d5514764e"}},{"code_sha256_prefix":"1db337e94d1e9417","entry":"strip_trailing_text","repo":"chtmp223/suri","repo_kind":"official","path":"utils.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1db337e94d1e9417"}},{"code_sha256_prefix":"5bcf8e086423cf6b","entry":"top_k_top_p_filtering","repo":"chtmp223/suri","repo_kind":"official","path":"ft/lib/trl_mod/core.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/ft/lib/trl_mod/core.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5bcf8e086423cf6b"}},{"code_sha256_prefix":"9a2951468cd4ee8b","entry":"truncating_words","repo":"chtmp223/suri","repo_kind":"official","path":"utils.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9a2951468cd4ee8b"}},{"code_sha256_prefix":"c32b636f13ed9ee5","entry":"convert_to_scalar","repo":"chtmp223/suri","repo_kind":"official","path":"ft/lib/trl_mod/core.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/ft/lib/trl_mod/core.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c32b636f13ed9ee5"}},{"code_sha256_prefix":"a51ae45a1f6c0b5b","entry":"flatten_dict","repo":"chtmp223/suri","repo_kind":"official","path":"ft/lib/trl_mod/core.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/ft/lib/trl_mod/core.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a51ae45a1f6c0b5b"}},{"code_sha256_prefix":"2a9ca02cb6e196ff","entry":"is_transformers_greater_than","repo":"chtmp223/suri","repo_kind":"official","path":"ft/lib/trl_mod/import_utils.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/ft/lib/trl_mod/import_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2a9ca02cb6e196ff"}},{"code_sha256_prefix":"8f7c20be180ad75b","entry":"read_file","repo":"chtmp223/suri","repo_kind":"official","path":"eval/automatic/ranking.py","file_url":"https://github.com/chtmp223/suri/blob/HEAD/eval/automatic/ranking.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8f7c20be180ad75b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}