Instructions to use zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt") model = AutoModelForCausalLM.from_pretrained("zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt", 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 zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt
- SGLang
How to use zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt 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 "zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt" \ --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": "zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt", "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 "zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt" \ --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": "zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt with Docker Model Runner:
docker model run hf.co/zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt
Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt
This is the 25-update Math checkpoint from the Agentic ESOpt run.
Important evaluation note
The reported scores are produced by an agentic, multi-turn ReAct evaluation with a bash tool. They are not one-shot chat or plain transformers.generate() scores. Reproducing the report requires the system prompt, action parser, bash execution loop, answer parser, sampling parameters, and datasets in zz1358m/Agentic-ESOpt.
This checkpoint and the stored Agentic ESOpt report are no-skill (--skill-file ''). The fixed ReAct system prompt is part of the evaluation harness; it is not an external Trace2Skill skill and no skill is baked into the weights.
Weight lineage and integrity
- Base runtime checkpoint:
Qwen3.5-4B-text(Qwen/Qwen3.5-4Barchitecture) - ES scope: full model, 330 tensors / 4,205,751,296 parameters
- Applied updates: 25, generations 0 through 24
- Update rule: stored ES seeds and z-score-normalized weights, alpha
0.0005 - Weight format: two indexed safetensors shards
- Shard 1 SHA-256:
4563e49054b3d71920bea9c302e350d3fac9184f0c5d19e823c2f1c3183c7283 - Shard 2 SHA-256:
5aee21fccbdca7441612716b6e10abe7bce08763880acb3645e21ec0abc3f9fd
replay_metadata.json records the lineage and replayed_history.json contains the exact 25 update records.
Direct post-export verification
On 2026-08-11, the uploaded checkpoint was loaded directly into vLLM without replaying ES history and evaluated with the report's ReAct/bash protocol, data, one-sample seed, 50-turn limit, 4096-token turn limit, and exact-fallback scorer:
- DAPO100: 0.82 (82/100)
- AIME2026-30: 0.7667 (23/30)
- Request/parser errors: 0
- Final-answer termination: 130/130
This direct check exceeds the stored generation-25 report point (DAPO 0.76, AIME 0.70) and confirms that the exported weights reproduce the reported capability. Sampling is not byte-identical across vLLM engine scheduling, eager/compiled kernels, or GPU types, so compare aggregate metrics.
The stored four-sample final report is:
- DAPO mean:
0.7675; max@4:0.86 - AIME mean:
0.708333; max@4:0.966667
Machine-readable results and hashes are in evaluation_results.json.
Report environment
- Python
3.10.12 - CUDA
12.8 - PyTorch
2.10.0+cu128 - vLLM
0.19.1 - Transformers
4.57.6 - Ray
2.56.1 - 4 x 80 GB GPUs, 8 Ray/vLLM engines (
gpu_fraction=0.5) gpu_memory_utilization=0.42- context length
131072, no ReAct context trimming - 50 turns, 4096 generated tokens per turn
- temperature
1.0, top-p1.0, top-k40, presence penalty2.0 - exact-fallback scoring (the report environment did not have
math-verifyinstalled)
The dense Qwen3Next compatibility patch in the repository must be enabled for vLLM 0.19.1. The dedicated repository entry point is:
MATH_REPORT_MODE=interval25 scripts/math/eval_hf_checkpoint_4gpu.sh
For the four-sample report:
MATH_REPORT_MODE=final4 scripts/math/eval_hf_checkpoint_4gpu.sh
Dataset SHA-256:
dapo_test.jsonl:a0e64c93e7801957f0949ab80f5a26233ecd87a02ad5c4628de2da0692b5c4a2aime_2026.jsonl:abc8651f3af75ff59341b9de986fef39b1e909aa1466e3b73ee20ec9b6f7242e
Loading the weights
from transformers import AutoModelForCausalLM, AutoTokenizer
path = "zz1358m/Qwen3.5-4B-MATH-ReAct-Agentic-ESOpt"
tokenizer = AutoTokenizer.from_pretrained(path)
model = AutoModelForCausalLM.from_pretrained(path, dtype="auto")
Loading succeeds, but the report scores require the agentic harness described above.
- Downloads last month
- 131