{"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/the-n-implementation-details-of-rlhf-with-ppo","title":"The N+ Implementation Details of RLHF with PPO: A Case Study on TL;DR Summarization","arxiv_id":"2403.17031","date":"2024-03-24","proceeding":null,"authors":["Shengyi Huang","Michael Noukhovitch","Arian Hosseini","Kashif Rasul","Weixun Wang","Lewis Tunstall"],"abstract":"This work is the first to openly reproduce the Reinforcement Learning from Human Feedback (RLHF) scaling behaviors reported in OpenAI's seminal TL;DR summarization work. We create an RLHF pipeline from scratch, enumerate over 20 key implementation details, and share key insights during the reproduction. Our RLHF-trained Pythia models demonstrate significant gains in response quality that scale with model size, with our 2.8B, 6.9B models outperforming OpenAI's released 1.3B checkpoint. We publicly release the trained model checkpoints and code to facilitate further research and accelerate progress in the field (\\url{https://github.com/vwxyzjn/summarize_from_feedback_details}).","url_abs":"https://arxiv.org/abs/2403.17031v1","url_pdf":"https://arxiv.org/pdf/2403.17031v1.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":"the-n-implementation-details-of-rlhf-with-ppo","repo_url":"https://github.com/vwxyzjn/summarize_from_feedback_details","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[{"method_slug":"pythia","method_name":"Pythia"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2403.17031","atlas_url":"https://app.syntology.ai/?focus=2403.17031","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.17031"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/vwxyzjn/summarize_from_feedback_details","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":7,"ran_draft_wrong":1,"unverified":5},"by_repo_kind":{"official":{"samples":13,"ran":8,"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":"f99955c55f25123e","entry":"ceil_div","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"summarize_from_feedback_details/tldr_dataset.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/summarize_from_feedback_details/tldr_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f99955c55f25123e"}},{"code_sha256_prefix":"579f0202bb30e003","entry":"first_true_indices","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"summarize_from_feedback_details/dpo.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/summarize_from_feedback_details/dpo.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"579f0202bb30e003"}},{"code_sha256_prefix":"1f9a50a3becd157e","entry":"forward","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"summarize_from_feedback_details/dpo.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/summarize_from_feedback_details/dpo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1f9a50a3becd157e"}},{"code_sha256_prefix":"51062aca9db3f84c","entry":"generate","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"summarize_from_feedback_details/dpo.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/summarize_from_feedback_details/dpo.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"51062aca9db3f84c"}},{"code_sha256_prefix":"9ad5922df265477f","entry":"layer_init","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"summarize_from_feedback_details/ppo.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/summarize_from_feedback_details/ppo.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9ad5922df265477f"}},{"code_sha256_prefix":"16655f3447355899","entry":"masked_mean","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"summarize_from_feedback_details/ppo.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/summarize_from_feedback_details/ppo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"16655f3447355899"}},{"code_sha256_prefix":"3a136e5f5a8047ac","entry":"masked_var","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"summarize_from_feedback_details/ppo.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/summarize_from_feedback_details/ppo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3a136e5f5a8047ac"}},{"code_sha256_prefix":"e2429ac73eafe86e","entry":"truncate_response","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"summarize_from_feedback_details/sft.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/summarize_from_feedback_details/sft.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e2429ac73eafe86e"}},{"code_sha256_prefix":"5c6b0419c48c8511","entry":"check_rm_agree","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"eval/analyze_rm.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/eval/analyze_rm.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5c6b0419c48c8511"}},{"code_sha256_prefix":"c64a8d32a7ed56ca","entry":"get_reward","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"summarize_from_feedback_details/reward.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/summarize_from_feedback_details/reward.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c64a8d32a7ed56ca"}},{"code_sha256_prefix":"724d57837e39392a","entry":"get_rm_agree_data","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"eval/analyze_rm.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/eval/analyze_rm.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"724d57837e39392a"}},{"code_sha256_prefix":"1cb57f8078b45d84","entry":"llm_judge","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"eval/oai2.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/eval/oai2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1cb57f8078b45d84"}},{"code_sha256_prefix":"3dcde3c8b6d6c204","entry":"process_query","repo":"vwxyzjn/summarize_from_feedback_details","repo_kind":"official","path":"summarize_from_feedback_details/tldr_dataset.py","file_url":"https://github.com/vwxyzjn/summarize_from_feedback_details/blob/HEAD/summarize_from_feedback_details/tldr_dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3dcde3c8b6d6c204"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}