Instructions to use b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp 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("b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp") config = load_config("b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp") # 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 b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp"
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": "b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp 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 "b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp"
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 b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp"
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 "b2z/Swift1.5-GLM-5.3-Flash-oQ4e-mtp" \ --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"
Swift1.5-GLM-5.3-Flash-oQ4e-mtp
This model was quantized using oQ (oMLX v0.7.3) mixed-precision quantization.
The effective average is 4.641 bits/weight for the complete checkpoint.
Quantization and Bit Distribution
| Storage format | Logical weights | Share of total | Tensor storage | Effective bits/weight |
|---|---|---|---|---|
| Affine 4-bit, group 64 | 311.654B | 96.991% | 163.266 GiB | 4.50 |
| Affine 8-bit, group 64 | 8.976B | 2.793% | 8.882 GiB | 8.50 |
| BF16 | 0.607B | 0.189% | 1.131 GiB | 16.00 |
| FP32 | 0.086B | 0.027% | 0.322 GiB | 32.00 |
| Total | 321.323B | 100% | 173.600 GiB | 4.641 |
Storage Breakdown
| Component | Logical weights | Storage |
|---|---|---|
| Language model | 313.327B | 180.966 GB / 168.538 GiB |
| Vision | 0.564B | 1.127 GB / 1.050 GiB |
| MTP head | 7.433B | 4.309 GB / 4.013 GiB |
| Total | 321.323B | 186.402 GB / 173.600 GiB |
Swift 1.5 GLM-5.3-Flash
Swift 1.5 GLM-5.3-Flash is UkisAI's reasoning-efficient derivative of GLM-5.3-Flash. It uses 57.7% fewer thinking tokens, with a 2.4x speed up while keeping the accuracy loss <1% vs base on max reasoning effort.
The prompt is a sample from LiveCodeBench v6
Training approach
We made Swift GLM-5.3-Flash efficient by figuring out which tokens were linked to pathological overthinking and penalizing them without "attacking" the reasoning length directly, then regained the accuracy with further post-training, leading to "compressed" token usage while maintaining accuracy.
Swift 1.5 produces shorter reasoning traces. In our testing, we also observe fewer overthinking errors.
This release also features our previously mentioned post-training methods adapted specifically for coding and long-horizon agent work such as terminal use and software engineering.
Our training data is viewable here: https://huggingface.co/datasets/ukisai/Qwen3.8-27B-multi-turn-agent-sft albeit it is not used out of the box, but rather re-sampled, turned into proper RL environments etc.
Evaluation
The external results below compare GLM-5.3-Flash, the foundation base model, and Swift 1.5. Both models use the same saved evaluation protocols, and all scores are reported as final aggregate percentages.
| Benchmark | Score | Mean tokens | Median tokens | |||
|---|---|---|---|---|---|---|
| Base | Swift 1.5 | Base | Swift 1.5 | Reduction | Reduction | |
| General reasoning | ||||||
| GPQA-Diamond | 90.51% | 89.90% | 10,248 | 6,052 | โ 40.9% | โ 57.7% |
| MMLU-Pro | 87.38% | 86.25% | 2,755 | 1,064 | โ 61.4% | โ 44.4% |
| C-Eval | 93.42% | 93.68% | 1,214 | 752 | โ 38.0% | โ 19.9% |
| IFBench | 56.40% | 55.73% | 11,660 | 8,299 | โ 28.8% | โ 22.9% |
| Mathematics | ||||||
| AIME 2026 | 93.33% | 92.67% | 24,193 | 18,145 | โ 25.0% | โ 45.8% |
| HMMT (Nov 2025) | 95.33% | 91.33% | 25,924 | 18,797 | โ 27.5% | โ 31.7% |
| Coding | ||||||
| LiveCodeBench v6 | 86.69% | 87.94% | 21,506 | 14,645 | โ 31.9% | โ 36.1% |
| Agentic coding | ||||||
| Terminal-Bench 2.1* | 76.40% | 75.96% | 118,878 | 79,473 | โ 33.1% | โ 36.8% |
| DeepSWE v1.1 | 46.02% | 48.67% | 75,671 | 59,513 | โ 21.4% | โ 20.9% |
* Note: Terminal-Bench 2.1 ran with a 5-hour limit (18,000 seconds) on every task, not the native per-task limits, for both base and Swift 1.5.
How to reproduce
Serving: BF16 ยท vLLM ยท GLM-4.7 reasoning parser ยท context 262,144 ยท reasoning effort max ยท MTP disabled.
Sampling: temperature 1.0 ยท top_p 0.95 ยท presence_penalty 0 ยท repetition_penalty 1.
Benchmarks: five seeds (0โ4) for the question benchmarks. LiveCodeBench is full release v6 mean pass@1 over seeds.
Terminal-Bench 2.1: Harbor 0.20.0 / Terminus-2, pinned 89-task dataset, five attempts per task, temperature 1, top_p 1, 18,000-second task limit.
DeepSWE v1.1: 113 tasks ร 3 attempts, Pier 0.3.1 with mini-swe-agent 2.4.6, GLM-4.7 tool-call parser.
| Benchmark | Output cap |
|---|---|
| GPQA-Diamond | 100,000 |
| MMLU-Pro | 100,000 |
| C-Eval | 16,384 |
| IFBench | 81,920 |
| AIME 2026 | 250,000 |
| HMMT Nov 2025 | 250,000 |
| LiveCodeBench v6 | 100,000 |
Efficiency across reasoning efforts
GPQA-Diamond at each reasoning_effort setting, Swift 1.5 against the base at the same setting:
| Reasoning effort | Score | Mean tokens | Median tokens | |||
|---|---|---|---|---|---|---|
| Base | Swift 1.5 | Base | Swift 1.5 | Reduction | Reduction | |
| Max | 90.51% | 89.90% | 10,248 | 6,052 | โ 40.9% | โ 57.7% |
| High | 88.79% | 86.97% | 7,623 | 4,158 | โ 45.5% | โ 31.1% |
| Low | 77.27% | 73.33% | 2,815 | 1,377 | โ 51.1% | โ 13.7% |
At max, Swift 1.5 trails base by 0.61 percentage points while using 40.9% fewer mean and 57.7% fewer median thinking tokens. High and low save tokens but also lose 1.82 and 3.94 percentage points respectively.
Quantized models
| Format | Repository | Runtime |
|---|---|---|
| NVFP4 | Swift-1.5-GLM-5.3-Flash-NVFP4 | NVIDIA Blackwell |
| AWQ INT4 (W4A16) | Swift-1.5-GLM-5.3-Flash-W4A16-AWQ | vLLM (compressed-tensors) |
| GGUF | Swift-1.5-GLM-5.3-Flash-GGUF | llama.cpp |
Each quantized Swift 1.5 against a quantized base of the same format, on the same protocol as the BF16 evaluation:
| Benchmark | Score | Mean tokens | Median tokens | |||
|---|---|---|---|---|---|---|
| Base | Swift 1.5 | Base | Swift 1.5 | Reduction | Reduction | |
| NVFP4 | ||||||
| GPQA-Diamond | 90.10% | 90.20% | 13,069 | 7,148 | โ 45.3% | โ 59.5% |
| AIME 2026 | 94.00% | 91.33% | 30,855 | 29,768 | โ 3.5% | โ 48.3% |
| W4A16-AWQ | ||||||
| GPQA-Diamond | 90.81% | 89.19% | 10,601 | 6,718 | โ 36.6% | โ 55.3% |
| AIME 2026 | 92.67% | 94.00% | 20,138 | 22,546 | โ 12.0% | โ 46.8% |
NVFP4 base: nvidia/GLM-5.3-Flash-NVFP4, the same recipe. W4A16-AWQ base: wtdcode/GLM-5.3-Flash-AWQ-W4A16, the closest public AWQ.
How to use
The BF16 checkpoint is about 640 GB, so it needs a multi-GPU node. We evaluated it with tensor parallelism 8.
GGUF download
The GGUF version is available for compatible llama.cpp-based runtimes.
vLLM
Use a vLLM build with GLM-5.3-Flash support, such as the vllm/vllm-openai:glm53-flash-x86_64-cu129 image:
vllm serve ukisai/Swift1.5-GLM-5.3-Flash \
--dtype bfloat16 \
--tensor-parallel-size 8 \
--max-model-len 262144 \
--reasoning-parser glm47 \
--enable-auto-tool-choice \
--tool-call-parser glm47 \
--port 8000
Reasoning effort is set per request through the chat template, for example
"chat_template_kwargs": {"reasoning_effort": "high"}. max is the default; high and low are also supported.
SGLang
Alternatively, use an SGLang build with GLM-5.3-Flash support and set
--model-path ukisai/Swift1.5-GLM-5.3-Flash.
Adjust tensor parallelism and context length to your GPU memory. See the base model's vLLM recipe and SGLang cookbook for installation and hardware-specific settings.
Transformers
Use a Transformers release with GLM-5.3-Flash (glm5_next) support:
import torch
from transformers import AutoProcessor, Glm5NextForConditionalGeneration
model_id = "ukisai/Swift1.5-GLM-5.3-Flash"
processor = AutoProcessor.from_pretrained(model_id)
model = Glm5NextForConditionalGeneration.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
Optional MTP decoding
The checkpoint includes the base model's one-layer MTP head. To enable self-speculative decoding in vLLM, append the flag from the base model's vLLM recipe to the server command above:
--speculative-config '{"method":"mtp","num_speculative_tokens":5}'
For SGLang, use the MTP settings in the SGLang cookbook. The benchmark scores above were measured without MTP.
License and access
Swift 1.5 GLM-5.3-Flash is a derivative of GLM-5.3-Flash (Copyright (c) 2026 Z.AI Co., Ltd, MIT License). UkisAI's contribution, including the adapted weights, is licensed under the Swift Open License v1.0. See NOTICE for the change notice and attribution details.
Personal, research, educational, evaluation, and commercial use of the Swift contribution 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.
The base model's MIT License still applies to the base model. Nothing in the Swift Open License limits your rights in GLM-5.3-Flash itself under the MIT License.
Citation
@misc{swift-1.5-glm-5.3-flash,
title = {Swift 1.5 GLM-5.3-Flash},
author = {UkisAI},
year = {2026},
url = {https://huggingface.co/ukisai/Swift1.5-GLM-5.3-Flash}
}
Acknowledgements
We acknowledge Amazon Web Services for providing compute credits and infrastructure support for Swift's development, training, and evaluation.
- Downloads last month
- 406
4-bit
