Instructions to use majentik/Qwen3-Coder-Next-MLX-2bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use majentik/Qwen3-Coder-Next-MLX-2bit 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("majentik/Qwen3-Coder-Next-MLX-2bit") 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 majentik/Qwen3-Coder-Next-MLX-2bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "majentik/Qwen3-Coder-Next-MLX-2bit"
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": "majentik/Qwen3-Coder-Next-MLX-2bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use majentik/Qwen3-Coder-Next-MLX-2bit 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 "majentik/Qwen3-Coder-Next-MLX-2bit"
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 majentik/Qwen3-Coder-Next-MLX-2bit
Run Hermes
hermes
- OpenClaw new
How to use majentik/Qwen3-Coder-Next-MLX-2bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "majentik/Qwen3-Coder-Next-MLX-2bit"
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 "majentik/Qwen3-Coder-Next-MLX-2bit" \ --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 majentik/Qwen3-Coder-Next-MLX-2bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "majentik/Qwen3-Coder-Next-MLX-2bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "majentik/Qwen3-Coder-Next-MLX-2bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "majentik/Qwen3-Coder-Next-MLX-2bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
Qwen3-Coder-Next - MLX 2-bit
2-bit weight-quantized MLX version of Qwen/Qwen3-Coder-Next,
Qwen's 80B-A3B agentic coding MoE (512 experts, 10 active; hybrid Gated DeltaNet +
Gated Attention; 256k context). Only ~3B parameters are active per token, so it runs
far faster than its 80B total suggests. Converted with mlx_lm — the canonical MLX
runtime for qwen3_next — and smoke-verified (chat + code probes) on Apple Silicon
with this exact payload before publishing. See PROVENANCE.md.
Approximate model size: ~25 GB
Model Specifications
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen3-Coder-Next |
| Parameters | 80 billion total (~3 billion active per token) |
| Architecture | MoE, hybrid Gated DeltaNet + Gated Attention (qwen3_next) |
| Modality | Text-only (code-focused) |
| Context Length | 256k tokens |
| License | Apache 2.0 |
| Weight Quantization | 2-bit affine, group size 64 (~25 GB) |
| Framework | MLX (Apple Silicon), mlx-lm >= 0.31 |
Quickstart
from mlx_lm import load, generate
model, tokenizer = load("majentik/Qwen3-Coder-Next-MLX-2bit")
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "Write a Python function that merges two sorted lists."}],
add_generation_prompt=True, tokenize=False,
)
print(generate(model, tokenizer, prompt=prompt, max_tokens=512))
Or from the command line:
mlx_lm.generate --model majentik/Qwen3-Coder-Next-MLX-2bit --prompt "Refactor this function ..."
Variants in this family
| Variant | Approx size | Use case |
|---|---|---|
| 2bit(https://huggingface.co/majentik/Qwen3-Coder-Next-MLX-2bit) | ~25 GB | Smallest; quality floor |
| 3bit | ~34 GB | Low-RAM Macs |
| 4bit | ~43 GB | Balanced default |
| 5bit | ~53 GB | Higher fidelity |
| 6bit | ~62 GB | Near-8bit quality |
| 8bit | ~81 GB | Reference fidelity |
Smoke verification covers load + short-form generation quality gates only; it is not a benchmark. For maximum fidelity use the largest variant that fits your unified memory (leave ~20% headroom for KV cache).
- Downloads last month
- 153
2-bit
Model tree for majentik/Qwen3-Coder-Next-MLX-2bit
Base model
Qwen/Qwen3-Coder-Next