meta-math/MetaMathQA
Viewer • Updated • 395k • 59.3k • 457
How to use SkyAsl/Qwen-3-4B-Math_Solver with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="SkyAsl/Qwen-3-4B-Math_Solver")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("SkyAsl/Qwen-3-4B-Math_Solver", dtype="auto")How to use SkyAsl/Qwen-3-4B-Math_Solver with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "SkyAsl/Qwen-3-4B-Math_Solver"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "SkyAsl/Qwen-3-4B-Math_Solver",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/SkyAsl/Qwen-3-4B-Math_Solver
How to use SkyAsl/Qwen-3-4B-Math_Solver with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "SkyAsl/Qwen-3-4B-Math_Solver" \
--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": "SkyAsl/Qwen-3-4B-Math_Solver",
"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 "SkyAsl/Qwen-3-4B-Math_Solver" \
--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": "SkyAsl/Qwen-3-4B-Math_Solver",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use SkyAsl/Qwen-3-4B-Math_Solver with Docker Model Runner:
docker model run hf.co/SkyAsl/Qwen-3-4B-Math_Solver
https://huggingface.co/datasets/meta-math/MetaMathQA
batch_size = 8, epoch = 1, learning_rate = 1e-4
Lora: r=16, lora_alpha=32, lora_dropout=0.05
metrics={'train_runtime': 729.5559, 'train_samples_per_second': 9.746, 'train_steps_per_second': 0.306, 'total_flos': 7.949170591137792e+16, 'train_loss': 2.817356810976037, 'epoch': 1.0}
docker model run hf.co/SkyAsl/Qwen-3-4B-Math_Solver