Divij/qwen3-32b-mas-traces
Viewer • Updated • 25.3k • 22
How to use STEVENZHANG904/Qwen3-1.7B-verifier-sft with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="STEVENZHANG904/Qwen3-1.7B-verifier-sft")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("STEVENZHANG904/Qwen3-1.7B-verifier-sft")
model = AutoModelForCausalLM.from_pretrained("STEVENZHANG904/Qwen3-1.7B-verifier-sft", 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]:]))How to use STEVENZHANG904/Qwen3-1.7B-verifier-sft with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "STEVENZHANG904/Qwen3-1.7B-verifier-sft"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "STEVENZHANG904/Qwen3-1.7B-verifier-sft",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/STEVENZHANG904/Qwen3-1.7B-verifier-sft
How to use STEVENZHANG904/Qwen3-1.7B-verifier-sft with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "STEVENZHANG904/Qwen3-1.7B-verifier-sft" \
--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": "STEVENZHANG904/Qwen3-1.7B-verifier-sft",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "STEVENZHANG904/Qwen3-1.7B-verifier-sft" \
--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": "STEVENZHANG904/Qwen3-1.7B-verifier-sft",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use STEVENZHANG904/Qwen3-1.7B-verifier-sft with Docker Model Runner:
docker model run hf.co/STEVENZHANG904/Qwen3-1.7B-verifier-sft
SFT-finetuned Qwen/Qwen3-1.7B on the verifier subset of Divij/qwen3-32b-mas-traces,
which contains traces of Qwen3-32B acting as a verifier agent in a multi-agent system. This model is the
distilled student that learns to play the same role as Qwen3-32B in that pipeline.
| Branch | Epochs trained | Notes |
|---|---|---|
epoch2 |
2 | intermediate |
epoch5 |
5 | intermediate |
main |
10 | final |
Qwen/Qwen3-1.7BDivij/qwen3-32b-mas-traces (config verifier)from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
repo = "STEVENZHANG904/Qwen3-1.7B-verifier-sft"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16, device_map="cuda")
# Verifier role expects a task-spec prompt — see the dataset card for the exact format.
messages = [
{"role": "system", "content": "You are a helpful, creative, and smart assistant."},
{"role": "user", "content": "<your verifier task spec here>"},
]
inputs = tok.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to("cuda")
out = model.generate(
inputs, max_new_tokens=4096,
do_sample=True, temperature=0.6, top_p=0.95, # Qwen3 thinking-mode defaults
)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
The model emits <think>...</think> reasoning blocks (inherited from Qwen3-32B traces).
Use sampling, not greedy decoding — small distilled models can loop in <think> under greedy.