← back to catalog · registered 2026-08-22 13:56

lyf/Qwen3.6-27B-uncensored-heretic-v2-NVFP4-MTP

lyf Qwen 12B multimodal second-order
Your rig guess connected
? Why do I need an app?
Reading your rig…

This is a rough estimate. Install the free app - we'll show exact numbers.

Reading real hardware from your app right now. Numbers below are exact.

Below is the per-quantization compatibility for this model.

curl -H "Authorization: Bearer $ABL_KEY" \
     "https://abliteration.org/api/v1/models/lyf%2FQwen3.6-27B-uncensored-heretic-v2-NVFP4-MTP"
Response includes
  • classification m3
  • files 14
  • benchmarks 11 entries
  • hub_downloads_all_time 3,306
  • author_summary 10 models
  • readme_text full
10 credits · hourly refresh · ~4 KB payload Get an API key →
Abliteration classifier · v1.0.0
M3
Primary method

Layer-wise ablation

Applied on top of direct removal inherited from the base model.
Confidence
HIGH
Inherited from base model
Why this label 2 signals
Producer identity confirmed by naming conventions, tags or the model card. This label is very unlikely to change.
  • 'heretic' in model name (Heretic-produced)
  • Heretic uses layer-wise optimization (M3) with underlying direction removal (M1)
Refusal direction extracted via
Extraction technique

Difference-of-means

Confidence
HIGH
Why we say so
name contains 'heretic'; Heretic default extraction is difference-of-means (Arditi 2024)
Downloads · lifetime
3K
63 last 30d - cooling
Likes
2
Model age
5mo ago
created 2026-05-01
Downloads over time
Now3.3K→from25↑13,240%
01.2K2.4K3.7K25 on Apr 293.3K on Oct 11AprMayJunJulAugSepOct
Apr 29 → Oct 11 · 63 snapshots · spans 165 days

Benchmarks

Benchmark Score Source
Entertainment 1.5 UGI
Hazardous 2.9 UGI
Natural Intelligence 29.17 UGI
Political lean -24.5% UGI
Sensitive-Info 17.24 UGI
SocPol 1 UGI
UGI 43.16 UGI
Willingness (10) 9.5 UGI
W10-Adherence 10 UGI
W10-Direct 9 UGI
Writing 39.42 UGI

Genealogy 0 direct forks

Full fork graph →

This model's place in the market. Above: what it was derived from. Below: the tree of everything derived from it.

Metadata

License
apache-2.0
Tags
transformers safetensors qwen3_5 image-text-to-text qwen3.6 nvfp4 quantized uncensored heretic multimodal vision gated-deltanet

Related

Total size
19.1 GB
Files
14
Quantizations
1
Registered
2026-08-22 13:56
Last updated on HF
2026-05-01 13:29

Files by quantization

Auxiliary files 14 files 19.2 GB
model-00001-of-00002.safetensors 9.27 GB 7ae44bb1 download
model-00002-of-00002.safetensors 9.08 GB ab9c3a33 download
model-mtp-extra.safetensors 810 MB 713b0faf download
tokenizer.json 19.1 MB 6f32ce20 download
model.safetensors.index.json 263 KB 83bf6fc0 download
config.json 17.2 KB 5ccc79ea download
chat_template.jinja 11.5 KB 0d290058 download
hf_quant_config.json 10.4 KB 8f774de4 download
README.md 8.97 KB 6b0ead43 download
.gitattributes 1.53 KB 52373fe2 download
tokenizer_config.json 1.20 KB a4410463 download
preprocessor_config.json 390 B 2ea84a43 download
video_preprocessor_config.json 385 B 3ba673a5 download
generation_config.json 218 B edcb0e7f download

README current version from Hugging Face


license: apache-2.0
base_model: llmfan46/Qwen3.6-27B-uncensored-heretic-v2
tags:

  • qwen3.6
  • nvfp4
  • quantized
  • uncensored
  • heretic
  • multimodal
  • vision
  • gated-deltanet
  • tool-calling
  • mtp
  • speculative-decoding
    library_name: transformers
    pipeline_tag: image-text-to-text

Qwen3.6-27B-uncensored-heretic-v2-NVFP4-MTP

NVIDIA FP4 (NVFP4) quantized version of llmfan46/Qwen3.6-27B-uncensored-heretic-v2, with full multimodal (vision) and built-in MTP speculative decoding preserved.

Model Details

  • Base model: llmfan46/Qwen3.6-27B-uncensored-heretic-v2 (Heretic v1.2.0 MPOA abliteration of Qwen/Qwen3.6-27B)
  • Architecture: Qwen3_5ForConditionalGeneration (hybrid Gated-DeltaNet + Gated full attention, MLA-style q_proj)
  • Quantization: NVFP4 via nvidia-modelopt (NVFP4_DEFAULT_CFG)
  • Calibration: 20 samples × 8192 seq from cnn_dailymail (sakamakismile recipe)
  • Model size: ~20.6 GB (vs ~54 GB bf16 original)
  • MTP head: bf16, restored from Qwen/Qwen3.6-27B (the abliterated base ships without MTP)
  • Vision encoder: bf16 (unquantized, ~0.9 GB)

What's quantized, what's not

Component Format Notes
MLP (gate/up/down_proj) NVFP4 All 64 layers
Full attention (qkv/o_proj) NVFP4 16 layers (every 4th)
Linear attention (in_proj_a/b/dt_proj/g_proj/o_proj) NVFP4 48 DeltaNet layers
Linear attention conv1d bf16 Mamba SSM kernel, excluded
MTP head (mtp.*) bf16 15 tensors / ~0.85 GB, sourced from Qwen/Qwen3.6-27B
lm_head + embed_tokens bf16 Shared with MTP drafter
Vision encoder bf16 All model.visual.* weights, excluded
Norms, biases, A_log, dt_bias bf16 Small tensors, excluded

Quantization Recipe

import modelopt.torch.quantization as mtq
from modelopt.torch.export import export_hf_checkpoint
from modelopt.torch.export.model_utils import get_language_model_from_vl
from transformers import Qwen3_5ForConditionalGeneration, AutoTokenizer

model = Qwen3_5ForConditionalGeneration.from_pretrained(
    "llmfan46/Qwen3.6-27B-uncensored-heretic-v2",
    dtype="auto", device_map="auto",
    max_memory={0: "4GiB", "cpu": "120GiB"},
    offload_folder="/tmp/offload",
    trust_remote_code=True,
)
language_model = get_language_model_from_vl(model)[-1]

quant_cfg = {**mtq.NVFP4_DEFAULT_CFG}
quant_cfg["quant_cfg"] += [
    {"quantizer_name": "*lm_head*", "enable": False},
    {"quantizer_name": "*linear_attn.conv1d*", "enable": False},
    {"quantizer_name": "*mtp.*", "enable": False},
    {"quantizer_name": "*visual.*", "enable": False},
]
mtq.quantize(language_model, quant_cfg, forward_loop=...)
export_hf_checkpoint(model, export_dir="./out")

After export, mtp.* is stitched in from the official Qwen/Qwen3.6-27B shards (15 tensors) since llmfan46/heretic-v2 ships without trained MTP weights.

Recipe follows sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP (verified 207 tok/s on RTX PRO 6000 Blackwell), with visual.* added to the ignore list to keep multimodal capability.

Usage with vLLM

Minimal launch (chat + reasoning + tool calling, no spec decode)

docker run -d --name heretic-v2-nvfp4 \
  --ipc host --network host --device nvidia.com/gpu=all \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  -e VLLM_NVFP4_GEMM_BACKEND=flashinfer-cutlass \
  -e VLLM_USE_FLASHINFER_MOE_FP4=0 \
  -e PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
  vllm/vllm-openai:latest-cu130 \
  --model lyf/Qwen3.6-27B-uncensored-heretic-v2-NVFP4-MTP \
  --host 0.0.0.0 --port 8000 \
  --max-model-len 200000 \
  --gpu-memory-utilization 0.95 \
  --max-num-seqs 1 \
  --kv-cache-dtype fp8 \
  --trust-remote-code --language-model-only \
  --reasoning-parser qwen3 \
  --enable-auto-tool-choice --tool-call-parser qwen3_coder

flashinfer-cutlass (not the default marlin) is required because the Gated-DeltaNet dt_proj has output dim 96, which Marlin's tile_n_size=64 rejects.

With MTP speculative decoding (requires vLLM patch)

vLLM ≤ 0.20.0 has a known issue: in qwen3_5_mtp.py, only mtp.fc is forced unquantized for NVFP4 checkpoints, the MTP transformer layers themselves still inherit --quantization modelopt and try to load NVFP4-shape params from bf16 weights → shape assertion failure.

Apply the small one-liner workaround at container start:

docker run -d --name heretic-v2-nvfp4-mtp \
  --ipc host --network host --device nvidia.com/gpu=all \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  -e VLLM_NVFP4_GEMM_BACKEND=flashinfer-cutlass \
  --entrypoint bash \
  vllm/vllm-openai:latest-cu130 -lc "
python3 -c \"
import re
F='/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/qwen3_5_mtp.py'
s=open(F).read()
s=s.replace(
  'self.layers = torch.nn.ModuleList(\n            Qwen3_5DecoderLayer(\n                vllm_config,',
  '_orig_qc = vllm_config.quant_config\n        vllm_config.quant_config = fc_quant\n        self.layers = torch.nn.ModuleList(\n            Qwen3_5DecoderLayer(\n                vllm_config,', 1)
s=s.replace(
  'self.make_empty_intermediate_tensors = make_empty_intermediate_tensors_factory(',
  'vllm_config.quant_config = _orig_qc\n        self.make_empty_intermediate_tensors = make_empty_intermediate_tensors_factory(', 1)
open(F,'w').write(s)
print('patched')\"
exec vllm serve lyf/Qwen3.6-27B-uncensored-heretic-v2-NVFP4-MTP \
  --host 0.0.0.0 --port 8000 \
  --max-model-len 200000 --gpu-memory-utilization 0.95 \
  --max-num-seqs 1 --kv-cache-dtype fp8 \
  --trust-remote-code --language-model-only \
  --reasoning-parser qwen3 \
  --enable-auto-tool-choice --tool-call-parser qwen3_coder \
  --speculative-config '{\"method\":\"qwen3_5_mtp\",\"num_speculative_tokens\":3}'
"

The patch makes MTP Qwen3_5DecoderLayer inherit fc_quant=None (same trick already applied to mtp.fc upstream). An upstream fix is desirable — see vLLM qwen3_5_mtp.py:75-99.

Disabling thinking mode

{
  "chat_template_kwargs": {"enable_thinking": false}
}

Memory budget (RTX 5090, 32GB VRAM)

Component Size
NVFP4 weights ~16 GB
lm_head + embed_tokens (bf16) ~5 GB
linear_attn.conv1d + norms etc (bf16) ~0.5 GB
MTP head (bf16) ~0.85 GB
Vision encoder (bf16, skipped via --language-model-only) ~0.9 GB
KV cache (fp8, 200k ctx) ~6.4 GB
Overhead ~3 GB
Total (text-only, 200k ctx) ~30 GB

Performance (RTX 5090, vLLM 0.20.0, MTP k=3)

Single-stream, synchronous, with --max-num-seqs 1 --max-model-len 200000:

Workload Prompt Output tok/s (median)
code 512 1536 113.0
prose 256 2048 119.5
long-32k 32000 1024 72.0
xlong-100k 100000 512 35.8
extreme-180k 180000 256 ~3.9 (prefill-dominated)

MTP spec decode acceptance: 64–78% across workloads (k=3, mean accepted tokens/step ≈ 1.93–2.34). Without MTP, single-stream baseline is ~58 tok/s — MTP gives ~1.76× speedup on short workloads.

Capabilities

Multimodal (vision)

Drop --language-model-only and remove the LM-only flag to load the vision tower; image input via the standard OpenAI image_url content block.

Tool calling

Verified with --enable-auto-tool-choice --tool-call-parser qwen3_coder.

How It Was Made

  1. Quantize with modelopt API directly — hf_ptq.py from Model-Optimizer/examples/llm_ptq doesn't work for transformers ≥ 5.0 VL configs (AutoModelForCausalLM.from_config fails on missing top-level vocab_size, which lives under text_config).
  2. Stitch MTP from Qwen/Qwen3.6-27B's shards 13/15 + 15/15 into model-mtp-extra.safetensors (llmfan46/heretic-v2 ships without trained MTP weights despite text_config.mtp_num_hidden_layers: 1).
  3. Patch exclude_modules in both hf_quant_config.json and config.json to add the fused names vLLM creates (mtp.layers.0.self_attn.qkv_proj, mtp.layers.0.mlp.gate_up_proj, etc.); modelopt only emits unfused names by default.
  4. Patch vLLM's qwen3_5_mtp.py so the MTP transformer layers inherit fc_quant (the None quant config already applied to mtp.fc); without this MTP cannot load on NVFP4 checkpoints.

Acknowledgments

README history 1 version

The author's README evolved over time. Click a version to see its content at that point.

  1. 2026-05-01Upload folder using huggingface_hub1418e239 KB
    Loading...
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration