Instructions to use Rapid42/Qwen3.5-4B-MXFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Rapid42/Qwen3.5-4B-MXFP4 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("Rapid42/Qwen3.5-4B-MXFP4") 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 Rapid42/Qwen3.5-4B-MXFP4 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Rapid42/Qwen3.5-4B-MXFP4"
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": "Rapid42/Qwen3.5-4B-MXFP4" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use Rapid42/Qwen3.5-4B-MXFP4 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "Rapid42/Qwen3.5-4B-MXFP4"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "Rapid42/Qwen3.5-4B-MXFP4" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rapid42/Qwen3.5-4B-MXFP4", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use Rapid42/Qwen3.5-4B-MXFP4 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 "Rapid42/Qwen3.5-4B-MXFP4"
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 Rapid42/Qwen3.5-4B-MXFP4
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Rapid42/Qwen3.5-4B-MXFP4 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Rapid42/Qwen3.5-4B-MXFP4"
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 "Rapid42/Qwen3.5-4B-MXFP4" \ --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"
Rapid42/Qwen3.5-4B-MXFP4
Qwen3.5 4B — quantized to MXFP4 for Apple Silicon
Converted and optimized by Rapid42 — engineering tools for fast pipelines.
What This Is
This is Qwen3.5-4B quantized to MXFP4 format using mlx-lm. Blazing fast on any M-series Mac — even the base M1/M2 with 8GB RAM.
The smallest model in our Qwen3.5 lineup. Best for:
Rapid iteration — fast drafts, autocomplete, short-form generation
Always-on assistants — runs alongside other apps without memory pressure
Edge/embedded — lowest resource footprint in the family
Parameters: ~4B (dense)
Quantization: MXFP4 (via mlx-lm 0.31.1)
Base model: Qwen/Qwen3.5-4B
Framework: Apple MLX
Hardware Requirements
| Device | RAM | Experience |
|---|---|---|
| Any M-series Mac (8GB+) | ~3GB | ✅ Runs everywhere |
| M1 MacBook Air (8GB) | ~3GB | ✅ Comfortable |
| M3 Max / Pro | ~3GB | ✅ Near-instant responses |
| iPhone 15 Pro (via MLX) | ~3GB | ✅ Runs on-device |
This is the "works on everything" model. Load time under 5 seconds on any M-series chip.
Quick Start
pip install mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("Rapid42/Qwen3.5-4B-MXFP4")
messages = [{"role": "user", "content": "Write a bash script to batch rename EXR files."}]
prompt = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_dict=False
)
response = generate(model, tokenizer, prompt=prompt, max_tokens=256, verbose=True)
print(response)
CLI (instant interactive chat):
mlx_lm.chat --model Rapid42/Qwen3.5-4B-MXFP4
When to Use 4B vs Larger Models
| Use Case | Recommended |
|---|---|
| Quick code snippets | ✅ 4B (fast) |
| Complex reasoning / long-form | ❌ Use 27B or 35B-A3B |
| Always-on background assistant | ✅ 4B (low overhead) |
| Multilingual tasks | ⚠️ 4B is decent, larger is better |
| RAG / retrieval + answer | ✅ 4B works well with good context |
Why MXFP4?
MXFP4 (Microscaling FP4) uses per-block scaling factors that preserve more precision than standard int4, while remaining natively fast on Apple Silicon via MLX. For a 4B model this means near-fp16 quality at int4 memory cost.
About Rapid42
Rapid42 builds fast, precise engineering tools — from VFX pipeline utilities to optimized ML model distributions.
→ rapid42.com · ExrToPsd · Level Careers
- Downloads last month
- 30
4-bit