Instructions to use mlx-community/Qwen2-Math-72B-Instruct-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Qwen2-Math-72B-Instruct-4bit 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-Math-72B-Instruct-4bit") 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
- MLX LM
How to use mlx-community/Qwen2-Math-72B-Instruct-4bit 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-Math-72B-Instruct-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/Qwen2-Math-72B-Instruct-4bit" # 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-Math-72B-Instruct-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
Commit History
-
0496ebe6f4b9aeb324988e8a97871a30904e6cb8b37989743cf9c0d61b5e810d
Verified signature11a0d3a -
779d014b40a98282d5e8ad8342a31ec48ce97b6ad87db3904187a12b7bf5802e
Verified signature013827b -
c6225d68c74f99d1f9a01532e8c3bd17185ae899101d7ce4bffa3f7c31d038dd
Verified signature54c5af2 -
d8450cc2f8fae0dfce550dbb939b7f3ca6cf8ac248db1dce73baf0b300a1c2b0
Verified signatureccfa19c -
865937f7ae4f431ca856433b3248b834ef87bfb76a0d500d007ba110dfafdbe7
Verified signature0d3b9a8 -
ae1b03fdf0ab5d8bb6f2cca94a16a73ededcae8310c5d961bebfcf47a5e49ca2
Verified signature4160344 -
89468ea9164f75c7d2b03acf3720c9b33340c773552feb1d3358365423b8a430
Verified signature477ffdb -
35050515987dd7a869c0f1d461b1bc1df1d4a9411b7dea185d336cc7c4e26ccb
Verified signature88ec393 -
565a36634aa949edfeb0789b0d633da167cfe2feb36333a5f052af64a99cecfd
Verified signature26166aa -
initial commit
Verified signatureec9f0fa