{"id":36530915,"url":"https://github.com/ZJU-REAL/Self-Braking-Tuning","last_synced_at":"2026-01-18T21:00:44.184Z","repository":{"id":294599531,"uuid":"985248875","full_name":"ZJU-REAL/Self-Braking-Tuning","owner":"ZJU-REAL","description":"[NeurIPS 2025] Code for Let LLMs Break Free from Overthinking via Self-Braking Tuning. https://arxiv.org/abs/2505.14604","archived":false,"fork":false,"pushed_at":"2025-09-30T08:34:02.000Z","size":4295,"stargazers_count":49,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-29T04:25:21.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://zju-real.github.io/SBT/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZJU-REAL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-17T11:19:49.000Z","updated_at":"2025-10-20T09:06:25.000Z","dependencies_parsed_at":"2025-05-21T07:42:14.676Z","dependency_job_id":"ff016635-6e02-462d-b79c-ff259c5a5c6e","html_url":"https://github.com/ZJU-REAL/Self-Braking-Tuning","commit_stats":null,"previous_names":["ccai-lab/self-braking-tuning","zju-real/self-braking-tuning"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZJU-REAL/Self-Braking-Tuning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-REAL%2FSelf-Braking-Tuning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-REAL%2FSelf-Braking-Tuning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-REAL%2FSelf-Braking-Tuning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-REAL%2FSelf-Braking-Tuning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZJU-REAL","download_url":"https://codeload.github.com/ZJU-REAL/Self-Braking-Tuning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-REAL%2FSelf-Braking-Tuning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28550464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T20:59:07.572Z","status":"ssl_error","status_checked_at":"2026-01-18T20:59:02.799Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-12T03:00:47.522Z","updated_at":"2026-01-18T21:00:44.172Z","avatar_url":"https://github.com/ZJU-REAL.png","language":"Python","funding_links":[],"categories":["A01_文本生成_文本对话"],"sub_categories":["大语言对话模型及数据"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\u003cimg src=\"figures/logo.png\" alt=\"Logo\" width=\"50\"/\u003e Let LRMs Break Free from Overthinking via Self-Braking Tuning\u003c/h1\u003e\n  \u003cdiv align=\"center\"\u003e\n\u003c/div\u003e\n  \u003csection class=\"hero\"\u003e\n    \u003cdiv class=\"hero-body\"\u003e\n      \u003cdiv class=\"container is-max-desktop\"\u003e\n        \u003cdiv class=\"columns is-centered\"\u003e\n          \u003cdiv class=\"column has-text-centered\"\u003e\n            \u003cdiv class=\"column has-text-centered\"\u003e\n                \u003cdiv class=\"is-size-5 publication-links\"\u003e\n                    \u003cp\u003e\n                    🔗 \u003ca href=\"https://arxiv.org/abs/2505.14604\" target=\"_blank\"\u003earXiv\u003c/a\u003e |\n                    📄 \u003ca href=\"https://arxiv.org/pdf/2505.14604\" target=\"_blank\"\u003ePDF\u003c/a\u003e |\n                    🌐 \u003ca href=\"https://zju-real.github.io/SBT/\" target=\"_blank\"\u003eProject Page\u003c/a\u003e\n                    \u003c/p\u003e\n                \u003c/div\u003e\n                \u003cdiv class=\"is-size-5 publication-authors\"\u003e\n              \u003cdiv class=\"is-size-5 publication-authors\"\u003e\n                \u003cspan class=\"author-block\"\u003e\n                  \u003ca href=\"mailto:ran159753@tju.edu.cn\" target=\"_blank\"\u003eHaoran Zhao\u003c/a\u003e\u003csup\u003e1,2*\u003c/sup\u003e,\n                \u003c/span\u003e\n                \u003cspan class=\"author-block\"\u003e\n                  \u003ca href=\"mailto:yanyuchen@zju.edu.cn\" target=\"_blank\"\u003eYuchen Yan\u003c/a\u003e\u003csup\u003e1*\u003c/sup\u003e,\n                \u003c/span\u003e\n                \u003cspan class=\"author-block\"\u003e\n                  \u003ca href=\"mailto:syl@zju.edu.cn\" target=\"_blank\"\u003eYongliang Shen\u003c/a\u003e\u003csup\u003e1†\u003c/sup\u003e,\n                \u003c/span\u003e\n                \u003cspan class=\"author-block\"\u003e\n                  Haolei Xu\u003csup\u003e1\u003c/sup\u003e,\n                \u003c/span\u003e\n                \u003cspan class=\"author-block\"\u003e\n                  Wenqi Zhang\u003csup\u003e1\u003c/sup\u003e,\n                \u003c/span\u003e\n                \u003cspan class=\"author-block\"\u003e\n                  Kaitao Song\u003csup\u003e3\u003c/sup\u003e,\n                \u003c/span\u003e\n                \u003cspan class=\"author-block\"\u003e\n                  Jian Shao\u003csup\u003e1\u003c/sup\u003e,\n                \u003c/span\u003e\n                \u003cspan class=\"author-block\"\u003e\n                  Weiming Lu\u003csup\u003e1\u003c/sup\u003e,\n                \u003c/span\u003e\n                \u003cspan class=\"author-block\"\u003e\n                  Jun Xiao\u003csup\u003e1\u003c/sup\u003e\n                \u003c/span\u003e\n                \u003cspan class=\"author-block\"\u003e\n                  Yueting Zhuang\u003csup\u003e1\u003c/sup\u003e\n                \u003c/span\u003e\n              \u003c/div\u003e\n                  \u003cdiv class=\"is-size-5 publication-authors\"\u003e\n                    \u003cspan class=\"author-block\"\u003e\u003csup\u003e1\u003c/sup\u003eZhejiang University,\u003c/span\u003e\n                    \u003cspan class=\"author-block\"\u003e\u003csup\u003e2\u003c/sup\u003eTianjin University,\u003c/span\u003e\n                    \u003cspan class=\"author-block\"\u003e\u003csup\u003e3\u003c/sup\u003eMicrosoft Research Asia\u003c/span\u003e\n                    \u003cbr\u003e\n                    \u003cspan class=\"author-block\"\u003ePreprint. Under review.\u003c/span\u003e\n                    \u003cspan class=\"eql-cntrb\"\u003e\u003csmall\u003e\u003cbr\u003e\u003csup\u003e*\u003c/sup\u003eEqual Contribution, \u003csup\u003e†\u003c/sup\u003eCorresponding Author\u003c/small\u003e\u003c/span\u003e\n                  \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/section\u003e\n\u003ch3\u003e\u003ch3\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"figures/overview.png\" width=\"100%\" \u003e\u003c/img\u003e\n  \u003cbr\u003e\n  \u003cem\u003e\n      Overview of Self-Braking Tuning: Through a specialized data construction method and training strategy, our self-braking model is able to spontaneously halt overthinking.\n  \u003c/em\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n## News 🔥🔥\n- **2025.09.18:** Our paper has been accepted by **NeurIPS 2025**.\n- **2025.05.20:** We release our paper.\n\n\n## 📝 About\nSelf-Braking Tuning is a novel framework that unlocks the potential of large reasoning models to autonomously identify and terminate redundant reasoning, enabling the models to regulate their own reasoning processes without relying on external control mechanisms. \nDuring fine-tuning, we use the Megatron-LM framework, with related parameters specified in [`configs/train.yaml`](configs/train.yaml); for evaluation, we employ the vLLM framework as the inference engine, with corresponding parameters located in [`configs/evaluation.yaml`](configs/evaluation.yaml).\nHere, we provide a complete data construction framework that can be applied to nearly any long-chain tuning dataset, generating corresponding self-braking data accordingly.\n\n## 🛠️ Preparation Steps Before Starting\nIn *Let LLMs Break Free from Overthinking via Self-Braking Tuning*, we performed self-braking tuning based on the OpenR1-Math dataset. In fact, this approach is applicable to any long-chain reasoning dataset, as long as the reasoning segments are wrapped with `\u003cthink\u003e` and `\u003c/think\u003e` tags. It is worth noting that, prior to training, it is recommended to keep the model's max_position_embeddings set to 32,768. In addition, to extend the context length from 4k to 32k, we increase the RoPE frequency to 300k.\n\nOur method requires access to an LLM, and the recommended way to provide this is by setting:\n\n```\nexport APIKEY=\u003cyour_key\u003e\n```\n**Tip**: To provide a convenient default option, we use the OpenAI API key.  However, for large-scale datasets, it is recommended to deploy open-source models locally using vLLM or other frameworks, and to leverage efficient methods such as batch processing for better scalability and cost efficiency.\n\n## 🚀 Quick Start\n\n### 1. Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### 2. Download\n\n```bash\npython models/model_download.py\npython data/datasets/download_benchmarks.py\n```\n\n### 3. Get the baseline\n\n```bash\npython data/datasets/download_OpenR1-Math.py\n```\n### 4. Preprocess Data\n\n```bash\npython data/preprocessing/build_sbt-e.py\npython data/preprocessing/build_sbt-d.py\n```\n\n\n### 5. Configure and Run Training / Evaluation\n\nRefer to the config Settings in the following file:\n\n* `train.yaml`: Training settings\n* `evalution.yaml`: Evaluation settings\n\n## 📖 Citation\n\nIf you find our work helpful, feel free to give us a cite.\n\n```\n@misc{zhao2025letllmsbreakfree,\n      title={Let LLMs Break Free from Overthinking via Self-Braking Tuning}, \n      author={Haoran Zhao and Yuchen Yan and Yongliang Shen and Haolei Xu and Wenqi Zhang and Kaitao Song and Jian Shao and Weiming Lu and Jun Xiao and Yueting Zhuang},\n      year={2025},\n      eprint={2505.14604},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL},\n      url={https://arxiv.org/abs/2505.14604}, \n}\n```\n\n## 📬 Contact Us\nIf you have any questions, please contact us by email: \nran159753@tju.edu.cn\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZJU-REAL%2FSelf-Braking-Tuning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZJU-REAL%2FSelf-Braking-Tuning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZJU-REAL%2FSelf-Braking-Tuning/lists"}