Text Generation
Transformers
Safetensors
English
Chinese
qwen3
code
sft
full-sft
think
curriculum
llama-factory
conversational
text-generation-inference
Instructions to use ggbetz/qwen3-4b-think-s1-full-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ggbetz/qwen3-4b-think-s1-full-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ggbetz/qwen3-4b-think-s1-full-sft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ggbetz/qwen3-4b-think-s1-full-sft") model = AutoModelForCausalLM.from_pretrained("ggbetz/qwen3-4b-think-s1-full-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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ggbetz/qwen3-4b-think-s1-full-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ggbetz/qwen3-4b-think-s1-full-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": "ggbetz/qwen3-4b-think-s1-full-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ggbetz/qwen3-4b-think-s1-full-sft
- SGLang
How to use ggbetz/qwen3-4b-think-s1-full-sft 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 "ggbetz/qwen3-4b-think-s1-full-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": "ggbetz/qwen3-4b-think-s1-full-sft", "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 "ggbetz/qwen3-4b-think-s1-full-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": "ggbetz/qwen3-4b-think-s1-full-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ggbetz/qwen3-4b-think-s1-full-sft with Docker Model Runner:
docker model run hf.co/ggbetz/qwen3-4b-think-s1-full-sft
How to use from
vLLMUse Docker
docker model run hf.co/ggbetz/qwen3-4b-think-s1-full-sftQuick Links
modrill/qwen3-4b-think-s1-full-sft
Full-parameter supervised fine-tuning (SFT) of Qwen/Qwen3-4B-Base on the think_s1 curriculum stage (easy + medium code reasoning data). This checkpoint is Stage1 of the think curriculum (checkpoint-1094).
Related models
- Think baseline full SFT: modrill/qwen3-4b-think-baseline-full-sft
- Nothink baseline full SFT: modrill/qwen3-4b-nothink-baseline-full-sft
Training summary
| Field | Value |
|---|---|
| Method | Full SFT (DeepSpeed ZeRO-2) |
| Dataset | think_s1 (easy + medium, 72,555 samples) |
| Chat template | qwen3 |
| Thinking mode | enable_thinking=true |
| Cutoff length | 16384 |
| Packing | true (neat_packing) |
| Epochs | 2 |
| Global batch | 64 (4 GPU × 4 × 4) |
| Learning rate | 1e-5 |
| LR schedule | cosine, warmup 10% |
| Train steps | 1094 |
| Final train loss | ~0.57 |
| Finished | 2026-06-09 |
Eval (EvalScope, release_latest / AIME)
| Benchmark | pass@1 | Config |
|---|---|---|
| LiveCodeBench | 36.06% | t=0.6, p=0.95, max_tokens=16384 |
| AIME24 | 16.67% | same sampling, max_tokens=16384 |
| AIME25 | 3.33% | same sampling, max_tokens=16384 |
Usage
HuggingFace Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "modrill/qwen3-4b-think-s1-full-sft"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id, trust_remote_code=True, torch_dtype="auto", device_map="auto"
)
vLLM
python -m vllm.entrypoints.openai.api_server \
--model modrill/qwen3-4b-think-s1-full-sft \
--served-model-name think-s1 \
--max-model-len 32768 \
--port 8801
Inference tips
- Use Qwen3 chat template with thinking enabled
- Recommended eval
max_tokens: 16384 (matches training cutoff) - Sampling: temperature=0.6, top_p=0.95, top_k=20
License
Apache 2.0, consistent with the Qwen3 base model license.
- Downloads last month
- 323
Model tree for ggbetz/qwen3-4b-think-s1-full-sft
Base model
Qwen/Qwen3-4B-Base
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "ggbetz/qwen3-4b-think-s1-full-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": "ggbetz/qwen3-4b-think-s1-full-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'