Instructions to use srv-sngh/Qwen3.8-27B-mlx-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use srv-sngh/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("srv-sngh/Qwen3.8-27B-mlx-4bit") config = load_config("srv-sngh/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 srv-sngh/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 "srv-sngh/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": "srv-sngh/Qwen3.8-27B-mlx-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use srv-sngh/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 "srv-sngh/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 srv-sngh/Qwen3.8-27B-mlx-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use srv-sngh/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 "srv-sngh/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 "srv-sngh/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"
Qwen3.8-27B — MLX int4 (complete VLM, Krill-native)
A mirror of the MLX 4-bit quantization of Qwen/Qwen3.8-27B, packaged for Krill's native Apple-silicon runtime.
Provenance, plainly. The original model and weights are by Qwen (Alibaba). The 4-bit MLX conversion is mlx-community/Qwen3.8-27B-4bit — this repo mirrors those weights byte-for-byte, it does not re-quantize them. It exists so Krill's
qwen3.8-27balias resolves to a pinned, tested blob. If you are not using Krill, prefer pulling from mlx-community directly.
Why this build
- 👁️ Complete vision-language model — the vision tower is included and kept at bf16 while the decoder is quantized, so image and video understanding work, not just text.
- ⚡ Native Krill runtime. Runs as native Swift + MLX on Apple Silicon.
Qwen3.8 is a
qwen3_5-class hybrid, and Krill ships a from-scratch native runtime for that architecture — the GatedDeltaNet (SSM) linear-attention layers, the gated full-attention layers, the vision tower and the 3D interleaved mRoPE are all Swift. No Python bridge, no mlx_vlm passthrough. - 🧠 Thinking mode with tunable depth, including the
reasoning_effortcontrol (xhigh/medium/low). - 📏 262,144-token context natively.
Fit before you pull
~16.1 GiB resident. That fits a 24 GB Apple-silicon box, but with little headroom — expect memory pressure under concurrent load, and prefer closing other large apps. On a 16 GB machine it will swap; don't.
Run in Krill (recommended)
# install Krill
brew tap srvsngh99/krill && brew install krill
# or:
curl -fsSL https://raw.githubusercontent.com/srvsngh99/Krill/main/install.sh | sh
# run Qwen3.8-27B (pulls this repo)
krill run qwen3.8-27b "Explain why a hybrid linear-attention decoder saves memory."
# with an image
krill run qwen3.8-27b --image diagram.png "What does this diagram show?"
# dial the reasoning depth down for short answers
KRILL_REASONING_EFFORT=low krill run qwen3.8-27b "One-line summary of RAII."
Run with mlx_vlm
pip install -U mlx-vlm
python -m mlx_vlm generate --model srv-sngh/Qwen3.8-27B-mlx-4bit \
--prompt "Describe this image." --image path/to/image.jpg --max-tokens 200
About Qwen3.8-27B
A dense 27B vision-language model built on the Qwen3.5 architecture: 64 layers arranged as 16 × (3 × Gated DeltaNet → 1 × Gated Attention), hidden size 5120, FFN 17408, 24 query / 4 KV heads at head-dim 256, and a Qwen3-VL-style vision tower (depth 27, patch 16, spatial merge 2). Thinking mode is on by default; context is 262,144 tokens natively and extensible to ~1M with YaRN.
Selected results from the official model card (full model, not this quantization):
| Benchmark | Qwen3.8-27B |
|---|---|
| SWE-bench Pro | 61.7 |
| QwenSWEBench | 79.0 |
| Terminal Bench 2.1 (Terminus) | 73.0 |
| CoWorkBench (long-horizon office work) | 70.7 |
| LiveCodeBench v6 | 90.3 |
| GPQA Diamond | 89.2 |
| IFBench | 79.5 |
Quantization
| field | value |
|---|---|
| mode | affine |
| bits | 4 |
| group size | 64 |
| vision tower | preserved (bf16, not quantized) |
| MTP head | stripped |
| on disk | ~16.1 GiB |
Sampling
Per Qwen's recommendations:
- Thinking mode:
temperature=1.0,top_p=0.95,top_k=20 - Instruct (non-thinking) mode:
temperature=0.7,top_p=0.80,top_k=20,presence_penalty=1.5
License
Apache-2.0, inherited from the upstream model. Credit for the model belongs to Qwen; credit for the MLX conversion belongs to mlx-community.
- Downloads last month
- 158
4-bit
Model tree for srv-sngh/Qwen3.8-27B-mlx-4bit
Base model
Qwen/Qwen3.8-27B