willamazon1's picture
SDFT base + merged tau-bench RL LoRA adapter (iter 160)
fe981d4 verified
|
Raw
History Blame Contribute Delete
2.43 kB
---
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-iter160
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.
## 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 160 |
## 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_0000160` 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 the export:
- adapter health gate: 144/144 modules have non-zero `lora_B` (max `|lora_B|` = 9.82e-05),
so the adapter is genuinely trained rather than sitting at its zero init
- relative delta size `‖ΔW‖/‖W‖`: min 3.76e-05, median 5.01e-05, max 1.11e-04
- 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-iter160"
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.