CoolFace
Modelpublic

OpenHands/CodeScout-1.7B-RFT

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
1likes26downloads
README.md110 linesDownload Raw Back to root
1---2library_name: transformers3license: apache-2.04language:5- en6base_model: Qwen/Qwen3-1.7B7pipeline_tag: text-generation8tags:9- code-search10- code-localization11- reinforcement-learning12- agent13- software-engineering14- GSPO15- OpenHands16- SWE-Bench17datasets:18- OpenHands/SWE-smith-py-code-search19- OpenHands/SWE-Gym-code-search20- OpenHands/CodeScout_Training_Rollouts21---22 23# CodeScout-1.7B-RFT24 25[๐Ÿ“„ Paper](https://arxiv.org/abs/2603.17829) โ€ข [๐Ÿ’ป Code](https://github.com/OpenHands/codescout) โ€ข [๐Ÿค— Collection](https://huggingface.co/collections/OpenHands/codescout-69b9a6adcf21f348f4db937f)26 27**Pre-RL checkpoint โ€” rejection fine-tuned on expert trajectories from CodeScout-14B.**28 29<p align="center">30  <img src="codescout_overview.png" alt="CodeScout Overview" width="100%">31</p>32 33CodeScout-1.7B-RFT is part of the **CodeScout** family of open-source RL-trained code search agents.34CodeScout models achieve state-of-the-art repository-level code localization using *nothing more than a standard Unix terminal* โ€” no static analysis, no repository graphs, no language-specific tooling.35 36## Key Highlights37 38- Warm-start checkpoint for [CodeScout-1.7B](https://huggingface.co/OpenHands/CodeScout-1.7B) RL training39- Distilled from CodeScout-14B expert trajectories with rejection sampling40- Useful for researchers studying the effect of RFT vs. RL in agent training pipelines41- Can be used as a base for custom RL experiments on code search42 43## Results44 45Performance on SWE-Bench code localization (instance-averaged F1 scores):46 47 48| Benchmark | CodeScout-1.7B | CodeScout-4B | CodeScout-14B |49|---|---|---|---|50| **SWE-Bench Verified** โ€” File F1 | 55.46 | 68.52 | **68.57** |51| **SWE-Bench Verified** โ€” Func F1 | 28.22 | 36.78 | **40.32** |52| **SWE-Bench Pro** โ€” File F1 | 40.96 | 51.77 | **53.63** |53| **SWE-Bench Pro** โ€” Func F1 | 18.24 | **29.03** | 28.74 |54| **SWE-Bench Lite** โ€” File F1 | 56.57 | 67.03 | **71.84** |55| **SWE-Bench Lite** โ€” Func F1 | 27.07 | 39.87 | **44.43** |56 57 58<p align="center">59  <img src="f1_vs_params_file.png" alt="File-level F1 vs Model Size" width="48%">60  <img src="f1_vs_params_function.png" alt="Function-level F1 vs Model Size" width="48%">61</p>62 63<p align="center"><em>Code localization performance on SWE-Bench Verified. CodeScout (โญ) achieves superior or competitive results over larger open-source LLMs and narrows the gap with closed-source frontier models.</em></p>64 65## Training66 67CodeScout-1.7B-RFT is the intermediate checkpoint produced by rejection fine-tuning (RFT) `Qwen3-1.7B` on expert trajectories from CodeScout-14B, before the final RL stage.68 69- **Teacher model:** [CodeScout-14B](https://huggingface.co/OpenHands/CodeScout-14B)70- **Source trajectories:** Rollouts from CodeScout-14B on 7,700 training instances71- **Filtered data:** 4K trajectories with perfect scores (F1 = 1.0 at file, module, and function level)72- **SFT epochs:** 173- **Learning rate:** 5e-5 with cosine scheduler (warmup ratio 0.1)74- **Batch size:** 875- **Optimizer:** AdamW76- **Framework:** [veRL](https://github.com/volcengine/verl)77 78This checkpoint serves as the starting point for RL training of [CodeScout-1.7B](https://huggingface.co/OpenHands/CodeScout-1.7B).79 80## How It Works81 82CodeScout uses the **OpenHands-Bash** scaffold โ€” an agent equipped with only a `Terminal` tool (supporting standard Unix commands like `rg`, `find`, `grep`, `ls`) and a `LocalizationFinish` tool for structured output submission. The agent iteratively navigates the repository to identify relevant files, classes, and functions related to a given issue.83 84The model is trained with **GSPO** (Group Sequence Policy Optimization) using multi-level F1 rewards at the file, module, and function level.85 86## Intended Use87 88CodeScout-1.7B-RFT is designed for **repository-level code localization**: given a GitHub issue description and a code repository, it identifies the relevant files, classes, and functions that need to be modified. It is intended to be used as a localization subagent within larger coding agent pipelines.89 90## Limitations91 92- Trained and evaluated exclusively on **Python** repositories93- Designed for code *localization*, not code *editing* or issue resolution94- Performance may vary on repositories significantly different from the training distribution95- Requires the OpenHands-Bash scaffold for optimal performance96 97## Citation98 99```bibtex100@misc{sutawika2026codescouteffectiverecipereinforcement,101      title={CodeScout: An Effective Recipe for Reinforcement Learning of Code Search Agents}, 102      author={Lintang Sutawika and Aditya Bharat Soni and Bharath Sriraam R R and Apurva Gandhi and Taha Yassine and Sanidhya Vijayvargiya and Yuchen Li and Xuhui Zhou and Yilin Zhang and Leander Melroy Maben and Graham Neubig},103      year={2026},104      eprint={2603.17829},105      archivePrefix={arXiv},106      primaryClass={cs.SE},107      url={https://arxiv.org/abs/2603.17829}, 108}109```110