Text Generation
Transformers
Safetensors
qwen2
code
software-engineering
agent
conversational
text-generation-inference
lllqaq commited on
Commit
9da4baf
·
verified ·
1 Parent(s): 0154e32

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +63 -0
README.md ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FIM-7B Inference on SWE-Bench Verified
2
+
3
+ This guide describes how to run the **FIM-7B** checkpoint on SWE-Bench Verified (and Lite) with the R2E-Gym agent scaffold in this repository.
4
+
5
+ ## Model
6
+
7
+ Local path: `models/FIM-7B/` (checkpoints are gitignored; do not commit them).
8
+
9
+ - Base model: `Qwen/Qwen2.5-Coder-7B-Instruct`
10
+ - FIM mid-training: `train/FIM_Midtrain_7B.yaml`
11
+ - Post-training: SFT on R2E-Gym agent trajectories
12
+
13
+
14
+ ## 1. Serve the model with vLLM
15
+
16
+ ```bash
17
+ CUDA_VISIBLE_DEVICES=0 \
18
+ VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 \
19
+ .venv-vllm/bin/python -m vllm.entrypoints.openai.api_server \
20
+ --model models/FIM-7B \
21
+ --served-model-name FIM-7B \
22
+ --host 127.0.0.1 \
23
+ --port 8400 \
24
+ --tensor-parallel-size 1 \
25
+ --max-model-len 65536 \
26
+ --hf-overrides '{"max_position_embeddings": 65536}' \
27
+ --enable-prefix-caching \
28
+ --gpu-memory-utilization 0.9 \
29
+ > vllm_fim7b.log 2>&1 &
30
+ ```
31
+
32
+
33
+ Wait until the server is up (model load takes ~1 minute):
34
+
35
+ ```bash
36
+ curl -s http://127.0.0.1:8400/v1/models
37
+ ```
38
+
39
+ ## 2. Run the agent on SWE-Bench Verified
40
+
41
+ ```bash
42
+ export OPENAI_API_KEY=EMPTY
43
+ export LLM_BASE_URL="http://127.0.0.1:8400/v1"
44
+
45
+ uv run python src/r2egym/agenthub/run/edit.py runagent_multiple \
46
+ --dataset "R2E-Gym/SWE-Bench-Verified" \
47
+ --split "test" \
48
+ --start_idx 0 \
49
+ --k 500 \
50
+ --traj_dir "./traj" \
51
+ --exp_name "FIM-7B_swebench_verified_r1" \
52
+ --llm_name "openai/FIM-7B" \
53
+ --scaffold "r2egym" \
54
+ --backend "docker" \
55
+ --use_fn_calling False \
56
+ --temperature 0 \
57
+ --max_steps 40 \
58
+ --max_steps_absolute 100 \
59
+ --max_workers 6 \
60
+ --max_reward_calc_time 1200 \
61
+ --max_tokens 65536 \
62
+ --use_existing True
63
+ ```