license: other
license_name: swift-open-license-1.0
license_link: https://huggingface.co/ukisai/Swift-1.5-Qwen3.8-27b/blob/main/LICENSE
base_model:
- ukisai/Swift-1.5-Qwen3.8-27b
- Qwen/Qwen3.8-27B
- ajgazin/Swift-Qwen3.8-27B-Uncensored-MTP
- orcarouter/Qwen3.8-27B-Uncensored
library_name: exllamav3
pipeline_tag: image-text-to-text
tags: - exl3
- exllamav3
- qwen3_8
- swift-1.5
- abliterated
- uncensored
- reasoning
- efficient-thinking
- vision
- multimodal
- mtp
- dflash2
Swift-1.5-Qwen3.8-27B-Uncensored-EXL3-3.75bpw (SC_3.75bpw_H5_V6_MTP4)
An uncensored (abliterated), full multimodal (Vision + MTP) ExLlamaV3 (EXL3) quantization of ukisai/Swift-1.5-Qwen3.8-27b — UkisAI's second-generation GSPO (RL) and On-Policy Distillation (OPD) reasoning-efficient upgrade of Qwen/Qwen3.8-27B.
Designed specifically to run 100% inside a single 24 GB GPU (RTX 3090 / 4090) at 131,072 context alongside Qwen3.8-27B-DFlash2 block-diffusion speculative decoding (~135–155 tok/s), with the 6-bit Vision Tower and 4-bit MTP Head preserved intact.
1. Model Highlights & Architecture Summary
| Property | Specification |
|---|---|
| Upstream Base Model | ukisai/Swift-1.5-Qwen3.8-27b (finetuned from Qwen/Qwen3.8-27B) |
| Refusal Abliteration | Single-direction rank-1 float32 orthogonalization (r.pt) from ajgazin/Swift-Qwen3.8-27B-Uncensored-MTP / orcarouter/Qwen3.8-27B-Uncensored applied across all 131 residual-writing tensors (including MTP) prior to quantization |
| Quantization Format | ExLlamaV3 (EXL3) custom structured allocation (SC_3.75bpw_H5_V6_MTP4) |
| Total Quantized Size | 14.52 GiB (14,868.18 MB across 2 .safetensors shards) |
Text Backbone (layers.0–63) |
3.75 bpw (48 Gated DeltaNet linear-attention layers + 16 full-attention GQA layers; SQNR = 36.14 dB on final layer) |
LM Head (lm_head) |
5.00 bpw (SQNR = 36.27 dB, cos_err = 0.000142) |
Vision Tower (model.visual.*) |
6.00 bpw (All 27 ViT blocks + spatial patch merger preserved for multimodal image/video input) |
MTP Head (mtp.*) |
4.00 bpw (Multi-Token Prediction head abliterated consistently with the trunk and quantized at 4-bit) |
Token Embeddings (embed_tokens) |
16.00 bpw (BF16) (Pinned in System RAM by ExLlamaV3 for 0.00 GiB VRAM overhead and zero dequantization latency) |
2. Why Swift 1.5 Over Swift 1.0 & Base Qwen3.8-27B?
UkisAI's Swift 1.5 upgrades Swift 1.0 by scaling up Group Sequence Policy Optimization (GSPO RL) and On-Policy Distillation (OPD) across multi-turn agentic and software engineering environments (ukisai/Qwen3.8-27B-multi-turn-agent-sft).
Whereas Swift 1.0 occasionally gave up early on multi-step CLI/agentic tasks when reflection tokens were penalized, Swift 1.5 distinguishes between pathological single-turn overthinking loops and legitimate multi-turn task persistence:
| Benchmark | Category | Base Qwen3.8-27B | Swift 1.0 (27B) | Swift 1.5 (27B) | Swift 1.5 Gain & Token Reduction |
|---|---|---|---|---|---|
| Terminal-Bench 2.1 | Agentic / CLI | 69.21% (52,265t) |
65.84% (27,272t) |
72.13% (43,733t) |
+6.29% vs Swift 1.0 (+2.92% over Base; fixes early loop bailout) |
| LiveCodeBench v6 | Hard Coding | 76.76% (11,184t) |
81.55% (8,615t) |
81.71% (8,448t) |
+4.95% over Base with -46.3% median thinking tokens |
| GPQA-Diamond | PhD Science | 88.28% (15,014t) |
88.28% (8,855t) |
88.59% (8,717t) |
+0.31% over Base with -58.5% median thinking tokens |
| AIME 2026 | Olympiad Math | 98.67% (22,014t) |
94.00% (16,143t) |
96.00% (13,203t) |
+2.00% vs Swift 1.0 while using -18.2% fewer tokens |
| HMMT Nov 2025 | Olympiad Math | 99.33% (22,032t) |
96.00% (15,189t) |
97.33% (14,957t) |
+1.33% vs Swift 1.0 (-47.8% median thinking tokens) |
| C-Eval | General Knowledge | 90.00% (1,492t) |
90.62% (804t) |
90.92% (819t) |
+0.92% over Base (-45.1% mean thinking tokens) |
| IFBench | Strict Instructions | 73.53% (8,052t) |
71.80% (4,657t) |
72.07% (4,955t) |
+0.27% vs Swift 1.0 (-47.3% median thinking tokens) |
| ERQA | Multimodal Vision | 67.45% (4,137t) |
66.30% (2,045t) |
65.40% (1,906t) |
-53.9% mean / -56.2% median thinking tokens |
3. Exact Methodology & Reproduction Pipeline
All tools, refusal vectors, and quantization scripts used to produce this checkpoint are included directly in the abliteration/ directory of this repository.
Stage 1: Float32 Single-Direction Refusal Orthogonalization (131 Tensors)
Following Arditi et al. (2024) ("Refusal in Language Models Is Mediated by a Single Direction"), orcarouter/Qwen3.8-27B-Uncensored, and ajgazin/Swift-Qwen3.8-27B-Uncensored-MTP:
- Refusal Direction Recovery (
abliteration/r.pt):r$\in \mathbb{R}^{5120}$ (||r||_2 = 1) is the unit-norm refusal direction extracted at Layer 38 from the mean residual-stream difference between 400 harmful (AdvBench) and 400 harmless (Alpaca) prompts, with 5 massive-activation coordinates masked to exact zero so outlier attention sinks remain unperturbed.- As verified by
ajgazin, the cosine similarity between the Layer-38 refusal direction ofQwen/Qwen3.8-27BandUkisAI/Swiftis0.99995, confirming that UkisAI's GSPO/OPD post-training did not rotate the refusal subspace.
- In-Place
float32Orthogonal Projection (before EXL3 quantization):
Rather than adding a static weight delta from base Qwen3.8 (which would overwrite Swift 1.5's RL updates), we projectrdirectly out ofukisai/Swift-1.5-Qwen3.8-27b's own weight matrices infloat32prior to saving back tobfloat16:- For all 130 Residual-Writing Linear Projections ($W \in \mathbb{R}^{d_{\text{model}} \times d_{\text{in}}}$):
$$W' = W - r,(r^\top W)$$
Applied to:model.language_model.layers.{0..63}.self_attn.o_proj.weight(16full-attention layers)model.language_model.layers.{0..63}.linear_attn.out_proj.weight(48Gated DeltaNet layers)model.language_model.layers.{0..63}.mlp.down_proj.weight(64SwiGLU MLP layers)mtp.layers.0.self_attn.o_proj.weight&mtp.layers.0.mlp.down_proj.weight(2MTP head projections — ensuring the MTP head's hidden states remain aligned with the abliterated trunk)
- For the Token Embedding Matrix ($E \in \mathbb{R}^{248320 \times 5120}$):
$$E' = E - (E,r),r^\top$$
Applied to:model.language_model.embed_tokens.weight(1tensor)
- For all 130 Residual-Writing Linear Projections ($W \in \mathbb{R}^{d_{\text{model}} \times d_{\text{in}}}$):
Stage 2: Custom SC_3.75bpw_H5_V6_MTP4 EXL3 Quantization
Quantized from the abliterated BF16 checkpoint using ExLlamaV3 (convert.py with --override spec in abliteration/run_quantize_swift15_375.py):
- Why
embed_tokensis kept inBF16(16.00 bpw):- In
ExLlamaV3,Embeddingdeclarescaps = {"prefer_cpu": True}and stays in pinned System RAM (0.00 GiBGPU VRAM). BenchmarkingINT8row-wise quantized embeddings showed0 MBof GPU VRAM savings while adding+67 µsper 16-token verification step due to CPUint8 -> bf16dequantization. Keepingembed_tokensinBF16gives both maximum lookup speed and lossless input representations.
- In
- Why
lm_headis5.00 bpwandmodel.visual.*is6.00 bpw:- With a
248,320-token vocabulary,lm_headrequires5.00 bpw(SQNR = 36.27 dB) to preserve tail-token logit calibration during speculative tree verification withDFlash2. - All
27Vision blocks (model.visual.blocks.0..26) andmodel.visual.mergerare quantized to6.00 bpw, preventing visual tokenization degradation on OCR, UI understanding, andERQAtasks.
- With a
4. Recommended Serving Setup (ExLlamaV3 + DFlash2)
Key Serving Notes for Swift 1.5:
- No Artificial
--reasoning-budgetNeeded:- Unlike Base
Qwen3.8-27B(which required--reasoning-budget 2048to break out of infinite"Wait, let me double-check..."loops),Swift 1.5naturally terminates<think>via its GSPO/OPD training. - Leave
reasoning_effort="xhigh"with no hard reasoning budget cutoff (--reasoning-budget 0) so the model uses~300–800tokens on simple queries and dynamically scales to4,000–8,400tokens on complexLiveCodeBench-grade architecture/coding prompts.
- Unlike Base
- Recommended Sampling Parameters:
- Coding / DFlash2 Speculative Decoding:
temperature = 0.6,top_p = 0.95,top_k = 20,min_p = 0.0,presence_penalty = 1.5(applied to generated output tokens only),repetition_penalty = 1.0. - General Reasoning / Math Benchmarks:
temperature = 1.0,top_p = 0.95,top_k = 20,min_p = 0.0.
- Coding / DFlash2 Speculative Decoding:
Python Loading Example (ExLlamaV3)
from exllamav3 import Config, Model, Cache, Tokenizer, Generator
config = Config.from_directory("Swift-1.5-Qwen3.8-27B-Uncensored-EXL3-3.75bpw")
model = Model.from_config(config)
cache = Cache(model, max_num_tokens=131072) # Or CacheLayer_quant(k_bits=4, v_bits=4)
model.load()
# Optional: Load the 6-bit Vision Tower for multimodal inputs
vision_model = Model.from_config(config, component="vision")
vision_model.load()
tokenizer = Tokenizer.from_config(config)
generator = Generator(model=model, cache=cache, tokenizer=tokenizer)
5. Credits, Citations & Licenses
This model stands on the shoulders of the following open-source researchers and organizations:
- UkisAI (
ukisai/Swift-1.5-Qwen3.8-27b):- Post-training via GSPO (RL) and On-Policy Distillation (OPD) for
-58.5%median thinking token reduction and higher agentic/coding accuracy. - Licensed under the Swift Open License v1.0 (free for personal, research, educational, evaluation, and commercial use for individuals and organizations up to US$1,000,000 annual gross revenue).
- Post-training via GSPO (RL) and On-Policy Distillation (OPD) for
- Alibaba Cloud Qwen Team (
Qwen/Qwen3.8-27B):- Base 27B hybrid Gated DeltaNet + Full-Attention VLM architecture. Licensed under Apache License 2.0.
- ajgazin (
ajgazin/Swift-Qwen3.8-27B-Uncensored-MTP) & OrcaRouter (orcarouter/Qwen3.8-27B-Uncensored):- Recovery and verification of the massive-activation-masked Layer-38 refusal vector
r(r.pt) andorca_tools.pyprojection utilities.
- Recovery and verification of the massive-activation-masked Layer-38 refusal vector
- Arditi et al. (2024):
- "Refusal in Language Models Is Mediated by a Single Direction" (
arXiv:2406.11717).
- "Refusal in Language Models Is Mediated by a Single Direction" (
- Turboderp (
ExLlamaV3):- EXL3 trellis quantization engine and hybrid Gated DeltaNet / VLM inference runtime.
- z-lab (
z-lab/Qwen3.8-27B-DFlash2):- Block-diffusion speculative decoding drafter (
DFlash2) for Qwen3.8-27B.
- Block-diffusion speculative decoding drafter (
@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}
}
@article{arditi2024refusal,
title = {Refusal in Language Models Is Mediated by a Single Direction},
author = {Arditi, Andy and Obeso, Oscar and Syed, Aaquib and Paleka, Daniel and Panickssery, Nina and Gurnee, Wes and Nanda, Neel},
journal = {arXiv preprint arXiv:2406.11717},
year = {2024}
}