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"
|
Download README.md from ukisai/Swift-1.5-5bit-MLX: direct link, hf CLI and curl.
- Browser
- Download file 8.07 kB
-
https://huggingface.co/ukisai/Swift-1.5-5bit-MLX/resolve/4a7ea581d1cac07edd495dee1608f25ace2988ff/README.md
- Command line
-
hf download hf://ukisai/Swift-1.5-5bit-MLX@4a7ea581d1cac07edd495dee1608f25ace2988ff/README.md
-
curl -L -o README.md https://huggingface.co/ukisai/Swift-1.5-5bit-MLX/resolve/4a7ea581d1cac07edd495dee1608f25ace2988ff/README.md
8.07 kB
| 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. | |
| **Runtime compatibility:** this complete checkpoint requires both supplied patches, in the order shown | |
| and the pinned Python installation in [USAGE.md](USAGE.md). The tested unpatched | |
| MLX-LM 0.32.0 loader rejects 501 saved vision entries. Downloading the model does | |
| not install these patches into an app's inference engine. GUI compatibility and | |
| full 27B Apple Silicon generation remain unverified. | |
| The complete weights total **19.28 GB (17.96 GiB) across 4 required shards**, plus | |
| config, index and tokenizer files. A single 5–6 GB file is not the complete model. | |
| For download checks or `404 generation thread died`, use | |
| [TROUBLESHOOTING.md](TROUBLESHOOTING.md). | |
| 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. | |
| ## Download the complete model | |
| This repository is public; authentication is optional. Use a complete download: | |
| ```bash | |
| hf download ukisai/Swift-1.5-5bit-MLX --local-dir Swift-1.5-5bit-MLX | |
| python Swift-1.5-5bit-MLX/check_download.py Swift-1.5-5bit-MLX --hash | |
| ``` | |
| All four `model-0000*-of-00004.safetensors` files are required. Follow [USAGE.md](USAGE.md) | |
| to install both runtime patches before attempting generation. A download check | |
| does not establish successful inference or sufficient RAM. | |
| ## 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. | |