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
-
Upload folder using huggingface_hub (#1)
Verified signature- 565a36634aa949edfeb0789b0d633da167cfe2feb36333a5f052af64a99cecfd (26166aa0e40258f470a2fb8c84871b8f9599c464) - 35050515987dd7a869c0f1d461b1bc1df1d4a9411b7dea185d336cc7c4e26ccb (88ec39379a90249f9141f2f0b1bf5d455ec1ad99) - 89468ea9164f75c7d2b03acf3720c9b33340c773552feb1d3358365423b8a430 (477ffdb2fab8513bebc5d9344ba86f257a085454) - ae1b03fdf0ab5d8bb6f2cca94a16a73ededcae8310c5d961bebfcf47a5e49ca2 (4160344a3748ffbb875fbc8e2033c0493ac9ae5b) - 865937f7ae4f431ca856433b3248b834ef87bfb76a0d500d007ba110dfafdbe7 (0d3b9a89b654d1ce7f23cef78c419e69a40c0081) - d8450cc2f8fae0dfce550dbb939b7f3ca6cf8ac248db1dce73baf0b300a1c2b0 (ccfa19c2b1897c9b7660ad3225307537a10694e7) - c6225d68c74f99d1f9a01532e8c3bd17185ae899101d7ce4bffa3f7c31d038dd (54c5af2d1e59e666aed41c215c9d91367aeed6da) - 779d014b40a98282d5e8ad8342a31ec48ce97b6ad87db3904187a12b7bf5802e (013827bc3f8a335f110994eeefcd362c026f4ac6) - 0496ebe6f4b9aeb324988e8a97871a30904e6cb8b37989743cf9c0d61b5e810d (11a0d3a7e99b10e37d23ffaf7cc00425cd05eae1)b8a475a -
initial commit
Verified signatureec9f0fa