--- license: apache-2.0 base_model: Qwen/Qwen3-8B-Base library_name: transformers pipeline_tag: text-generation tags: - qwen3 - reinforcement-learning - lora - tau-bench - tool-use --- # sdft-tau-lora-iter240 Qwen3-8B, multi-stage SFT (SDFT) checkpoint with a **tau-bench RL LoRA adapter merged in**. Full weights, ready to load with `transformers` / SGLang / vLLM — no PEFT needed. This is iteration **240** of the same run that produced [`willamazon1/sdft-tau-lora-iter160`](https://huggingface.co/willamazon1/sdft-tau-lora-iter160) (80 more RL steps). ## Lineage | Stage | What | |---|---| | Base | `Qwen/Qwen3-8B-Base` | | SDFT | multi-stage SFT chain: Math → Sea → Search → TauSFT → Tau-IF | | RL | GSPO on tau-bench `retail` (train split), LoRA-only (base frozen), iteration 240 | ## RL / LoRA configuration - adapter: rank 16, alpha 32 (scaling = alpha/r = 2.0), dropout 0.0 - targets: `linear_qkv`, `linear_proj`, `linear_fc1`, `linear_fc2` on all 36 layers (144 modules, 288 tensors) - advantage estimator GSPO, KL loss 0.01 (`low_var_kl`), eps-clip 0.2/0.25 - Adam, lr 1e-6 constant, weight decay 0.01 - TIS off (its sequence-level rejection veto zeroes essentially every LoRA sequence) - user simulator: GLM-4.7-Flash served in-cluster (matches tau-bench's LLM-user setup) ## How it was exported The adapter was merged **in Megatron parameter space** (`W += 2.0 · B·A` per LoRA'd module, into the frozen base weights carried by the same `iter_0000240` torch_dist checkpoint), then converted to HuggingFace safetensors. Merging before conversion avoids having to un-fuse the GQA-interleaved QKV and the gate/up split by hand. LayerNorm weights are untouched — the LoRA delta applies to the post-LN matmuls only. Verification performed on this export: - adapter health gate: 144/144 modules have non-zero `lora_B` (max `|lora_B|` = 1.383e-04), so the adapter is genuinely trained rather than sitting at its zero init - relative delta size `‖ΔW‖/‖W‖`: min 4.80e-05, median 6.35e-05, max 1.40e-04 (larger than iter 160's 3.76e-05 / 5.01e-05 / 1.11e-04, as expected after 80 more steps) - 0 non-finite tensors across all 4 shards; 399 tensors, 15.26 GiB, index complete ## Usage ```python from transformers import AutoModelForCausalLM, AutoTokenizer model_id = "willamazon1/sdft-tau-lora-iter240" tok = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto") ``` Note this is derived from a **base** (non-instruct) Qwen3 checkpoint plus SFT/RL stages; use the same prompt format as the tau-bench agent it was trained with rather than assuming a generic chat template.