openai/gsm8k
Benchmark • Updated • 17.6k • 971k • 1.35k
How to use zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep")
model = AutoModelForCausalLM.from_pretrained("zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep")
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 zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep
How to use zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep" \
--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": "zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep",
"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 "zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep" \
--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": "zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep with Docker Model Runner:
docker model run hf.co/zbeeb/Qwen2.5-0.5B-Instruct-Math-SFT-100K-2ep
Fine-tuned from Qwen/Qwen2.5-0.5B-Instruct on a 100K math reasoning SFT mixture for 2 epochs with learning rate 1e-5.
Prompt format used during training:
System: Please reason step by step, and put your final answer within \boxed{}.
User: {problem}
Assistant: {solution}
Training mixture:
| Source | Count |
|---|---|
| nvidia/OpenMathReasoning CoT | 40,000 |
| AI-MO/NuminaMath-1.5 filtered, no AMC/AIME source | 25,000 |
| meta-math/MetaMathQA | 15,000 |
| MATH train, especially levels 4-5 | 15,000 |
| GSM8K train | 5,000 |
Training summary:
| Setting | Value |
|---|---|
| Base model | Qwen/Qwen2.5-0.5B-Instruct |
| Training examples | 100,000 |
| Epochs | 2 |
| Learning rate | 1e-5 |
| Max sequence length | 4096 |
| Effective batch size | 32 |
| Final train loss | 0.6923 |
| Final token accuracy | about 0.803 |
Evaluation results are not included in this model card yet.