CodeScout-1.7B: A Compact RL-Trained Code Search Agent
CodeScout-1.7B is a 1.7 billion parameter model from the CodeScout family, developed by OpenHands, designed for efficient repository-level code localization. It operates solely through a standard Unix terminal interface, utilizing commands like rg, find, grep, and ls to navigate and identify code.
Key Capabilities
- Superior Code Localization: Outperforms 8x larger Qwen3-14B by 11-18% in file F1 and 10-15% in function F1 on SWE-Bench. It also competes with 18x larger Qwen3-32B (Thinking), surpassing it by 3-6% in function F1.
- Efficiency: Achieves performance comparable to RepoNavigator-7B while being 4x smaller, demonstrating effective compression of code search capabilities through RL and distillation.
- Terminal-Based Operation: Relies exclusively on a
Terminal tool and a LocalizationFinish tool, avoiding static analysis or language-specific tooling.
Training Methodology
The model undergoes a two-stage training process:
- Rejection Fine-Tuning (RFT): A Qwen3-1.7B base is fine-tuned on 4K perfect-score trajectories sampled from CodeScout-14B.
- RL Training: Further trained with GSPO (Group Sequence Policy Optimization) using multi-level F1 rewards (file, module, function) on 800 instances, with a max context length of 32K tokens.
Intended Use
CodeScout-1.7B is specifically designed for repository-level code localization. Its primary role is to identify relevant files, classes, and functions within a codebase based on a given GitHub issue description. It is best utilized as a localization subagent within broader coding agent workflows. Currently, it is trained and evaluated exclusively on Python repositories and is not intended for code editing or full issue resolution.