Text Generation
Transformers
Safetensors
qwen3
reinforcement-learning
lora
tau-bench
tool-use
conversational
text-generation-inference
Instructions to use willamazon1/sdft-tau-lora-iter160 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use willamazon1/sdft-tau-lora-iter160 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="willamazon1/sdft-tau-lora-iter160") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("willamazon1/sdft-tau-lora-iter160") model = AutoModelForCausalLM.from_pretrained("willamazon1/sdft-tau-lora-iter160", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use willamazon1/sdft-tau-lora-iter160 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "willamazon1/sdft-tau-lora-iter160" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "willamazon1/sdft-tau-lora-iter160", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/willamazon1/sdft-tau-lora-iter160
- SGLang
How to use willamazon1/sdft-tau-lora-iter160 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "willamazon1/sdft-tau-lora-iter160" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "willamazon1/sdft-tau-lora-iter160", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "willamazon1/sdft-tau-lora-iter160" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "willamazon1/sdft-tau-lora-iter160", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use willamazon1/sdft-tau-lora-iter160 with Docker Model Runner:
docker model run hf.co/willamazon1/sdft-tau-lora-iter160
| 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. | |