Instructions to use mattbucci/Qwopus3.8-27B-Coder-Flash-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mattbucci/Qwopus3.8-27B-Coder-Flash-MLX-4bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("mattbucci/Qwopus3.8-27B-Coder-Flash-MLX-4bit") config = load_config("mattbucci/Qwopus3.8-27B-Coder-Flash-MLX-4bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use mattbucci/Qwopus3.8-27B-Coder-Flash-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 "mattbucci/Qwopus3.8-27B-Coder-Flash-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": "mattbucci/Qwopus3.8-27B-Coder-Flash-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use mattbucci/Qwopus3.8-27B-Coder-Flash-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 "mattbucci/Qwopus3.8-27B-Coder-Flash-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 mattbucci/Qwopus3.8-27B-Coder-Flash-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mattbucci/Qwopus3.8-27B-Coder-Flash-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 "mattbucci/Qwopus3.8-27B-Coder-Flash-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 "mattbucci/Qwopus3.8-27B-Coder-Flash-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"
Qwopus3.8-27B-Coder-Flash โ MLX 4-bit
MLX conversion of Jackrong/Qwopus3.8-27B-Coder-Flash, a coding-agent fine-tune of Qwen3.8-27B (dense Qwen3.5-class DeltaNet hybrid with the vision tower). 4-bit affine, group size 64, 15 GB on disk; runs in about 16 GB of unified memory plus KV.
Quantization recipe
Not a plain mlx_vlm.convert. The module classes that carry recurrent-state gate scalars
and the vision tower stay in bf16, the rest is 4-bit:
| kept bf16 | quantized 4-bit g64 |
|---|---|
linear_attn.in_proj_a / in_proj_b (48 DeltaNet layers), all norms, conv1d, vision tower (27 blocks + merger + patch embed) |
lm_head, embed_tokens, attention q/k/v/o (16 full-attention layers), linear_attn.in_proj_qkv / in_proj_z / out_proj, MLP gate/up/down (64 layers) |
402 of 922 modules quantized, 4.7 bits per weight overall. Every quantized layer's weights,
scales and biases pass a per-layer corruption scan. The processor_config.json that
transformers 5.x writes (naming Qwen3VLImageProcessor, which AutoProcessor cannot
resolve) is dropped; preprocessor_config.json resolves the Qwen2VL image processor.
Validation (Apple M4 Pro, 64 GB, SGLang + MLX)
| gate | result |
|---|---|
| basic / tool call / thinking terminates | 3/3 |
| content-aware reasoning probe | VERIFIED |
| codegen probe (2 tasks, 8 tests) | 8/8 STRONG |
| image probe | STRONG |
| video probe (both motion directions) | STRONG |
| decode tok/s @1K / 8K / 32K (single user) | 14.6 / 14.2 / 13.2 (same as Qwen3.6-27B-4bit and Qwen3.8-27B-4bit on this stack) |
| SWE-bench Lite 3-instance sealed smoke (opencode) | 3/3 non-empty patches on the canonical file (astropy 12907, 14182, 14365); two are the upstream change, the third the regex half of it |
| MMLU (100) / HumanEval (20) / LAB-Bench (50) / needle | 83% / 90% / 37.5% / 4/4 at 1K, 4K, 16K, 64K (stock Qwen3.8-27B-4bit: 84% / 90% / 38.7% / 4/4) |
The chat template always reasons: enable_thinking in chat_template_kwargs has no effect
(same as the upstream Qwen3.8-27B template). Give coding requests a generous max_tokens;
the model recommends sampling at temperature 1.0, top-p 0.95, top-k 20 (generation_config.json).
Use
pip install mlx-vlm
python -m mlx_vlm.generate --model <this repo> --prompt "Write a function that merges overlapping intervals." --max-tokens 2048
Served with SGLang's MLX backend (the stack this was validated on):
MODEL=<this repo> scripts/launch.sh qwen36-27b from
mattbucci/m4-sglang-inference, which carries the
converter (scripts/quantize/convert_qwen36_inhouse.py) and the gate scripts.
Credits
Fine-tune by Jackrong on unsloth/Qwen3.8-27B (Qwen/Qwen3.8-27B); see the source card for the distillation recipe and its evaluations. Apache-2.0 throughout.
- Downloads last month
- -
4-bit
Model tree for mattbucci/Qwopus3.8-27B-Coder-Flash-MLX-4bit
Base model
Qwen/Qwen3.8-27B