Downloads · 30 days
245
27% of all-time downloads
TokenAI-zer/Swift-Qwen3.8-27b-oQ4-mtp
Swift-Qwen3.8-27b-oQ4-mtp is a image-text-to-text model from TokenAI-zer. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for mlx. The card lists the license as other.
Unofficial Apple Silicon quantization of ukisai/Swift-Qwen3.8-27b, produced with oMLX 0.6.4 (MLX affine quantizer, group size 64) on an Apple M5 Max / 128 GB.
Downloads · 30 days
245
27% of all-time downloads
All-time downloads
911
Public
Parameters
27.8B
17 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors17 GB · 100%
How the weights are stored.
U3227.3B · 98%
From the Hugging Face model README
Unofficial Apple Silicon quantization of ukisai/Swift-Qwen3.8-27b, produced with oMLX 0.6.4 (MLX affine quantizer, group size 64) on an Apple M5 Max / 128 GB.
Two things are preserved on purpose:
-mtp suffix means the multi-token-prediction head from the base checkpoint ships intact (29 tensors, mtp_num_hidden_layers: 1), so oMLX can run self-speculative decoding instead of wasting the weights.I am not affiliated with UkisAI. All upstream weights, benchmarks and license terms belong to UkisAI, and the upstream license governs this repository too (see License).
Format note: these are MLX safetensors, not GGUF. They will not load in llama.cpp / Ollama / LM Studio. Use oMLX or MLX runtimes.
| oQ4-mtp | oQ6-mtp | oQ8-mtp | |
|---|---|---|---|
| Weights on disk | 15.81 GiB (16.97 GB), 4 shards | 22.09 GiB (23.72 GB), 5 shards | 27.94 GiB (30.00 GB), 6 shards |
| Weight precision | mixed 4/5-bit | mixed 6/8-bit | uniform 8-bit |
| Quantization | affine, group size 64 | affine, group size 64 | affine, group size 64 |
| Choose when | prioritize memory headroom | balance size and weight precision | prioritize weight precision and have more memory |
All three retain the MTP head. Task-level accuracy and speed after quantization have not been measured here. Runtime memory also depends on context length and KV cache.
config.json)| Field | Value |
|---|---|
| Architecture | Qwen3_5ForConditionalGeneration (model_type: qwen3_5) |
| Parameters | 27.78 B total, 27.27 B quantized (98.1%) |
| Text layers / hidden | 64 layers, hidden_size 5120, intermediate_size 17408 |
| Attention | hybrid: 1 full-attention layer every 4 (full_attention_interval: 4), 24 heads / 4 KV, head_dim 256, attn_output_gate: true; the rest are gated linear-attention (linear_attn) |
| Context | max_position_embeddings: 262144 |
| Vocab | 248,320 (tokenizer and chat_template.jinja copied from upstream, unchanged) |
| MTP | mtp_num_hidden_layers: 1, mtp_use_dedicated_embeddings: false, weights included |
| Vision | Qwen vision tower kept in BF16 (~0.92 GB), depth 27, patch 16, spatial merge 2 |
| Metadata | {"format": "mlx"} in every safetensors header |
Precision is mixed per module and recorded verbatim in config.json → quantization_config, so any MLX loader reproduces the layout without guessing:
group_size: 64, mode: affinelinear_attn.in_proj_a/b/z, linear_attn.out_proj, mlp.down_proj, some self_attn.k_proj/o_proj)scales/biases (1.68 GB BF16), norms, A_log, dt_bias, convolutions (≈5 MB), MTP non-linear weights (128 MB)mlx / mlx-lm / mlx-vlm build with qwen3_5 support# 1. drop the folder into the oMLX model dir
git clone https://huggingface.co/TokenAI-zer/Swift-Qwen3.8-27b-oQ4-mtp ~/.omlx/models/Swift-Qwen3.8-27b-oQ4-mtp
# 2. start the multi-model server (model id = folder name)
omlx serve --model-dir ~/.omlx/models --port 8000
# 3. talk to it
curl -s http://127.0.0.1:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model": "Swift-Qwen3.8-27b-oQ4-mtp",
"messages": [{"role": "user", "content": "Explain speculative decoding in two sentences."}]}'
In oMLX model settings, enable the speculative head and the matching reasoning parser:
{
"mtp_enabled": true,
"reasoning_parser": "qwen_3_5",
"max_context_window": 262144,
"model_type_override": "vlm"
}
pip install -U mlx-lm mlx-vlm
python -m mlx_lm.server --model TokenAI-zer/Swift-Qwen3.8-27b-oQ4-mtp --port 8000
Only oMLX 0.6.4 is verified by me; if you get mlx_lm running this architecture, please open an issue and I will document it.
llama.cpp, GGUF, vLLM and SGLang paths in the upstream card do not apply here — this repo has no GGUF and no PyTorch weights. For BF16/server deployments use ukisai/Swift-Qwen3.8-27b.
Shipped generation_config.json (unchanged from upstream) is the tuning target for thinking mode:
temperature 1.0 · top_p 0.95 · top_k 20 · min_p 0.0 · repetition_penalty 1.0
eos_token_id [248046, 248044]
The upstream chat template supports tool calling, image/video inputs and an enable_thinking switch, so you can trade reasoning length per request; upstream reports Swift's token savings hold at xhigh, medium and low reasoning effort.
I publish no numbers I have not measured myself. This table is the honest state of the repository:
| Benchmark | oQ4-mtp | oQ6-mtp | oQ8-mtp | BF16 upstream (reference) |
|---|---|---|---|---|
| GPQA-Diamond | not measured | not measured | not measured | 88.28% |
| AIME 2026 | not measured | not measured | not measured | 94.00% |
| LiveCodeBench v6 | not measured | not measured | not measured | 81.55% |
| IFBench | not measured | not measured | not measured | 71.80% |
Upstream Swift vs Qwen3.8-27B results (GPQA-Diamond −0.1 pt for ~41% fewer mean thinking tokens, ~1.95× faster) are reported by UkisAI in the base model card and are not measurements of these quantized weights. What you should realistically expect from a quantization of a "think less" fine-tune: token savings largely survive (they come from behaviour, not precision), while the hardest math splits and long-horizon tool chains degrade slightly — most visibly at 4-bit.
Measured throughput/acceptance-length data and issue reports (especially "quant X broke task Y") are welcome and will be merged into this table.
oQ4-mtp can amplify repetition on degenerate loops; keep repetition_penalty at 1.0 first and only then nudge it.This repository is distributed under the Swift Open License v1.0. A quantization is a derivative work: it inherits the upstream terms in full and cannot be released under a more permissive license.
LICENSE files in ukisai/Swift-Qwen3.8-27b and the BottleCap repository before commercial deployment.base_model metadata intact when you redistribute.@misc{swift-qwen3.8-27b-mlx-quants,
title = {Swift-Qwen3.8-27b-oQ4-mtp}: oMLX/MLX quantization of Swift-Qwen3.8-27B with MTP head retained,
author = {TokenAI-zer},
year = {2026},
howpublished = {\url{https://huggingface.co/TokenAI-zer/Swift-Qwen3.8-27b-oQ4-mtp}},
note = {Unofficial quantization of ukisai/Swift-Qwen3.8-27b}
}
@misc{swift-qwen3.8-27b,
title = {Swift-Qwen3.8-27B},
author = {UkisAI},
year = {2026},
url = {https://huggingface.co/ukisai/Swift-Qwen3.8-27b}
}