Instructions to use ukisai/Swift-1.5-5bit-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ukisai/Swift-1.5-5bit-MLX 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("ukisai/Swift-1.5-5bit-MLX") 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 ukisai/Swift-1.5-5bit-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ukisai/Swift-1.5-5bit-MLX"
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": "ukisai/Swift-1.5-5bit-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use ukisai/Swift-1.5-5bit-MLX with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "ukisai/Swift-1.5-5bit-MLX"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "ukisai/Swift-1.5-5bit-MLX" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ukisai/Swift-1.5-5bit-MLX", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use ukisai/Swift-1.5-5bit-MLX 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 "ukisai/Swift-1.5-5bit-MLX"
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 ukisai/Swift-1.5-5bit-MLX
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ukisai/Swift-1.5-5bit-MLX with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ukisai/Swift-1.5-5bit-MLX"
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 "ukisai/Swift-1.5-5bit-MLX" \ --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"
File size: 6,903 Bytes
e476358 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | ---
license: other
license_name: swift-open-license-1.0
license_link: https://huggingface.co/ukisai/Swift-1.5-5bit-MLX/blob/main/LICENSE
base_model: ukisai/Swift-1.5-Qwen3.8-27b
base_model_relation: quantized
library_name: mlx
pipeline_tag: text-generation
tags:
- mlx
- quantized
- 5-bit
- affine
- qwen3_8
---
<div align="center">
<a href="https://ukisai.com"><img src="ukisai-banner.png" alt="UkisAI" style="width:100%;max-width:100%;height:auto;display:block;margin-bottom:0.6em;" /></a>
<a href="https://ukisai.com">Website</a> •
<a href="https://ukisai.com/products/swift">Learn more</a> •
<a href="https://huggingface.co/ukisai/Swift-1.5-Qwen3.8-27b">BF16 model</a> •
<a href="https://huggingface.co/ukisai/Swift-1.5-Qwen3.8-27B-GGUF">GGUF</a> •
<a href="https://huggingface.co/ukisai/Swift-1.5-Qwen3.8-27B-GSQ-RCO-GGUF">GSQ-RCO GGUF</a> •
<a href="#evaluation">Evaluation</a> •
<a href="#license-and-access">Enterprise licensing</a>
</div>
# Swift 1.5 Qwen3.8-27B — 5-bit MLX
**MLX affine 5-bit quantization, group size 64.** Swift 1.5 is UkisAI's
reasoning-efficient Qwen3.8-27B derivative, focused on long-horizon, agentic and
coding tasks. This export preserves the text, vision and MTP parameter tree;
its supported generation interface is text-only with the included MLX-LM patches.
Swift 1.5 uses **58.5% fewer thinking tokens** than base Qwen3.8-27B while scoring **0.35% higher**, for a **9.18× speed-up** on several tasks.
> [!CAUTION]
> Use only a complete snapshot whose files match `UPLOAD_MANIFEST.json`.
> Historical build tests are not certification of an incomplete Hub snapshot.
> Full independent Apple Silicon generation and quality evaluation remain **NOT_RUN**.
> The 19.28 GB tensor payload must not be forced onto a 16 GiB Mac.
## Demo
We gave base Qwen3.8-27B and Swift 1.5 27B the same prompt:
> create a 3d little planet globe where I (player can walk around) and it has all these biomes to explore, the globe doesn't have to be too big, but still fun to go around. It's about a boy scout who is camping and goes around exploring.
<video src="https://huggingface.co/ukisai/Swift-1.5-5bit-MLX/resolve/main/swift-1.5-planet-demo.mp4" controls autoplay muted loop playsinline style="width:100%;height:auto;border-radius:12px;"></video>
Try the game yourself here: [https://ukisai.com/swift-games/27b](https://ukisai.com/swift-games/27b)
Base Qwen3.8-27B took 104.6 minutes to build its game. Swift 1.5 took 11.39 minutes.
## Source and quantization
The recorded source is the complete customized Swift BF16 export at
[`5ad04445d2686f525e9fbe5c077e6fa0c7df4200`](https://huggingface.co/ukisai/Swift-1.5-Qwen3.8-27b/tree/5ad04445d2686f525e9fbe5c077e6fa0c7df4200),
not base Qwen or another quantized model. The converter uses official MLX-LM
commit `c69d1288440a0dc4e6401fc417098b07598dccd5` with the included architecture
patch followed by the 5-bit extension.
The original build report accounts for 1,199 source tensors, including 333 vision
and 15 MTP tensors, and records 590 quantized modules plus 609 unquantized BF16
tensors after layout mapping. Its four shards contain 2,379 saved tensors and
19,281,804,384 bytes of tensor data. Independent recovery checks verified full
SHA-256 hashes and header/index consistency of the original build. They did not
repeat the complete source-value equality, finite-value or model-generation tests.
The original tokenizer, template, configs, processors and quantized bytes are
preserved. [QUANTIZATION_MANIFEST.json](QUANTIZATION_MANIFEST.json) and the
existing `compatibility/` reports are historical build evidence. The current
[upload manifest](UPLOAD_MANIFEST.json) identifies the intended complete file set.
## Evaluation
See the [Swift BF16 source evaluation](https://huggingface.co/ukisai/Swift-1.5-Qwen3.8-27b#evaluation)
for source benchmarks and methodology. They were not rerun on this MLX export.
No new broad accuracy, stability, long-context or BF16 quality-parity result is claimed.
## Validation and use
**Both supplied MLX-LM patches are required, in order.** [USAGE.md](USAGE.md)
contains the pinned install, full-file integrity check and generation example.
The preserved source architecture is `Qwen3_5ForConditionalGeneration` / `qwen3_5`.
The historical Linux build reports strict reload of 2,379 tensors, finite floating
values, exact unquantized BF16 preservation, processor/tokenizer loading, and a short
CPU generation returning `Hello from Swift.`. It also reports a real-weight vision
encoder check and one explicit MTP step. These are historical results, not new
independent inference results for the uploaded release.
The CPU example promotes in-memory floating values to FP32 while retaining packed
5-bit UINT32 weights. A new synthetic macOS CPU/Metal diagnostic reproduces an MLX
0.32.2 CPU BF16 accumulation issue; it is not a Linux or full-model test. See
[diagnostic](compatibility/macos-quantized-matmul-diagnostic.json) and
[package checks](compatibility/package-checks.json).
Full 27B Apple Silicon generation is unverified. Integrated image/video chat and
speculative MTP generation are **not implemented** by the patch. Vision/MTP weights
and component checks do not establish those end-to-end capabilities. Runtime/cache
and OS memory must be budgeted in addition to the tensor payload.
## License and access
Swift 1.5 derives from [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B)
(Copyright 2026 Alibaba Cloud, [Apache License 2.0](https://huggingface.co/ukisai/Swift-1.5-5bit-MLX/blob/main/LICENSE-APACHE-2.0)).
UkisAI's adapted weights are licensed under the [Swift Open License v1.0](https://huggingface.co/ukisai/Swift-1.5-5bit-MLX/blob/main/LICENSE).
See [NOTICE](https://huggingface.co/ukisai/Swift-1.5-5bit-MLX/blob/main/NOTICE) for attribution and change notices.
Personal, research, educational, evaluation and commercial use are free for
individuals and organizations with gross annual revenue, including affiliates,
of up to US$1,000,000. Above that threshold, commercial use requires a separate
Swift Enterprise License. Contact [UkisAI](https://ukisai.com/contact) for terms.
Nothing in the Swift Open License limits the Apache 2.0 rights in Qwen3.8-27B itself.
The accompanying Apple MLX-LM code has a separate upstream
[MIT notice](compatibility/LICENSE-MLX-LM-MIT).
## Citation
```bibtex
@misc{swift-1.5-qwen3.8-27b,
title = {Swift 1.5 Qwen3.8-27B},
author = {UkisAI},
year = {2026},
url = {https://huggingface.co/ukisai/Swift-1.5-Qwen3.8-27b}
}
```
## Acknowledgements
We acknowledge the [NVIDIA Innovation Lab](https://www.nvidia.com/en-us/data-center/innovation-lab/),
[Amazon Web Services](https://aws.amazon.com/), and [Google Cloud](https://cloud.google.com/)
for compute credits and infrastructure support for Swift's development, training
and evaluation.
|