Text Generation
Transformers
Safetensors
MLX
English
qwen2
chat
conversational
text-generation-inference
Instructions to use mlx-community/Qwen2.5-Math-72B-Instruct-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mlx-community/Qwen2.5-Math-72B-Instruct-bf16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mlx-community/Qwen2.5-Math-72B-Instruct-bf16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mlx-community/Qwen2.5-Math-72B-Instruct-bf16") model = AutoModelForCausalLM.from_pretrained("mlx-community/Qwen2.5-Math-72B-Instruct-bf16", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - MLX
How to use mlx-community/Qwen2.5-Math-72B-Instruct-bf16 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("mlx-community/Qwen2.5-Math-72B-Instruct-bf16") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- vLLM
How to use mlx-community/Qwen2.5-Math-72B-Instruct-bf16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mlx-community/Qwen2.5-Math-72B-Instruct-bf16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/Qwen2.5-Math-72B-Instruct-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mlx-community/Qwen2.5-Math-72B-Instruct-bf16
- SGLang
How to use mlx-community/Qwen2.5-Math-72B-Instruct-bf16 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 "mlx-community/Qwen2.5-Math-72B-Instruct-bf16" \ --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": "mlx-community/Qwen2.5-Math-72B-Instruct-bf16", "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 "mlx-community/Qwen2.5-Math-72B-Instruct-bf16" \ --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": "mlx-community/Qwen2.5-Math-72B-Instruct-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Pi
How to use mlx-community/Qwen2.5-Math-72B-Instruct-bf16 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Qwen2.5-Math-72B-Instruct-bf16"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mlx-community/Qwen2.5-Math-72B-Instruct-bf16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use mlx-community/Qwen2.5-Math-72B-Instruct-bf16 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "mlx-community/Qwen2.5-Math-72B-Instruct-bf16"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/Qwen2.5-Math-72B-Instruct-bf16" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/Qwen2.5-Math-72B-Instruct-bf16", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use mlx-community/Qwen2.5-Math-72B-Instruct-bf16 with Docker Model Runner:
docker model run hf.co/mlx-community/Qwen2.5-Math-72B-Instruct-bf16
- Hermes Agent
How to use mlx-community/Qwen2.5-Math-72B-Instruct-bf16 with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Qwen2.5-Math-72B-Instruct-bf16"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default mlx-community/Qwen2.5-Math-72B-Instruct-bf16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/Qwen2.5-Math-72B-Instruct-bf16 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Qwen2.5-Math-72B-Instruct-bf16"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "mlx-community/Qwen2.5-Math-72B-Instruct-bf16" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Commit History
-
abe18f80122f3b723950cd8ed091a53ef4b5fb3ec249c32d20cfbc96d42abcac
Verified signature7fa8a93 -
1e1677243b552c5c3d72f59d4ee087a2b7d44681a182ad7669e42ca7e025e46d
Verified signaturee8188e2 -
9de4b723599324cdfca4709be3e4d4514f14ec56c3dcbcb7a923e51d047773ce
Verified signature6f9ebcf -
f369ee6895a7e88a1111f08dd035fc78985d8067f4da2037e47895f1221e66a4
Verified signaturefa52ec0 -
a6c0885113a6a5436f2beac2a51dedd7d7eb6cd66daccbbe6d6341ab64f1fa9f
Verified signaturea6c0fa4 -
a3649e20183218f5989ca373796a53fb4fae3a19ca6c61d51ad0f701221ec576
Verified signaturedb6d2eb -
b4c830bc50764a011e3701b8074bcb72c36f2eaf6f533d69280d8195d267a710
Verified signature909d74d -
7c4c7e0474f1ae331db8c38fbde76652756fa75b247018cd11ed812e84f1d9fd
Verified signature43c838b -
f4ca24fb33440746532891b444ec1744cd4c728fb2a8736d08dcd8dc14f9cbcc
Verified signature54159e4 -
fe5696196b3edba84875d3937d21a986680cae8abbb83fbf5a5789c0f633574c
Verified signature7bfa5ae -
e6e72339ae5ba0a989795ec9437feb457fcfa58e3cf58bae9d8566f7517e5d0b
Verified signature9a22f98 -
1b1ccd5690854c3a3ee5b864fa540ab941f06b31d260fc94cf5ad735b685e006
Verified signatureb891ec0 -
cac458bbde9a56b082c08d30ce1b0110974dad956f99f90e6c3785444fbe73cb
Verified signature2005b41 -
1e257d2811c9fe1cf0d4042134c09676341c6a3f2e62e3b1651979cdf7b2e1a5
Verified signature0f60bbe -
d2f40cf7af66002ef60633ae5e70d83a7a0b9eaab8f876f0b868a858000eb040
Verified signaturedbf9c0e -
6f04632e9de6821eac99dbdb6b5d7632f77b3763001460491606b86ff65722e6
Verified signaturea76c8ba -
d8eb695e0862adcb5aa5f095212d490e62cf440d94b94f25a0a2599e8904f848
Verified signatureabb6cd9 -
963c070716f4307f8f68eebb3ccbd33b31f21707b21bc9d95e0166c4fa454fae
Verified signaturef4b943c -
e4aa7ae4e8533ada6e8ec4ed74bb8ab6cd9b106c4f8a31193280bf0df425fa88
Verified signature0c62852 -
392fbc99b144b3acf257ead864e8c4bfafe7380744a775aea1fbf6388ebb980b
Verified signaturee53b70f -
fe7275f9924de968df938e91c70650dfbeecd9747602ef627b911ea4428678ef
Verified signature9a67dd5 -
3d04d7a091adc646a78d4251637a50ca6461f988c6d2add4555aed94b03b1425
Verified signature3cda3cc -
ec43259f90276033eadef1b959c7d0d59d4a657afd3dc2f30fbe6eb81c72ab8f
Verified signature77cbff8 -
5cd1849562e9c3cb8d1bd45a0b76b949229dc00e23a841a125ca9ab991a57cd9
Verified signature1146c83 -
3f4755d7e516529361d14ab6f2114c8dcbbf7a894743c8c3a68d679cd13a716b
Verified signature95a9f03 -
e25aa561a50ee3c7e38435ed86ad2de598d7116a334fee5b6000a6442e5882b1
Verified signaturea1a097d -
b97ae0e562fe57cea054c545e029b7adc20869d807357c9ca67de60cc21d56f0
Verified signature2c1d1a3 -
f116ad80d47631c70253bf3b53c0bf80ae8784d5c1bbd7d9fbf592dafb83a25e
Verified signaturee83695b -
7a85b84af0237ac76ab45e82037495356549fd05320d594a66bd76829992b71b
Verified signature633f4c0
-
initial commit
Verified signature81b95c2