Text Generation
Transformers
Safetensors
qwen2
qwen2.5
lora
math
reasonmaxxer
conversational
text-generation-inference
Instructions to use Ba2han/math-test-maxx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ba2han/math-test-maxx with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ba2han/math-test-maxx") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ba2han/math-test-maxx") model = AutoModelForCausalLM.from_pretrained("Ba2han/math-test-maxx", 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 Ba2han/math-test-maxx with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ba2han/math-test-maxx" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ba2han/math-test-maxx", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ba2han/math-test-maxx
- SGLang
How to use Ba2han/math-test-maxx 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 "Ba2han/math-test-maxx" \ --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": "Ba2han/math-test-maxx", "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 "Ba2han/math-test-maxx" \ --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": "Ba2han/math-test-maxx", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Ba2han/math-test-maxx with Docker Model Runner:
docker model run hf.co/Ba2han/math-test-maxx
math-test-maxx
Merged 16-bit weights: unsloth/Qwen2.5-3B-Instruct + ReasonMaxxer offline-search LoRA (v2 recipe).
Source: ansz42/ReasonMaxxer
(offline_search/, pack configs/test_pack_qwen25_3b.yaml).
Same-protocol greedy 0-shot
vLLM, boxed chat prompt, MathVerifier. Not the official 8-shot Qwen numbers.
| Model | GSM8K (n=1319) | MATH-500 (n=500) |
|---|---|---|
Base unsloth/Qwen2.5-3B-Instruct |
84.6% | 61.6% |
| This merge | 85.0% | 62.8% |
| vs base | +0.4 pp | +1.2 pp |
An earlier train recipe (lr 2e-4, batch 1×4, clip 1.0) regressed to 82.9% / 53.8%. This upload is the milder retry.
Train recipe (preferred)
| Knob | Value |
|---|---|
| LoRA | r=16, α=32, QKVO |
| learning_rate | 2e-5 |
| batch × grad accum | 2 × 4 (effective 8) |
| max_grad_norm | 0.1 |
| data | 300 MATH-500 items (seed 42), 12 offline search samples, entropy-weighted signed loss |
| steps | 774 micro-steps / 194 Adam updates (one pass over informative rows) |
In-loop 300-item eval (temp 0.6, n=4): pass@1 61.3%, pass@4 74.0%.
- Downloads last month
- -