How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="willamazon1/sdft-search-lora-iter20")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("willamazon1/sdft-search-lora-iter20")
model = AutoModelForCausalLM.from_pretrained("willamazon1/sdft-search-lora-iter20", 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]:]))
Quick Links

sdft-search-lora-iter20

A Qwen3-8B model fine-tuned for retrieval-augmented (search-R1 style) multi-turn reasoning. This is a LoRA adapter merged back into the full model and exported as standard HuggingFace safetensors.

Training

  • Base / init: Qwen3-8B-Base after a supervised fine-tuning (SDFT) cold-start (oracle-mix SFT), then RL.
  • Method: Search-R1 style RL (GRPO/GSPO) in the slime framework, with a co-located GPU-faiss retriever over a Wikipedia-2018 index.
  • Parameter-efficient: LoRA, rank r=16, alpha=32 (scaling alpha/r = 2.0), applied to linear_qkv, linear_proj, linear_fc1, linear_fc2 in every layer.
  • Checkpoint: RL iteration 20. The adapter (all 144 lora_B factors nonzero) is merged into the base weights: W ← W + (alpha/r) · B @ A per target module.

Note: This is an early checkpoint (20 RL steps). The merged delta over the SDFT base is small (relative Frobenius norm ~1e-2 per projection matrix), so the model behaves very close to the SDFT base with an initial RL update applied.

Architecture

Qwen3, 36 layers, hidden 4096, 32 attn heads / 8 KV heads (GQA), intermediate 12288, vocab 151936, bf16. Identical arch to Qwen3-8B-Base.

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

tok = AutoTokenizer.from_pretrained("willamazon1/sdft-search-lora-iter20")
model = AutoModelForCausalLM.from_pretrained(
    "willamazon1/sdft-search-lora-iter20", dtype=torch.bfloat16, device_map="cuda"
)
ids = tok("The capital of France is", return_tensors="pt").input_ids.cuda()
print(tok.decode(model.generate(ids, max_new_tokens=16)[0]))
Downloads last month
19
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for willamazon1/sdft-search-lora-iter20

Adapter
(83)
this model