Instructions to use Vontra/Qwen3.8-27B-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Vontra/Qwen3.8-27B-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("Vontra/Qwen3.8-27B-MLX-4bit") config = load_config("Vontra/Qwen3.8-27B-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 Vontra/Qwen3.8-27B-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 "Vontra/Qwen3.8-27B-MLX-4bit"
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": "Vontra/Qwen3.8-27B-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use Vontra/Qwen3.8-27B-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 "Vontra/Qwen3.8-27B-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 "Vontra/Qwen3.8-27B-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"
- Hermes Agent
How to use Vontra/Qwen3.8-27B-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 "Vontra/Qwen3.8-27B-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 Vontra/Qwen3.8-27B-MLX-4bit
Run Hermes
hermes
- Atomic Chat
Qwen3.8-27B — MLX 4-bit
A native Apple-silicon conversion of Qwen/Qwen3.8-27B, quantized with stock 4-bit affine weights for MLX-VLM and oMLX.
Original model · Qwen · MLX-VLM · Apache 2.0
About this conversion
This repository contains a stock 4-bit affine MLX conversion of Qwen3.8-27B. The upstream model is a dense, native vision-language model with flexible thinking control and support for text, images, and video. Its tokenizer, processor configuration, chat template, and generation configuration are preserved.
| Item | Value |
|---|---|
| Base model | Qwen/Qwen3.8-27B |
| Format | MLX safetensors |
| Quantization | 4-bit affine, group size 64 |
| Effective precision | 4.695 bits per weight |
| Conversion stack | mlx-vlm 0.6.3, mlx-lm 0.31.3, mlx 0.32.0 |
| Weight shards | 3 |
| Weight size | 16.06 GB (14.95 GiB) |
| Maximum configured context | 262,144 tokens |
| Architecture | qwen3_5 / Qwen3_5ForConditionalGeneration |
Apple-silicon performance
This checkpoint was load-tested and generation-tested on the following machine:
| Hardware | Configuration |
|---|---|
| Host | Mac Studio |
| Chip | Apple M3 Ultra |
| CPU | 32 cores (24 performance + 8 efficiency) |
| Unified memory | 256 GB |
| Runtime | MLX-VLM 0.6.3 / MLX 0.32.0 |
| Measurement | Result |
|---|---|
| Decode (median) | 39.90 tokens/s |
| Reported peak memory | 20.14 GB |
| Timed runs | 3 × 256 generated tokens |
| Warm-up | 256 generated tokens |
| Prompt | 81 tokens after chat templating |
The decode figure is the median of three greedy 256-token runs after a 256-token Metal-kernel warm-up. Individual runs measured 39.90, 39.89, and 39.91 tokens/s. This is a practical local reference, not a controlled cross-platform benchmark; prompt length, context growth, sampler settings, memory pressure, thermal state, and runtime versions can materially change performance.
Quick start with MLX-VLM
python -m pip install -U mlx-vlm huggingface_hub
python -m mlx_vlm.generate \
--model Vontra/Qwen3.8-27B-MLX-4bit \
--prompt "Explain the difference between linear and full attention." \
--max-tokens 512
Download for local use:
hf download Vontra/Qwen3.8-27B-MLX-4bit \
--local-dir ~/.omlx/models/Vontra/Qwen3.8-27B-MLX-4bit
Using it with oMLX
- Place the model at
~/.omlx/models/Vontra/Qwen3.8-27B-MLX-4bit. - Refresh the oMLX model registry.
- Load
Qwen3.8-27B-MLX-4bitand use the chat UI or OpenAI-compatible endpoint.
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OMLX_API_KEY" \
-d '{
"model": "Qwen3.8-27B-MLX-4bit",
"messages": [{"role": "user", "content": "Write a short Swift actor example."}],
"temperature": 1.0,
"top_p": 0.95,
"max_tokens": 256
}'
For long prompts, begin with a conservative context limit and increase it while watching memory pressure. The configured context is a model capability, not a guarantee that every host can prefill it within available unified memory.
Architecture
Qwen3.8-27B is a dense causal language model with a vision encoder. It uses the Qwen3.5 architectural foundation, interleaving Gated DeltaNet linear-attention blocks with periodic full-attention blocks.
| Architecture detail | Upstream value |
|---|---|
| Parameters | 27B |
| Language layers | 64 |
| Hidden size | 5,120 |
| Attention heads / KV heads | 24 / 4 |
| Linear-attention V / QK heads | 48 / 16 |
| FFN intermediate size | 17,408 |
| Vocabulary / padded embeddings | 248,320 |
| Configured context | 262,144 tokens |
For upstream evaluations, usage guidance, intended use, limitations, safety information, and the full architecture discussion, see the original model card.
Conversion and validation notes
- Source weights: the official Qwen checkpoint.
- Quantization: stock 4-bit affine weights with group size 64.
- The upstream tokenizer, processor files, chat template, and generation configuration are preserved.
- All 2,180 converted tensors and all three indexed shards were checked locally.
- Quantization can reduce output quality relative to the source weights; use a higher-precision variant when quality matters more than memory use.
- The model was loaded and exercised through end-to-end generation on Apple silicon.
This is a community conversion, not an official Qwen release. Validate quality and numerical behaviour on your own representative workload before production use.
Licence and attribution
The upstream model is released under the Apache License 2.0. A copy is included in this repository; review it before use or redistribution.
All model design, training, benchmark, and upstream documentation credit belongs to Qwen and the original contributors. The MLX conversion, Apple-silicon validation, compatibility work, and packaging are provided by Vontra.
- Downloads last month
- -
4-bit
Model tree for Vontra/Qwen3.8-27B-MLX-4bit
Base model
Qwen/Qwen3.8-27B