Update env0 mobile Qwen3.5-9B SFT adapter env0-mobile-pr828-qwen35-bf16-lora-8k-h100-20260625T084605Z

#1
Files changed (4) hide show
  1. README.md +201 -141
  2. adapter_config.json +37 -10
  3. adapter_model.safetensors +2 -2
  4. tokenizer_config.json +1 -1
README.md CHANGED
@@ -1,147 +1,207 @@
1
  ---
2
- library_name: peft
3
  base_model: Qwen/Qwen3.5-9B
4
- datasets:
5
- - benchflow/general-agent-qwen35-9b-azure-gpt54mini-sft
6
  tags:
 
7
  - lora
8
- - peft
9
- - sft
10
- - general-agent
11
- - qwen
12
  ---
13
 
14
- # Qwen3.5-9B General-Agent SFT LoRA Adapter
15
-
16
- `v0.0.1` is the completed LoRA SFT release for the Prime `general-agent` reproduction using the full, non-prequantized `Qwen/Qwen3.5-9B` base checkpoint. It does **not** include the base weights; load this adapter on top of `Qwen/Qwen3.5-9B`.
17
-
18
- This release intentionally excludes the next QLoRA run that is currently in progress. That run will be documented and tagged separately after its training and eval finish.
19
-
20
- ## Release Summary
21
-
22
- | Field | Value |
23
- | --- | --- |
24
- | Release tag | `v0.0.1` |
25
- | Adapter repo | `benchflow/benchflow-qwen35-9b` |
26
- | Base checkpoint | `Qwen/Qwen3.5-9B` |
27
- | Base checkpoint form | Full, non-quantized source checkpoint; frozen during LoRA SFT |
28
- | Adapter type | LoRA / PEFT |
29
- | Source completed run | `general-agent-qwen35-9b-sft-seq2048-fresh-20260624T131847Z` |
30
- | W&B project | `general-agent-qwen35-9b-sft-seq2048-fresh-20260624T131847Z` |
31
- | HF training artifacts | `benchflow/env0-experiment-trajectories/experiments/general-agent/general-agent-qwen35-9b-sft-seq2048-fresh-20260624T131847Z` |
32
- | Published at | `2026-06-24 22:27:07 UTC` |
33
-
34
- ## Research Reproduction Scope
35
-
36
- The goal of this adapter is to reproduce the SFT-stage lift from Prime Intellect's `general-agent` work as closely as possible while using a smaller student model that can train on one H100. The stack keeps the Prime-style task and verifier path:
37
-
38
- - Source tasks: open-source `PrimeIntellect-ai/research-environments/environments/general_agent` task corpus.
39
- - Teacher trace generation: `general-agent-solver-rlm` + Azure GPT-5.4-mini through native Verifiers / `vf-eval --save-results` artifacts.
40
- - SFT trainer: Prime-RL SFT.
41
- - Student: full, non-quantized `Qwen/Qwen3.5-9B` loaded in BF16 with LoRA adapters.
42
- - Eval: `general-agent-solver-local` through native `vf-eval --save-results` on the same held-in task sets before and after SFT.
43
-
44
- ## Data Recipe
45
-
46
- | Field | Value |
47
- | --- | --- |
48
- | Dataset | `benchflow/general-agent-qwen35-9b-azure-gpt54mini-sft` |
49
- | Dataset rows | `4414` |
50
- | Original source task count | `4417` |
51
- | Teacher model | Azure GPT-5.4-mini |
52
- | Teacher harness | Prime/Verifiers `general-agent-solver-rlm` |
53
- | Artifact format | Native `vf-eval --save-results` trajectories converted to Prime-RL `messages` + `tool_defs` SFT rows |
54
- | Excluded source tasks | `dog_breeding_t1`, `skydiving_center_t1`, `skydiving_center_t2` |
55
- | Exclusion reason | Stable Azure content-filter blocks during teacher trace generation |
56
- | Full teacher sweep artifact | `benchflow/env0-experiment-trajectories/experiments/general-agent/general-agent-daytona-teacher-full4417-tunnel8-20260624T015706Z` |
57
- | Data validation | Prime SFT JSONL validator rejected non-leading system messages and leakage fields before training |
58
-
59
- ## Training Parameters
60
-
61
- | Field | Value |
62
- | --- | --- |
63
- | Trainer | Prime-RL SFT |
64
- | Model loaded for SFT | `Qwen/Qwen3.5-9B` full BF16 base weights |
65
- | Quantization | None for the completed `v0.0.1` LoRA run |
66
- | Adapter | LoRA |
67
- | LoRA rank | `16` |
68
- | LoRA alpha | `32` |
69
- | LoRA dropout | `0.0` |
70
- | Target modules | `q_proj`, `k_proj`, `v_proj`, `o_proj`, `gate_proj`, `up_proj`, `down_proj` |
71
- | Trainable params | about `29.1M` |
72
- | Adapted base params | about `5.30B` |
73
- | Total base params loaded | about `9.44B` |
74
- | Sequence length | `2048` |
75
- | Global batch size | `8` |
76
- | Micro batch size | `1` |
77
- | Pack function | `cat` |
78
- | Shuffle | `true` |
79
- | Seed | `0` |
80
- | Optimizer | `AdamW` |
81
- | Learning rate | `5e-5` |
82
- | Weight decay | `0.01` |
83
- | Betas | `0.9`, `0.999` |
84
- | Grad norm clip | `1.0` |
85
- | Scheduler | Linear |
86
- | Warmup steps | `20` |
87
- | Decay steps | `180` |
88
- | Minimum LR | `0.0` |
89
- | Max steps | `200` |
90
- | Checkpoint interval | `20` |
91
- | Keep last | `3` |
92
- | Keep interval | `100` |
93
- | Save format | `safetensors` |
94
- | Loss mask | Assistant messages only; system, user, and tool messages are context-only |
95
-
96
- ## Training Result
97
-
98
- | Metric | Value |
99
- | --- | ---: |
100
- | Completed step | `200` |
101
- | Final loss | `0.11897` |
102
- | `loss/nan_count` | `0` |
103
- | Peak GPU memory | about `40.8 GiB` |
104
- | Final adapter | `adapter_model.safetensors` in this repo |
105
-
106
- The initial `data.seq_len=8192` Prime-RL BF16 LoRA attempt OOMed on one H100. The completed `v0.0.1` run used `data.seq_len=2048`, system CUDA 12.8 `nvcc`/`ptxas`, and `g++-12` for the required FLA/TileLang kernels.
107
-
108
- ## Evaluation Results
109
-
110
- All evaluations below use native Verifiers `vf-eval --save-results`, `general-agent-solver-local`, serving context length `4096`, `--enable-auto-tool-choice`, and `--tool-call-parser qwen3_xml`. Dynamic vLLM LoRA loading was not reliable for this stack, so eval served a merged local checkpoint built from this adapter plus `Qwen/Qwen3.5-9B`.
111
-
112
- | Task set | Base pass rate | LoRA SFT pass rate | Delta | Notes |
113
- | --- | ---: | ---: | ---: | --- |
114
- | Held-in 5 smoke | `1/5 = 20.00%` | `2/5 = 40.00%` | `+20.00 pp` | First serving/eval smoke |
115
- | Held-in 20 | `11/20 = 55.00%` | `13/20 = 65.00%` | `+10.00 pp` | Recovered `3d_print_shop_t1`, `accounting_firm_t1` |
116
- | Held-in 36 | `20/36 = 55.56%` | `23/36 = 63.89%` | `+8.33%` | No regressions; recovered `3d_print_shop_t1`, `accounting_firm_t1`, `allergy_clinic_t0` |
117
- | Held-in 50 assembled | `27/50 = 54.00%` | `30/50 = 60.00%` | `+6.00%` | Latest wider held-in result; final 14-task slice had no net delta |
118
- | Held-in 50 final 14-task slice | `7/14 = 50.00%` | `7/14 = 50.00%` | `+0.00%` | Recovered `animation_studio_t0`; regressed `antiquarian_bookshop_t0` |
119
-
120
- Evaluation artifact prefixes:
121
-
122
- - Held-in 5 smoke: `benchflow/env0-experiment-trajectories/experiments/general-agent/general-agent-qwen35-eval-smoke4096-20260624T152150Z`
123
- - Held-in 20 comparison: `benchflow/env0-experiment-trajectories/experiments/general-agent/general-agent-qwen35-eval-heldin20-compare-20260624`
124
- - Held-in 36 comparison: `benchflow/env0-experiment-trajectories/experiments/general-agent/general-agent-qwen35-eval-heldin36-compare-20260624`
125
- - Held-in 50 final 14-task run: `benchflow/env0-experiment-trajectories/experiments/general-agent/general-agent-qwen35-eval-heldin50-gap-20260624T190517Z`
126
-
127
- ## Loading
128
-
129
- ```python
130
- from peft import PeftModel
131
- from transformers import AutoModelForCausalLM, AutoTokenizer
132
-
133
- base = AutoModelForCausalLM.from_pretrained(
134
- "Qwen/Qwen3.5-9B",
135
- torch_dtype="auto",
136
- trust_remote_code=True,
137
- )
138
- model = PeftModel.from_pretrained(base, "benchflow/benchflow-qwen35-9b")
139
- tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-9B", trust_remote_code=True)
140
- ```
141
-
142
- ## Caveats
143
-
144
- - This is an SFT-stage reproduction artifact, not the full Prime paper recipe with the original teacher and student model stack.
145
- - The trainable dataset has `4414` rows rather than `4417` because three Azure teacher prompts were blocked by content filtering.
146
- - The latest held-in50 assembled lift is positive but modest at `+6.00 pp`; gains are concentrated in a small number of tasks rather than broad across-the-board recovery.
147
- - The next QLoRA seq8192 experiment is excluded from `v0.0.1` and should receive its own update/tag only after it completes.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
 
2
  base_model: Qwen/Qwen3.5-9B
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
  tags:
6
+ - base_model:adapter:Qwen/Qwen3.5-9B
7
  - lora
8
+ - transformers
 
 
 
9
  ---
10
 
11
+ # Model Card for Model ID
12
+
13
+ <!-- Provide a quick summary of what the model is/does. -->
14
+
15
+
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ <!-- Provide a longer summary of what this model is. -->
22
+
23
+
24
+
25
+ - **Developed by:** [More Information Needed]
26
+ - **Funded by [optional]:** [More Information Needed]
27
+ - **Shared by [optional]:** [More Information Needed]
28
+ - **Model type:** [More Information Needed]
29
+ - **Language(s) (NLP):** [More Information Needed]
30
+ - **License:** [More Information Needed]
31
+ - **Finetuned from model [optional]:** [More Information Needed]
32
+
33
+ ### Model Sources [optional]
34
+
35
+ <!-- Provide the basic links for the model. -->
36
+
37
+ - **Repository:** [More Information Needed]
38
+ - **Paper [optional]:** [More Information Needed]
39
+ - **Demo [optional]:** [More Information Needed]
40
+
41
+ ## Uses
42
+
43
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
44
+
45
+ ### Direct Use
46
+
47
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
48
+
49
+ [More Information Needed]
50
+
51
+ ### Downstream Use [optional]
52
+
53
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
54
+
55
+ [More Information Needed]
56
+
57
+ ### Out-of-Scope Use
58
+
59
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
60
+
61
+ [More Information Needed]
62
+
63
+ ## Bias, Risks, and Limitations
64
+
65
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
+
67
+ [More Information Needed]
68
+
69
+ ### Recommendations
70
+
71
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
+
73
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
74
+
75
+ ## How to Get Started with the Model
76
+
77
+ Use the code below to get started with the model.
78
+
79
+ [More Information Needed]
80
+
81
+ ## Training Details
82
+
83
+ ### Training Data
84
+
85
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
86
+
87
+ [More Information Needed]
88
+
89
+ ### Training Procedure
90
+
91
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
92
+
93
+ #### Preprocessing [optional]
94
+
95
+ [More Information Needed]
96
+
97
+
98
+ #### Training Hyperparameters
99
+
100
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
101
+
102
+ #### Speeds, Sizes, Times [optional]
103
+
104
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
105
+
106
+ [More Information Needed]
107
+
108
+ ## Evaluation
109
+
110
+ <!-- This section describes the evaluation protocols and provides the results. -->
111
+
112
+ ### Testing Data, Factors & Metrics
113
+
114
+ #### Testing Data
115
+
116
+ <!-- This should link to a Dataset Card if possible. -->
117
+
118
+ [More Information Needed]
119
+
120
+ #### Factors
121
+
122
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
123
+
124
+ [More Information Needed]
125
+
126
+ #### Metrics
127
+
128
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
129
+
130
+ [More Information Needed]
131
+
132
+ ### Results
133
+
134
+ [More Information Needed]
135
+
136
+ #### Summary
137
+
138
+
139
+
140
+ ## Model Examination [optional]
141
+
142
+ <!-- Relevant interpretability work for the model goes here -->
143
+
144
+ [More Information Needed]
145
+
146
+ ## Environmental Impact
147
+
148
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
149
+
150
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
151
+
152
+ - **Hardware Type:** [More Information Needed]
153
+ - **Hours used:** [More Information Needed]
154
+ - **Cloud Provider:** [More Information Needed]
155
+ - **Compute Region:** [More Information Needed]
156
+ - **Carbon Emitted:** [More Information Needed]
157
+
158
+ ## Technical Specifications [optional]
159
+
160
+ ### Model Architecture and Objective
161
+
162
+ [More Information Needed]
163
+
164
+ ### Compute Infrastructure
165
+
166
+ [More Information Needed]
167
+
168
+ #### Hardware
169
+
170
+ [More Information Needed]
171
+
172
+ #### Software
173
+
174
+ [More Information Needed]
175
+
176
+ ## Citation [optional]
177
+
178
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
179
+
180
+ **BibTeX:**
181
+
182
+ [More Information Needed]
183
+
184
+ **APA:**
185
+
186
+ [More Information Needed]
187
+
188
+ ## Glossary [optional]
189
+
190
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
191
+
192
+ [More Information Needed]
193
+
194
+ ## More Information [optional]
195
+
196
+ [More Information Needed]
197
+
198
+ ## Model Card Authors [optional]
199
+
200
+ [More Information Needed]
201
+
202
+ ## Model Card Contact
203
+
204
+ [More Information Needed]
205
+ ### Framework versions
206
+
207
+ - PEFT 0.18.0
adapter_config.json CHANGED
@@ -1,19 +1,46 @@
1
  {
2
- "peft_type": "LORA",
3
- "task_type": "CAUSAL_LM",
 
 
4
  "base_model_name_or_path": "Qwen/Qwen3.5-9B",
5
- "r": 16,
6
- "lora_alpha": 32.0,
7
- "lora_dropout": 0.0,
8
  "bias": "none",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  "target_modules": [
10
- "down_proj",
11
- "gate_proj",
12
- "k_proj",
13
  "o_proj",
 
 
14
  "q_proj",
15
  "up_proj",
16
- "v_proj"
 
17
  ],
18
- "modules_to_save": null
 
 
 
 
 
19
  }
 
1
  {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
  "base_model_name_or_path": "Qwen/Qwen3.5-9B",
 
 
 
7
  "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
10
+ "eva_config": null,
11
+ "exclude_modules": null,
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": true,
14
+ "init_lora_weights": true,
15
+ "layer_replication": null,
16
+ "layers_pattern": null,
17
+ "layers_to_transform": null,
18
+ "loftq_config": {},
19
+ "lora_alpha": 64,
20
+ "lora_bias": false,
21
+ "lora_dropout": 0.05,
22
+ "megatron_config": null,
23
+ "megatron_core": "megatron.core",
24
+ "modules_to_save": null,
25
+ "peft_type": "LORA",
26
+ "peft_version": "0.18.0",
27
+ "qalora_group_size": 16,
28
+ "r": 32,
29
+ "rank_pattern": {},
30
+ "revision": null,
31
  "target_modules": [
 
 
 
32
  "o_proj",
33
+ "v_proj",
34
+ "k_proj",
35
  "q_proj",
36
  "up_proj",
37
+ "gate_proj",
38
+ "down_proj"
39
  ],
40
+ "target_parameters": null,
41
+ "task_type": "CAUSAL_LM",
42
+ "trainable_token_indices": null,
43
+ "use_dora": false,
44
+ "use_qalora": false,
45
+ "use_rslora": false
46
  }
adapter_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fa60aae6e769faad42c7bb6c11a4685c7713da24e60175603e2926c943eaa7cd
3
- size 58233888
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb01c366d71c056bfc133717e7e782c1e4b67c3452cb2adde51b59c305031852
3
+ size 232818064
tokenizer_config.json CHANGED
@@ -21,7 +21,7 @@
21
  "vision_bos_token": "<|vision_start|>",
22
  "vision_eos_token": "<|vision_end|>"
23
  },
24
- "pad_token": "<|im_end|>",
25
  "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
26
  "split_special_tokens": false,
27
  "tokenizer_class": "Qwen2Tokenizer",
 
21
  "vision_bos_token": "<|vision_start|>",
22
  "vision_eos_token": "<|vision_end|>"
23
  },
24
+ "pad_token": "<|endoftext|>",
25
  "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
26
  "split_special_tokens": false,
27
  "tokenizer_class": "Qwen2Tokenizer",