A rank-32 LoRA adapter over Qwen/Qwen3.5-9B at revision
c202236235762e1c871ad0ccb60c8ee5ba337b9a, trained by supervised fine-tuning on verified agentic trajectories (software
engineering and terminal tasks) from open-weight teachers plus a retention slice of maths, science, instruction-following
and chat. It is a research checkpoint from the iterative SFT study behind the "LoRA SFT" version of a three-version
comparison (Base, SFT, stage 2) on SWE-bench Pro, Terminal-Bench 2.0, and HLE; code, data cards: https://github.com/Deanpuzzleai/qwen3.5-9b-sft
Revision 7. The run sft_v7_20261013_221813: the revision-6 recipe (one epoch, LR 2e-5) with an effective batch
of 12, on new data (revision v7r1) from the same sources: one random passing attempt per SWE task with recovery
attempts first, adaptive thinking masks on the SWE turns (short reasoning on routine turns, longer reasoning kept only
at decision points), and terminal rows mostly from DeepSeek-V4-Pro and Kimi-K3 passing trials with per-turn guards. Its
learning-rate arm (LR 5e-5, batch 16, same data) is
deanoshuang/qwen3.5-9b-agent-sft-v7-lr5e5-lora.
from peft import PeftModel
from transformers import AutoModelForImageTextToText
model = PeftModel.from_pretrained(
AutoModelForImageTextToText.from_pretrained("Qwen/Qwen3.5-9B", revision="c202236235762e1c871ad0ccb60c8ee5ba337b9a", dtype="bfloat16"),
"deanoshuang/qwen3.5-9b-agent-sft-v7-lora", revision="f846ad9e0992ecb7687da54de2ea0002d58e2066")
The adapter loads into the served class Qwen3_5ForConditionalGeneration (vision tower unchanged and frozen; the adapter
touches only the language model). Tokenizer and chat template are the base revision's (copies in this repository:
tokenizer.json, tokenizer_config.json, chat_template.jinja); reasoning ("thinking") mode is the model's default.
For serving, merge with scripts/merge_adapter.sh merge (bf16) and serve with vLLM using the flags in
configs/eval/model.yaml. No extra authorisation is needed: the base and this repository are public.
All six share the base revision, the LoRA shape and the loss masking; they differ in training data and optimiser setting.
| Repository | Checkpoint | Data revision | LR, effective batch, epochs |
|---|---|---|---|
| deanoshuang/qwen3.5-9b-agent-sft-lora | first build, step 350 of 350 | first build (data/README.md) |
1e-4, 16, 1 |
| deanoshuang/qwen3.5-9b-agent-sft-efficient-lora | revision 5, end of epoch 1 (step 239 of 478) | v5 (data/README_v5.md) |
1e-4, 16, 2 |
| deanoshuang/qwen3.5-9b-agent-sft-v5ep2-lora | revision 5, end of epoch 2 (step 478 of 478) | v5 (data/README_v5.md) |
1e-4, 16, 2 |
| deanoshuang/qwen3.5-9b-agent-sft-v6-lora | revision 6, step 323 of 323 | v6r2 (data/README_v6.md) |
2e-5, 16, 1 |
| deanoshuang/qwen3.5-9b-agent-sft-v7-lora | revision 7, step 298 of 298 | v7r1 (data/README_v7.md) |
2e-5, 12, 1 |
| deanoshuang/qwen3.5-9b-agent-sft-v7-lr5e5-lora | revision 7 LR arm, step 223 of 223 | v7r1 (data/README_v7.md) |
5e-5, 16, 1 |
| Item | Value |
|---|---|
| Method | LoRA SFT, loss on assistant turns only (reasoning, content, tool calls); observations, prompts and masked turns are context only |
| LoRA | r 32, alpha 64, dropout 0.05, no bias; q/k/v/o_proj, in_proj_qkv/z/b/a, out_proj, gate/up/down_proj of all 32 layers (12 target modules); 86,556,672 trainable parameters; no quantization (bf16) |
| Data | revision v7r1 (mixture run data_mixture_v7_20261013_221306, frozen 2026-10-13T22:17:00Z; data card data/README_v7.md): 3,566 training rows, 9,048,308 loss tokens (37.3 % SWE / 33.2 % terminal / 29.5 % retention); row cap 65,536 tokens; training-file sha256 15e731d3de1cee94d0abe833fad70400b753caea619962645558b449512d71ae |
| Optimiser | AdamW, LR 2e-5 cosine over 1 epoch (298 steps), 3 % warm-up, weight decay 0, grad clip 1.0, effective batch 12 (1 sequence x 12 accumulation steps), loss averaged over tokens, seed 42 |
| Checkpoint | final, step 298 of 298 (the run's final checkpoint; no checkpoint selection) |
| Validation loss | 0.5327 at step 298 on the run's own 200-row validation shard (task-grouped; shards differ between data revisions, so losses compare only within one revision) |
| Hardware and time | 1 x NVIDIA B200; 1.97 h, 8,693 tokens/s, peak memory 71.6 GB, 1.98 GPU-h, ~16 USD |
| Run | sft_v7_20261013_221813 at code commit c75750198a6067b1f5860055ccf748083eeeb4f9; config, launch command, seed, data version and resources in logs/sft_v7_20261013_221813/ of the code repository |
All loss-bearing text comes from open-weight teachers, taken from public Hugging Face datasets; no closed-model (Claude,
GPT, Gemini) traces. Each row keeps the source's own label, shown in the table's Label column: verifier (the
source's execution verdict passed: Open-SWE-Traces resolved, TermGrade reward), reference (the source's
reference answer) or format (format-checked only: science and chat rows). The data card (data/README_v7.md in the code
repository) gives sizes, slice construction, screens, gates and per-row provenance.
Revision 7 slices (numbers from the data card, training and validation rows together):
Sources and licences (from the data card; rows and loss tokens include the validation shard):
| Slice | Dataset | Revision | Licence | Generator | Label | Rows | Loss tokens |
|---|---|---|---|---|---|---|---|
| retention | nvidia/Nemotron-SFT-Instruction-Following-Chat-v3 | be3b3e04ef60 | CC-BY-4.0 AND ODC-BY-1.0 | openai/GPT-OSS-120B | reference | 304 | 660,834 |
| retention | nvidia/Nemotron-SFT-Instruction-Following-Chat-v3 | be3b3e04ef60 | CC-BY-4.0 AND ODC-BY-1.0 | zai-org/GLM-5 | format | 139 | 318,578 |
| retention | nvidia/Nemotron-SFT-Math-v4 | 84d42ad0cb96 | CC-BY-4.0 | deepseek-ai/DeepSeek-V4-Pro (High) | reference | 201 | 1,415,450 |
| retention | nvidia/Nemotron-Science-v1 | 82e1af468197 | CC-BY-4.0 | openai/GPT-OSS-120B | format | 149 | 218,930 |
| retention | nvidia/Nemotron-Science-v1 | 82e1af468197 | CC-BY-4.0 | openai/GPT-OSS-120B | format | 68 | 180,622 |
| swe | nvidia/Open-SWE-Traces | e192b26a43b8 | CC-BY-4.0 | Qwen3.8-27B | verifier | 124 | 1,509,189 |
| swe | nvidia/Open-SWE-Traces | e192b26a43b8 | CC-BY-4.0 | Qwen3.8-27B | verifier | 197 | 2,081,179 |
| terminal | ai-and/termgrade-trajectories | 7d584d63dd59 | apache-2.0 | Qwen/Qwen3.6-27B | verifier | 383 | 523,931 |
| terminal | ai-and/termgrade-trajectories | 7d584d63dd59 | apache-2.0 | deepseek-ai/DeepSeek-V4-Pro | verifier | 923 | 1,584,708 |
| terminal | ai-and/termgrade-trajectories | 7d584d63dd59 | apache-2.0 | google/gemma-4-31B-it (reasoning enabled) | verifier | 12 | 22,443 |
| terminal | ai-and/termgrade-trajectories | 7d584d63dd59 | apache-2.0 | moonshotai/Kimi-K3 | verifier | 1,266 | 1,077,043 |
Benchmark tasks and their repositories were excluded from every training source by decontamination screens (data card, "Screens and decontamination").
Attribution. This adapter was trained on data derived from:
Changes made: rows were selected, filtered, re-rendered into the Qwen3.5 chat template and partly loss-masked as described above and in the data card. The teacher of each row is named in the table above.
Research: reproducing and comparing the checkpoints of this study, and a starting point for further post-training of Qwen3.5-9B as a tool-using agent with reasoning on, for software-engineering tasks (mini-swe-agent style shell actions in a code repository, with tests) and terminal tasks (Terminus-2 style command turns). Run agent actions in a sandbox. Not intended for production use, for unsupervised command execution on systems that matter, or for high-stakes decisions.
Evaluation in progress: benchmark runs of this checkpoint under the study's locked protocols (configs/eval/) were
running when this card was published. This card reports no scores; per-task outputs, verdicts and run status are kept
in results/sft/ of the code repository, and aggregates come only from scripts/summarize.py on those raw results.
verifier label checks the final outcome, not
every step, and format rows are not checked for correctness.The adapter weights are released under Apache-2.0 (the base model's licence). Training data licences and attributions: see above; repository code quoted in the training rows keeps its own licence (MIT, Apache-2.0, BSD).
Qwen/Qwen3.5-9B