Downloads · 30 days
135
32% of all-time downloads
akumaburn/Swift-Qwen3.8-27b-heretic-W4A16
Swift-Qwen3.8-27b-heretic-W4A16 is a image-text-to-text model from akumaburn. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for vllm. The card lists the license as apache-2.0.
[!CAUTION] Research artifact. Safety alignment has been deliberately removed. This model will attempt to comply with harmful, dangerous, illegal and unethical requests that the base model refuses, with no content mode…
Downloads · 30 days
135
32% of all-time downloads
All-time downloads
420
Public
Parameters
6.3B
19.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors19.5 GB · 100%
How the weights are stored.
I3224.3B · 88%
From the Hugging Face model README
[!CAUTION] Research artifact. Safety alignment has been deliberately removed. This model will attempt to comply with harmful, dangerous, illegal and unethical requests that the base model refuses, with no content moderation. See Safety. Provided for research purposes only, with no warranty and no liability accepted by the author — see the disclaimer at the bottom.
A 4-bit W4A16 quantization of akumaburn/Swift-Qwen3.8-27b-heretic, built for single-user interactive decoding with the DFlash2 speculative drafter on Ampere-class (SM 8.0) GPUs.
g_idx) → compressed-tensors pack-quantized.lm_head, embed_tokens, the vision tower,
GatedDeltaNet in_proj_a/in_proj_b recurrent gates, the MTP head, all norms.[!IMPORTANT] This checkpoint is deliberately not rotated. The W8A8 sibling applies an offline QuaRot rotation, which puts the residual stream in a rotated basis and makes the DFlash2 drafter — whose
fcwas trained on unrotated hidden states — reject every draft (measured: acceptance length exactly 1.00). Skipping rotation is what makes this build usable with DFlash2. SmoothQuant is likewise omitted: it migrates quantization difficulty into the weights, which is the wrong trade when only weights are quantized.
| build | size | served KL | first-token KL | DFlash2 | best for |
|---|---|---|---|---|---|
| BF16 source | 52 GB | — | — | n/a | research, re-quantization |
| W8A8 + QuaRot/SmoothQuant | 30 GB | 0.0117 | 0.0244 | ❌ 1.00 | maximum fidelity; MTP speculation |
| W8A8 unrotated | 30 GB | 0.0337 | 0.0417 | ✅ 4.14 | general purpose: DFlash2 + full throughput |
| W4A16 unrotated | 19 GB | 0.0354 | 0.1146 | ✅ 4.35 | smallest; single-user decode; low VRAM |
served KL = KL(source ‖ build) under vLLM (real serving numerics), WikiText-2,
top-512, 12,264 token positions. first-token KL = full-vocabulary at the first
generated token over 100 harmless instruction prompts, under transformers.
[!NOTE] The two metrics disagree in an informative way. On served natural text the 4-bit and unrotated-8-bit builds are effectively tied (0.0354 vs 0.0337); the 4-bit penalty is concentrated at high-entropy decision points, where first-token KL puts it 2.7× worse. Conversely the rotation is worth 2.9× on the served metric but only 1.7× first-token — expected, since rotation exists to tame activation outliers for INT8 activation quantization, which only the served measurement exercises.
DFlash2 column is acceptance length on harmless48 (48 code/prose tasks,
greedy, k=7; 1.00 = every draft rejected). Acceptance is governed by prompt
domain, not by the build: the same checkpoints score ~3.2 on conversational
prose. See Speculative acceptance below.
[!TIP] Match speculative depth to concurrency. Measured on the unrotated W8A8 (same model and dataset, only the speculative config varying, 1,024-token inputs): DFlash2 k=7 gives 2.8× decode at c=1 and still wins at c=8, but at c≥16 it costs throughput — at c=32 prefill falls from 18,942 to 2,768 tok/s. That is speculative overhead on a saturated GPU, not a property of any checkpoint. Use DFlash2 for c ≤ 8; disable it for c ≥ 16.
These are different operating points, not better/worse. Measured on one CMP 170HX
(64 GB), TP=1, fp8_e4m3 KV, async scheduling, identical datasets. Two workloads
are shown because the answer depends on prompt length — quoting one number for
"prefill" is misleading.
Long prompts (~16k in, 16 out):
| this (W4A16, DFlash2 k=7) | W8A8 + QuaRot (MTP k=3) | |
|---|---|---|
| decode @ c=1 | 154 tok/s | 73 tok/s |
| decode @ c=32 | 578 tok/s | 840 tok/s |
| prefill (flat across c) | ~1,750 tok/s | ~3,350 tok/s |
Short prompts (1,024 in, 256 out) — prefill = c × in_len ÷ mean TTFT:
| c | this prefill | W8A8 prefill | this decode | W8A8 decode |
|---|---|---|---|---|
| 1 | 1,868 | 3,349 | 103.4 | 69.1 |
| 4 | 4,028 | 7,539 | 199.2 | 171.9 |
| 32 | 1,804 | 18,621 | 255.6 | 487.5 |
| this (W4A16) | 8-bit siblings | |
|---|---|---|
| size | 19 GB | 30 GB |
| served KL | 0.0354 | 0.0117 (rotated) / 0.0337 (unrotated) |
| first-token KL | 0.1146 | 0.0244 (rotated) / 0.0417 (unrotated) |
vllm bench serve, TP=1, fp8_e4m3 KV, async scheduling, DFlash2 drafter with
num_speculative_tokens=7.
| c | Prefill (input tok/s) | Decode (output tok/s) | TTFT p50 | TPOT p50 | DFlash2 acceptance length |
|---|---|---|---|---|---|
| 1 | 1,762 | 154.1 | 10.5 s | 5.7 ms | 3.74 |
| 2 | 1,778 | 236.3 | 20.0 s | 7.2 ms | 3.71 |
| 4 | 1,760 | 352.6 | 41.3 s | 8.9 ms | 3.75 |
| 8 | 1,749 | 478.7 | 83.7 s | 12.8 ms | 3.87 |
| 16 | 1,746 | 570.1 | 169 s | 21.1 ms | 3.86 |
| 32 | 1,751 | 578.4 | 338 s | 35.9 ms | 3.80 |
Greedy (temperature 0), k=7, concurrency 1, 48 prompts per set, DFlash2 drafter, identical harness for both checkpoints:
| prompt set | mean chars | this (W4A16) | W8A8 unrotated |
|---|---|---|---|
code tasks (harmless48) | 358 | 4.354 | 4.138 |
benign prose (harmless_alpaca) | 63 | 3.267 | — |
abliterated-content prose (harmful_behaviors) | 73 | 3.206 | 3.110 |
Acceptance is governed by prompt domain, not by the checkpoint or by the abliteration. Structured code — boilerplate, rigid syntax, predictable continuations — drafts far better than short open-ended prose (−32 % accepted tokens per draft, 95 % CI ±0.17, significant). Whether that prose is benign or is exactly the content the model was decensored for makes no measurable difference (−2.7 %, 95 % CI ±0.16 — not significant). Abliteration does not degrade speculation.
Against the 8-bit sibling the acceptance edge is small: +6.5 % on code (95 % CI ±0.18, marginally significant) and not significant on prose. This build's real speculative advantage is wall-clock rather than acceptance: +36 % decode throughput at c=1 on both sets, because 4-bit weights are cheaper to stream.
The drafter's block_size is 8, so k=7 is the architectural maximum — there
is no headroom from drafting deeper.
[!NOTE] An earlier version of this card reported 5.12 / 58.9 %, measured on a 4-prompt file. That sample was far too small and optimistic; the 48-prompt figures above supersede it. The 8-bit sibling's previously published 3.36 was measured on that same 4-prompt file and is likewise superseded by 4.138 — the two builds are much closer than those numbers implied.
KL(source ‖ this), measured two ways — they disagree, and the disagreement is
the most useful thing on this card:
| metric | this (W4A16) | W8A8 rotated | W8A8 unrotated |
|---|---|---|---|
| served top-512, WikiText-2, 12,264 positions, under vLLM | 0.0354 | 0.0117 | 0.0337 |
first-token full-vocab, 100 harmless prompts, transformers | 0.1146 | 0.0244 | 0.0417 |
On the first-token metric 4-bit weights cost ~4.7× the divergence of the rotated 8-bit build — and it exceeds the abliteration's own divergence from the unmodified Swift model (0.0763), meaning quantization perturbs this checkpoint more than the uncensoring did.
On the served metric that gap almost vanishes: 0.0354 here versus 0.0337 for the unrotated 8-bit build at the same activation precision story — a 5 % difference, not a 2.7× one. Averaged over 12,264 positions of ordinary text the two are effectively equivalent.
Both numbers are real; they measure different things. Natural-language continuation is dominated by low-entropy, highly predictable positions where 4-bit weights are adequate. The first-token metric samples exactly the opposite regime — the high-entropy moment where an instruction's response is chosen among many plausible openings — and there the coarser weight grid costs real accuracy. Expect this build to feel close to 8-bit on flowing prose and continuation, and to diverge most at decision points: the first token of a reply, branch points in reasoning, structured-format choices.
The rotated W8A8 leads on both metrics, and by more on served (2.9×) than
first-token (1.7×) — consistent with the rotation's actual job, which is taming
activation outliers for INT8 activation quantization. Only the served
measurement exercises INT8 activations at all; the transformers first-token
measurement runs them in fp16 and therefore understates what rotation buys.
Refusal behaviour is inherited unchanged from the source: 0/100 hard refusals, with the same ~20–24 % chain-of-thought deflection band described on the source card.
The drafter is a separate checkpoint from this model. Two work, and which one you can use depends on your vLLM build:
| drafter | size | needs a patch? | decode (c=1) |
|---|---|---|---|
incoai/Qwen3.8-27B-DFlash2 (BF16) | 3.6 GB | no — works on stock vLLM 0.29.0 | 122.4 tok/s |
syvai/Qwen3.8-27B-DFlash2-W4A16 | 1.2 GB | yes | 127.1 tok/s |
akumaburn/…-W4A16-longctx | 1.2 GB | yes | 127.1 tok/s — same weights, safe past 262k |
Stock vLLM 0.29.0 already ships DFlash2, but _build_fused_kv_buffers reads
qkv_proj.weight directly. A pack-quantized (W4A16) drafter has no such
attribute, so it dies at startup with
AttributeError: 'QKVParallelLinear' object has no attribute 'weight'
vllm/model_executor/models/qwen3_dflash.py:472
A BF16 drafter takes the dense fast path and needs no patch at all — that is the simplest way to run this model. The one-function fix for the quantized drafter is at github.com/akumaburn/vllm-dflash2.
[!CAUTION] Serving past 262,144 tokens kills the engine. Both drafters declare
max_position_embeddings: 262144. At a longer position the drafter's rope table is indexed out of bounds and the CUDA assertindex out of bounds: 0 <= ... < 262144takes down the whole vLLM engine (EngineDeadError), not just the request. This is reachable whenever the target is YaRN-extended past its native 262,144 context.Fix: raise
max_position_embeddingsin the drafter'sconfig.jsonto your served length, or use the ready-madeakumaburn/Qwen3.8-27B-DFlash2-W4A16-longctx(identical weights, that one field set to 393216). The weights are untouched, and it is safe because the drafter uses sliding-window (2048) attention — only relative positions inside the window matter. Measured with the enlarged table: acceptance 3.82 at 150k and 2.70 at 300k (degraded by extrapolation beyond the drafter's trained range, but working). Unfixed, 300k is a hard crash.
Measured on identical hardware and harness, the quantized drafter is worth +4 % decode and 2.4 GB of VRAM; acceptance between the two is statistically identical. At long context the VRAM is the bigger prize, since it becomes KV cache.
vllm serve akumaburn/Swift-Qwen3.8-27b-heretic-W4A16 \
--tensor-parallel-size 1 \
--max-model-len 32768 \
--kv-cache-dtype fp8_e4m3 \
--async-scheduling \
--speculative-config '{"method":"dflash","model":"<path-to>/Qwen3.8-27B-DFlash2-W4A16","num_speculative_tokens":7}'
Without a drafter it serves as a plain W4A16 checkpoint on the Marlin kernel.
Optional: VLLM_MARLIN_INPUT_DTYPE=int8 makes Marlin consume INT8 activations
on these same weights (an effective "W4A8" without a second checkpoint); on
patched builds VLLM_MARLIN_INT8_INCLUDE_RE=mlp applies it selectively. Neither
was used for the numbers above.
All quantized matmul dimensions are multiples of 128 (no INT4 padding).
Refusal behaviour has been deliberately removed; this model produces content the source declines, including dangerous, illegal or unethical material, with no moderation. Intended for interpretability/safety research, red-teaming and evaluation by people who understand and accept those risks. Do not deploy it where it can reach people who have not consented to unfiltered output. You are responsible for your use and for compliance with all applicable laws.
This model is provided for research purposes only, "AS IS", without warranty of any kind, express or implied. The author accepts no liability for any use of this model or any consequences arising from it. By downloading or using it, you accept sole responsibility for your use and for compliance with all applicable laws and regulations.
Licences: the Swift contribution is licensed under the Swift Open License v1.0 (© UkisAI); the underlying Qwen3.8-27B is Apache-2.0 (© Alibaba Cloud). Both licence files are included. Abliteration via Heretic; quantization via llm-compressor / compressed-tensors.