Instructions to use WhiteGiverPlus/Qwen3.5-2B-metamath with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use WhiteGiverPlus/Qwen3.5-2B-metamath with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-2B") model = PeftModel.from_pretrained(base_model, "WhiteGiverPlus/Qwen3.5-2B-metamath") - Transformers
How to use WhiteGiverPlus/Qwen3.5-2B-metamath with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WhiteGiverPlus/Qwen3.5-2B-metamath") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("WhiteGiverPlus/Qwen3.5-2B-metamath", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use WhiteGiverPlus/Qwen3.5-2B-metamath with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WhiteGiverPlus/Qwen3.5-2B-metamath" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WhiteGiverPlus/Qwen3.5-2B-metamath", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/WhiteGiverPlus/Qwen3.5-2B-metamath
- SGLang
How to use WhiteGiverPlus/Qwen3.5-2B-metamath 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 "WhiteGiverPlus/Qwen3.5-2B-metamath" \ --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": "WhiteGiverPlus/Qwen3.5-2B-metamath", "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 "WhiteGiverPlus/Qwen3.5-2B-metamath" \ --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": "WhiteGiverPlus/Qwen3.5-2B-metamath", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use WhiteGiverPlus/Qwen3.5-2B-metamath with Docker Model Runner:
docker model run hf.co/WhiteGiverPlus/Qwen3.5-2B-metamath
Qwen3.5-2B-metamath 8192 speed estimate
- Data: metamath-output/setmm-train-qwen35-4b-mixed-12000, 4000 original + 12000 expanded.
- max_length=8192 keeps about 14492/16000 examples from tokenizer length scan.
- Training config: Qwen3.5-2B base, FLA fast path available, LoRA rank 32/alpha 64/dropout 0.05, bf16, gradient checkpointing, lr=5e-4, 1 epoch.
- Batch: per-device train batch size 2, gradient accumulation 8 on one GPU, effective batch size about 16.
- Smoke run: 59 train examples, 4 optimizer steps, runtime 120.9s. First step was about 94s due to compile/init; later steps were about 8-11s/step on the short smoke sample.
- Full 1-epoch steps: about 888 optimizer steps after 2% eval split.
- Estimated full runtime: roughly 4-8 hours depending on length mix, checkpoint/eval cost, and whether the compiled kernels stay warm.
- Log: /data/pretrained_models/Qwen3.5-2B-metamath/train-8192.log
- PID file: /data/pretrained_models/Qwen3.5-2B-metamath/train-8192.pid