Instructions to use saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB 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("saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB") 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 saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB"
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 "saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB" \ --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"
- MLX LM
How to use saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB 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 "saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB"
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 saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB
Run Hermes
hermes
Qwen2.5-0.5B-Instruct — armq 265 MB (mixed precision)
A mixed-precision quantization of
Qwen/Qwen2.5-0.5B-Instruct, built with
armq.
Rather than giving every layer the same bit-width, armq measures how sensitive each layer actually is and solves for the bit allocation that minimises quality loss subject to a hard size budget. This checkpoint occupies exactly the same bytes as a uniform 4-bit build of the same model, and scores better.
Measured against uniform 4-bit at identical size
| uniform 4-bit | this model | ||
|---|---|---|---|
| Size | 265.1 MB | 265.1 MB | identical |
| bits/weight | 4.502 | 4.502 | identical |
| Perplexity ↓ | 21.3998 | 20.4113 | -4.6% |
| Generation speed | 187.9 tok/s | 162.7 tok/s | -13% |
Perplexity on 32 × 512-token windows (16352 predicted tokens) of held-out wikitext-2 test. Calibration used the train split only, so the recipe was never tuned on the text it is scored against.
Measured on Apple M2 (arm64), 8.0 GB unified memory, MLX 0.32.0, mlx-lm 0.31.3.
Generation speed changed by -13% on the test machine. Mixed precision means adjacent layers no longer share a kernel configuration, and whether that helps or hurts is architecture-dependent — it went the other way on the other model in this pair. armq optimises quality-at-size, not latency.
Usage
Loads like any MLX checkpoint — no custom code:
from mlx_lm import load, generate
model, tokenizer = load("saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB")
print(generate(model, tokenizer, "Arm devices are", max_tokens=100))
pip install mlx-lm
mlx_lm.generate --model saisaketh/Qwen2.5-0.5B-Instruct-armq-265MB --prompt "Arm devices are"
The allocation
3-bit x3, 4-bit x87, 5-bit x33, 6-bit x38, 8-bit x8
The full per-layer assignment ships in armq_recipe.json in this repo. It
is a few KB and reproduces this checkpoint exactly from the base model:
pip install git+https://github.com/saketh8/arm-mlx-optimizer
armq build Qwen/Qwen2.5-0.5B-Instruct --recipe armq_recipe.json --out ./rebuilt
The pattern armq found is not one you would guess: value projections and the output head are protected at high precision, while query, gate and up projections tolerate 3–4 bits.
Limitations
- Apple Silicon / MLX only. The method is portable; this build is not.
- Perplexity is a proxy for quality, not a downstream task score. It is the right proxy for this particular comparison — same base model, same data, one variable — but it is not a benchmark suite.
- Calibration is general-purpose (a few thousand wikitext tokens). A domain-specific deployment should re-profile on representative text.
- Throughput is not guaranteed to improve — see above.
License & attribution
Weights are a derivative of
Qwen/Qwen2.5-0.5B-Instruct and inherit its
apache-2.0 license. The armq tooling that produced them is MIT.
Method, benchmarks and reproduction instructions: https://github.com/saketh8/arm-mlx-optimizer
- Downloads last month
- -
4-bit