Text Generation
Transformers
Safetensors
English
qwen2
conversational
text-generation-inference
lllqaq commited on
Commit
db21e3a
Β·
verified Β·
1 Parent(s): aa892a4

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +185 -0
README.md ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SWE-Next: Scalable Real-World Software Engineering Tasks for Agents
2
+
3
+ <p align="center">
4
+ <a href="https://arxiv.org/abs/2603.20691"><img alt="Paper" src="https://img.shields.io/badge/Paper-arXiv-b31b1b?style=for-the-badge&logo=arxiv&logoColor=white"></a>
5
+ <a href="https://tiger-ai-lab.github.io/SWE-Next/"><img alt="Project Page" src="https://img.shields.io/badge/Project%20Page-Website-4285F4?style=for-the-badge&logo=googlechrome&logoColor=white"></a>
6
+ <a href="https://github.com/TIGER-AI-Lab/SWE-Next"><img alt="Code" src="https://img.shields.io/badge/Code-GitHub-181717?style=for-the-badge&logo=github&logoColor=white"></a>
7
+ <a href="https://huggingface.co/datasets/TIGER-Lab/SWE-Next-SFT-Trajectories"><img alt="SFT Trajs" src="https://img.shields.io/badge/SFT%20Trajs-HuggingFace-FFD21E?style=for-the-badge&logo=huggingface&logoColor=000"></a>
8
+ <a href="https://huggingface.co/datasets/TIGER-Lab/SWE-Next"><img alt="Dataset" src="https://img.shields.io/badge/Dataset-HuggingFace-FFD21E?style=for-the-badge&logo=huggingface&logoColor=000"></a>
9
+ <a href="https://huggingface.co/TIGER-Lab/SWE-Next-7B"><img alt="Model 7B" src="https://img.shields.io/badge/Model%207B-HuggingFace-FFD21E?style=for-the-badge&logo=huggingface&logoColor=000"></a>
10
+ <a href="https://huggingface.co/TIGER-Lab/SWE-Next-14B"><img alt="Model 14B" src="https://img.shields.io/badge/Model%2014B-HuggingFace-FFD21E?style=for-the-badge&logo=huggingface&logoColor=000"></a>
11
+ </p>
12
+
13
+ ## πŸ“° News
14
+
15
+ - **2026-04-07**: SWE-Next is now publicly released!
16
+
17
+ ## πŸ“– Introduction
18
+
19
+ **SWE-Next** introduces reusable **repo-quarter profiles**, which reuse the same environment across nearby commits in time while keeping each task run separate and reproducible. Using only **30 hours** and **639GB** of environment storage, SWE-Next processes **3,971** seed repositories and **102,582** candidate commit pairs mined from real merged PRs to construct a dataset of **2,308** self-verifying instances. SWE-Next improves downstream pass@1 on SWE-Bench Verified and SWE-Bench Lite with fewer or comparable training trajectories, making large-scale executable data collection far more practical and accessible for research.
20
+
21
+
22
+
23
+ ## ✨ Highlights
24
+
25
+ - **Scaled Environment Generation** β€” SWE-Next is an execution-grounded framework that turns real merged-PR commits into self-verifying SWE tasks, and pairs them with high-signal trajectories.
26
+
27
+ - **Repo-quarter Profiles** - A reusable environment mechanism that amortizes build and storage cost across temporally nearby commits, substantially reducing resource requirements and accelerating large-scale executable SWE data collection.
28
+
29
+
30
+ ## πŸ› οΈ Setup
31
+
32
+ ### Prerequisites
33
+
34
+ - Python 3.10+
35
+ - Docker (for environment execution)
36
+ - [uv](https://github.com/astral-sh/uv) package manager
37
+
38
+ ### Installation
39
+
40
+ ```bash
41
+ curl -LsSf https://astral.sh/uv/install.sh | sh
42
+ source $HOME/.local/bin/env
43
+
44
+ git clone https://github.com/TIGER-AI-Lab/SWE-Next.git
45
+ cd SWE-Next
46
+ uv venv && source .venv/bin/activate
47
+ uv sync && uv pip install -e .
48
+ ```
49
+
50
+ ## πŸ€— Data & Models
51
+
52
+ Pre-built artifacts are available on HuggingFace. Download them into `data/` before running the pipeline:
53
+
54
+ | Artifact | Description | Download |
55
+ |----------|-------------|---------|
56
+ | `packages_python_filtered` | 3,900+ Python package list used as pipeline input | `huggingface-cli download TIGER-Lab/packages_python_filtered --repo-type dataset --local-dir data/packages_python_filtered` |
57
+ | `new_commit_better_repos` | Repos with confirmed NEW_COMMIT_BETTER commits | `huggingface-cli download TIGER-Lab/new_commit_better_repos --repo-type dataset --local-dir data/new_commit_better_repos` |
58
+ | `SWE-Next` | Final curated dataset (2,308 instances) | `huggingface-cli download TIGER-Lab/SWE-Next --repo-type dataset --local-dir data/SWE-Next` |
59
+ | `SWE-Next-SFT-Trajectories` | SFT training trajectories | `huggingface-cli download TIGER-Lab/SWE-Next-SFT-Trajectories --repo-type dataset --local-dir data/SWE-Next-SFT-Trajectories` |
60
+
61
+ Pre-trained models:
62
+
63
+ | Model | Download |
64
+ |-------|---------|
65
+ | SWE-Next-7B | `huggingface-cli download TIGER-Lab/SWE-Next-7B --repo-type model --local-dir LlamaFactory/saves/SWE_Next_7B` |
66
+ | SWE-Next-14B | `huggingface-cli download TIGER-Lab/SWE-Next-14B --repo-type model --local-dir LlamaFactory/saves/SWE_Next_14B` |
67
+
68
+ ## 🐳 Environment Generation
69
+
70
+ SWE-Next extends environment generation to 3,900+ Python packages.
71
+
72
+ The supported package list is maintained in [`data/packages_python_filtered/packages_python_filtered.csv`](data/packages_python_filtered/packages_python_filtered.csv) and target repositories in [`data/new_commit_better_repos/new_commit_better_repos.csv`](data/new_commit_better_repos/new_commit_better_repos.csv).
73
+
74
+ ## πŸš€ Data Pipeline (One-Click)
75
+
76
+ `run_pr_pipeline.zsh` automates the full data collection pipeline. It reads `data/packages_python_filtered/packages_python_filtered.csv`, clones the repos automatically, and processes them end-to-end. If the CSV is not present it falls back to repos already cloned under `outputs/upstream_repos/`.
77
+
78
+ **Prerequisites:** copy `.env.template` to `.env` and fill in your credentials:
79
+ ```
80
+ OPENAI_API_KEY=... # required for synthetic issue generation
81
+ GITHUB_TOKEN=... # required for fetching PRs
82
+ DOCKERHUB_USERNAME=... # required for pushing Docker images
83
+ DOCKERHUB_TOKEN=...
84
+ DOCKERHUB_NAMESPACE=... # your Docker Hub namespace
85
+ ```
86
+
87
+ **Option 1 β€” Dataset only** (runs until `outputs/all_new_commit_better_pr.jsonl` is produced, no trajectories):
88
+ ```bash
89
+ PR_GEN_TRAJ=0 zsh run_pr_pipeline.zsh
90
+ ```
91
+
92
+ **Option 2 β€” Dataset + trajectories** (continues to run GPT-5-mini on the collected instances):
93
+ ```bash
94
+ PR_GEN_TRAJ=1 PR_TRAJ_LLM_NAME=gpt-5-mini zsh run_pr_pipeline.zsh
95
+ ```
96
+
97
+ To process a specific repo only:
98
+ ```bash
99
+ PR_GEN_TRAJ=0 zsh run_pr_pipeline.zsh owner/repo
100
+ ```
101
+
102
+ ## πŸ‹οΈ Training
103
+
104
+ ### Step 1 β€” Generate SFT Trajectories
105
+
106
+ Download the SWE-Next dataset first (see [Data & Models](#data--models)), then collect trajectories using a frontier LLM:
107
+
108
+ ```bash
109
+ python src/swenext/agenthub/run/edit.py runagent_multiple \
110
+ --dataset "data/SWE-Next/SWE_Next_dataset.jsonl" \
111
+ --traj_dir "./traj/swe_next_sft" \
112
+ --max_workers 8 \
113
+ --k -1 \
114
+ --llm_name "gpt-5-mini" \
115
+ --use_fn_calling True \
116
+ --temperature 0.2 \
117
+ --max_steps 40 \
118
+ --backend "docker"
119
+ ```
120
+
121
+ Or skip this step and use the pre-collected trajectories from HuggingFace (download `SWE-Next-SFT-Trajectories` above).
122
+
123
+ ### Step 2 β€” SFT Training
124
+
125
+ Clone [LlamaFactory](https://github.com/hiyouga/LLaMA-Factory) into the project root first:
126
+
127
+ ```bash
128
+ git clone https://github.com/hiyouga/LLaMA-Factory.git LlamaFactory
129
+ ```
130
+
131
+ Install LlamaFactory dependencies, then train (run from the project root):
132
+
133
+ ```bash
134
+ cd LlamaFactory && pip install -e ".[torch,metrics]" && cd ..
135
+
136
+ # Train 7B agent
137
+ llamafactory-cli train train/swe_next_7B.yaml
138
+
139
+ # Train 14B agent
140
+ llamafactory-cli train train/swe_next_14B.yaml
141
+ ```
142
+
143
+ Trained model checkpoints will be saved to `LlamaFactory/saves/SWE_Next_7B` and `LlamaFactory/saves/SWE_Next_14B`.
144
+
145
+ ### Step 3 β€” Evaluate on SWE-Bench Verified
146
+
147
+ Start a vLLM server with the trained model, then run evaluation:
148
+
149
+ ```bash
150
+ # Start vLLM server (in a separate terminal)
151
+ vllm serve LlamaFactory/saves/SWE_Next_7B \
152
+ --served-model-name SWE-Next-7B \
153
+ --port 8000
154
+
155
+ # Run evaluation on SWE-Bench Verified (8 parallel workers)
156
+ export LLM_BASE_URL="http://127.0.0.1:8000/v1"
157
+
158
+ python src/swenext/agenthub/run/edit.py runagent_multiple \
159
+ --dataset "R2E-Gym/SWE-Bench-Verified" \
160
+ --split "test" \
161
+ --traj_dir "./traj/swe_bench_verified" \
162
+ --max_workers 8 \
163
+ --k -1 \
164
+ --llm_name "openai/SWE-Next-7B" \
165
+ --use_fn_calling False \
166
+ --temperature 1 \
167
+ --max_steps 40 \
168
+ --backend "docker"
169
+ ```
170
+
171
+ > Use the official [SWE-Bench evaluation harness](https://github.com/SWE-bench/SWE-bench) for final reported scores.
172
+
173
+ ## πŸ“ Citation
174
+
175
+ ```bibtex
176
+ @misc{liang2026swenextscalablerealworldsoftware,
177
+ title={SWE-Next: Scalable Real-World Software Engineering Tasks for Agents},
178
+ author={Jiarong Liang and Zhiheng Lyu and Zijie Liu and Xiangchao Chen and Ping Nie and Kai Zou and Wenhu Chen},
179
+ year={2026},
180
+ eprint={2603.20691},
181
+ archivePrefix={arXiv},
182
+ primaryClass={cs.SE},
183
+ url={https://arxiv.org/abs/2603.20691},
184
+ }
185
+ ```