Text Generation
Transformers
Safetensors
English
qwen3
code-search
code-localization
reinforcement-learning
agent
software-engineering
GSPO
OpenHands
SWE-Bench
conversational
text-generation-inference
Instructions to use OpenHands/CodeScout-1.7B-RFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenHands/CodeScout-1.7B-RFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenHands/CodeScout-1.7B-RFT") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OpenHands/CodeScout-1.7B-RFT") model = AutoModelForCausalLM.from_pretrained("OpenHands/CodeScout-1.7B-RFT") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OpenHands/CodeScout-1.7B-RFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenHands/CodeScout-1.7B-RFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenHands/CodeScout-1.7B-RFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OpenHands/CodeScout-1.7B-RFT
- SGLang
How to use OpenHands/CodeScout-1.7B-RFT with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "OpenHands/CodeScout-1.7B-RFT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenHands/CodeScout-1.7B-RFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "OpenHands/CodeScout-1.7B-RFT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenHands/CodeScout-1.7B-RFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use OpenHands/CodeScout-1.7B-RFT with Docker Model Runner:
docker model run hf.co/OpenHands/CodeScout-1.7B-RFT
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -26,6 +26,10 @@ datasets:
|
|
| 26 |
|
| 27 |
**Pre-RL checkpoint — rejection fine-tuned on expert trajectories from CodeScout-14B.**
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
CodeScout-1.7B-RFT is part of the **CodeScout** family of open-source RL-trained code search agents.
|
| 30 |
CodeScout 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.
|
| 31 |
|
|
@@ -51,6 +55,13 @@ Performance on SWE-Bench code localization (instance-averaged F1 scores):
|
|
| 51 |
| **SWE-Bench Lite** — Func F1 | 27.07 | 39.87 | **44.43** |
|
| 52 |
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
## Training
|
| 55 |
|
| 56 |
CodeScout-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.
|
|
|
|
| 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 |
+
|
| 33 |
CodeScout-1.7B-RFT is part of the **CodeScout** family of open-source RL-trained code search agents.
|
| 34 |
CodeScout 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 |
|
|
|
|
| 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 |
## Training
|
| 66 |
|
| 67 |
CodeScout-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.
|