Instructions to use rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-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("rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-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
- Pi
How to use rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit"
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": "rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-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 "rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit 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 "rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit"
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 rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit"
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 "rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit" \ --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"
rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit
Rao Studios' mirror of mlx-community/Qwen2.5-Coder-7B-Instruct-4bit at commit 019cc73c45c770444708a6dd8690c66243cc5c80. The weights,
tokenizer, chat template and configuration are byte-for-byte that repository's; nothing was
re-quantized or edited. This card and LICENSE (the Apache License 2.0, verbatim from
Qwen/Qwen2.5-Coder-7B-Instruct at c03e6d358207e414f1eca0bb1891e29f1db0e242) were added.
It exists so every install of Craft fetches the same bytes from a repository Rao controls: Craft's onboarding recommends it by this Mac's memory, and pins this repository at one commit.
Lineage
- Qwen/Qwen2.5-Coder-7B-Instruct, by the Qwen team (Apache-2.0).
- mlx-community/Qwen2.5-Coder-7B-Instruct-4bit: that model converted to MLX at 4 bits โ the files here.
Shape (from config.json)
| Architecture | qwen2, 28 layers |
| Quantization | 4-bit, group size 64 |
| Weights | 4.3 GB of safetensors, 735 tensors |
| Context | 32,768 tokens |
| Tools | Hermes JSON: the chat template lists every tool's JSON schema inside <tools>, and the model answers with one JSON object per call inside <tool_call> tags |
A call, as the model writes it:
<tool_call>
{"name": "edit_file", "arguments": {"path": "Sources/App/main.swift", "old_string": "print(\"hi\")", "new_string": "print(\"hello\")"}}
</tool_call>
Safety pass
Run by Craft's scripts/mirror-model.py on 2026-10-26, before upload:
- Every file is one an MLX model needs; no pickle format and no native code was in the source.
- Every weight file is safetensors, its header read by hand: known dtypes, tensors that tile the file exactly, the same tensor names as the index.
- Every file matches the SHA-256 the Hub recorded for it at
019cc73c45c770444708a6dd8690c66243cc5c80. - No
auto_map(remote code) in the config or the tokenizer config; a chat template is present.
| File | Bytes | SHA-256 |
|---|---|---|
added_tokens.json |
605 | 58b54bbe36fc752f79a24a271ef66a0a0830054b4dfad94bde757d851968060b |
config.json |
787 | 08762352ba9fded858f24bdd7b8d2fe61aabe7bce1dfdb663db242d574c3e678 |
merges.txt |
1,671,853 | 8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5 |
model.safetensors |
4,284,346,255 | 56a3d94706833f753e6c6b47ea57af8ef638cd8cc1d74eca1142ba640b26060e |
model.safetensors.index.json |
51,711 | 23cd562592dd96686d2e799eb02e4b578a4038b6045eaefe860d270cc060e24f |
special_tokens_map.json |
613 | 76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd |
tokenizer.json |
7,031,673 | a8506e7111b80c6d8635951a02eab0f4e1a8e4e5772da83846579e97b16f61bf |
tokenizer_config.json |
7,308 | f7c61e32b7a17d19bf8e7037dcb74079a833e53ea9801f24008cac68458f03b7 |
vocab.json |
2,776,833 | ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910 |
Use with mlx
pip install mlx-lm
mlx_lm.generate --model rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit --prompt "Write a binary search in Swift."
- Downloads last month
- 243
Quantized
Model tree for rao-studios/Qwen2.5-Coder-7B-Instruct-mlx-4bit
Base model
Qwen/Qwen2.5-7B