Run this model with HF Jobs

Run willamazon1/Qwen3-8B-SDFT-Math-LoRA-new on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/willamazon1/Qwen3-8B-SDFT-Math-LoRA-new. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/willamazon1/Qwen3-8B-SDFT-Math-LoRA-new on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/willamazon1/Qwen3-8B-SDFT-Math-LoRA-new. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/willamazon1/Qwen3-8B-SDFT-Math-LoRA-new. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
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/Qwen3-8B-SDFT-Math-LoRA-new")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("willamazon1/Qwen3-8B-SDFT-Math-LoRA-new")
model = AutoModelForCausalLM.from_pretrained("willamazon1/Qwen3-8B-SDFT-Math-LoRA-new", 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=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Qwen3-8B-SDFT-Math-LoRA-new

Qwen3-8B (dense, 36 layers, 8.19B params) tuned for mathematical reasoning. This repo holds fully merged bf16 weights โ€” the LoRA adapter has been folded into the base matrices, so it is a drop-in replacement for Qwen/Qwen3-8B-Base; no PEFT adapter loading is required.

Training pipeline

  1. Base: Qwen/Qwen3-8B-Base.
  2. SFT: supervised fine-tuning on a balanced oracle mixture (math / retrieval-augmented QA / tool-use dialogue).
  3. Math RL, stage 1: GRPO on math problems with a verifiable answer-matching reward, training LoRA adapters (rank 16, alpha 32, scaling 2.0) on q/k/v, o_proj, gate/up_proj and down_proj of every layer. The stage-1 adapter was merged into the SFT weights.
  4. Math RL, stage 2 (this checkpoint): RL continued from the stage-1 merged model for 60 more optimizer steps, again with a fresh LoRA adapter of the same shape, which is merged here.

Trained with slime on Megatron-LM (TP=4, CP=2, bf16).

Checkpoint details

Parameters 8.19 B
dtype bfloat16
Tensors 399 (4 safetensors shards, 16.4 GB)
Vocab 151936 (Megatron embedding padding stripped)
Stage-2 relative weight change, per LoRA'd matrix (โ€–ฮ”โ€–/โ€–Wโ€–) 2.8e-5 โ€“ 7.7e-5

Non-finite check: 0 NaN/Inf tensors across all shards.

Usage

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "willamazon1/Qwen3-8B-SDFT-Math-LoRA-new"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16).to("cuda")

prompt = (
    "Question: Natalia sold clips to 48 friends in April, and then she sold "
    "half as many clips in May. How many clips did Natalia sell altogether "
    "in April and May?\nAnswer:"
)
ids = tok(prompt, return_tensors="pt").input_ids.cuda()
out = model.generate(ids, max_new_tokens=128, do_sample=False)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))

This is a base-style (completion) model, not an instruction-tuned chat model: prompt it with Question: ... \nAnswer: style completions rather than a chat template.

Limitations

Stage 2 is a short RL continuation (60 steps), so the weight delta over the stage-1 model is small. The model inherits the biases and knowledge cutoff of Qwen3-8B-Base, and its math answers are not guaranteed correct โ€” verify outputs before relying on them.

Downloads last month
10
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/Qwen3-8B-SDFT-Math-LoRA-new

Adapter
(168)
this model
Merges
1 model