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"
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.
Starting from Homebrew or seeing Received 501 parameters not in model?
Use QUICKSTART.md to install the required runtime and create an
explicit serve launcher. It reuses your existing model directory, including an
HF cache snapshot. A bare mlx_lm.server command may select a separate Homebrew
installation that lacks the Swift architecture and cache patches.
Runtime compatibility: this complete checkpoint requires both supplied patches, in the order shown and the pinned Python installation in 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 remains unverified.
Full-model follow-up validation is now recorded in FULL_MAC_VALIDATION.md: both complete checkpoints passed an 86k-token synthetic text conversation and two cached follow-ups on a 48 GiB M4 Pro using the patched server. GUI integration and other memory/context sizes remain outside that test.
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.
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.
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:
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
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.
Try the game yourself here: 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,
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 and the
existing compatibility/ reports are historical build evidence. The current
upload manifest identifies the intended complete file set.
Evaluation
See the Swift BF16 source 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
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 and package checks.
Full-model text generation is covered in FULL_MAC_VALIDATION.md. 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 (Copyright 2026 Alibaba Cloud, Apache License 2.0). UkisAI's adapted weights are licensed under the Swift Open License v1.0. See 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 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.
Citation
@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, Amazon Web Services, and Google Cloud for compute credits and infrastructure support for Swift's development, training and evaluation.
- Downloads last month
- 1,698
5-bit
