license: apache-2.0
base_model:
- huihui-ai/Huihui-Qwen3.8-27B-abliterated
base_model_relation: quantized
library_name: transformers
pipeline_tag: image-text-to-text
tags: - qwen3_5
- nvfp4
- fp8
- modelopt
- abliterated
- uncensored
Huihui-Qwen3.8-27B-abliterated-NVFP4-W4A16-AWQ
A ModelOpt NVFP4 / FP8 post-training quantization of
huihui-ai/Huihui-Qwen3.8-27B-abliterated
(revision 739e3c5b, the "layers 18–51" ablation), itself an abliterated
Qwen/Qwen3.8-27B. All credit for the model goes to the Qwen team
and to huihui-ai.
[!WARNING]
Uncensored model. Abliteration removed the base model's refusal behaviour. There are no safety
guardrails; you are responsible for how you use it and for any safeguards your application needs.
[!NOTE]
Verified: loads and serves in SGLang 0.5.23 (quant=modelopt_mixed), tool calling and reasoning parsers work.
See the evaluation below. This revision replaces an earlier upload of this repo that was broken by a
ModelOpt export bug (see "How it was made") — if you downloaded it before 2026-11-25, download again.
Format
The layer layout is NVIDIA's own ModelOpt 0.47.0 recipe for the qwen3_5 architecture
(huggingface/qwen3_5/ptq/w4a16_nvfp4-fp8_attn-kv_fp8_cast), used unchanged:
| Part | Precision | Layers |
|---|---|---|
MLP gate_proj / up_proj / down_proj |
NVFP4 weights, BF16 activations (W4A16) | 64 × 3 |
lm_head |
NVFP4 weights (W4A16) | 1 |
Full attention q/k/v/o_proj |
FP8 W8A8 | 16 × 4 |
Gated DeltaNet in_proj_qkv / in_proj_z / out_proj |
FP8 W8A8 | 48 × 3 |
| KV cache | FP8 (constant amax) | |
Embeddings, DeltaNet in_proj_a/b + conv1d, vision tower, MTP head |
BF16 (not quantized) |
hf_quant_config.json: quant_algo: MIXED_PRECISION, kv_cache_quant_algo: FP8, 401 quantized layers.
Weights: 21.9 GB in 3 safetensors shards (BF16 original: 55.6 GB).
How it was made
Tooling: NVIDIA ModelOpt 0.47.0 (
examples/hf_ptq/hf_ptq.py), transformers 5.12.1, torch 2.14.0,
one RTX PRO 6000 Blackwell (96 GB). Note: torch 2.15 / Triton 3.9 removedtl.make_block_ptr, which
ModelOpt 0.47/0.48's NVFP4 fake-quant kernel still uses — pin torch 2.14.Calibration algorithm:
awq_lite(AWQ, Activation-aware Weight Quantization): per layer, search one exponent α so that
per-channel scalesact_amax^αminimise the layer's output error after quantization; weights of channels with large
activations are scaled up before rounding and the activations scaled down (math unchanged). Same layer layout,
calibration set and tooling as themaxsibling
Icharle/Huihui-Qwen3.8-27B-abliterated-NVFP4-W4A16;
only the calibration algorithm differs.ModelOpt 0.47.0 needed four local patches for a correct, loadable AWQ export of Qwen3.8 (script:
quantization/04c_patch_modelopt.py):_layernorm_uses_weight_plus_onedid not recogniseQwen3_5RMSNorm(it computesnorm(x) * (1 + w)),
so gate/up's AWQ scales were folded asw*sinstead of(1+w)*s - 1— 54 of 64 layers got sign-flipped
channels. Fixed by an exact class-name match (Qwen3_5RMSNormGatedis not a1 + wnorm).awq_litealso smoothed the FP8 layers, whosepre_quant_scalethe exporter never fuses and SGLang/vLLM
cannot apply. AWQ is now limited to the NVFP4 (MLP,lm_head) layers; FP8 layers use max calibration.Qwen3_5MLPwas missing fromPQS_FUSE_MODULE_MAPPING, sodown_proj's scale could not be folded intoup_proj.- The exporter only folds
pre_quant_scaleinto preceding linears when the model format isnvfp4_awq,
but a mixed-precision model reports its first layer's format (FP8).
After export,lm_head's remaining scale was folded exactly into the final norm and the layers relabelledW4A16_NVFP4(quantization/06c_finalize_awq.py), so the checkpoint has
the same format as the max sibling — no runtimepre_quant_scale.
Calibration data: 226 windows × 1024 tokens (~231k tokens), built for agent / coding / Chinese use
instead of the default news text:- 96 windows from
nvidia/Nemotron-SFT-Agentic-v2(search-agent transcripts), - 80 from
nvidia/Nemotron-SFT-SWE-v2(agentless SWE; windows that are > 30% repository file-path lines
were skipped), - 50 from
nvidia/Nemotron-SFT-Multilingual-v1code_zh/math_zh/stem_zh(only windows that are
≥ 30% Chinese characters — those documents reason mostly in English).
The documents were rendered with the model's chat template and cut into 1024-token windows at random
positions (seed 0), becausehf_ptq.pyotherwise keeps only the first--calib_seqtokens of each
sample, which for these long transcripts is mostly system prompt and tool definitions.- 96 windows from
The recipe and the calibration-set builder are in
quantization/.
python hf_ptq.py --pyt_ckpt_path huihui-ai/Huihui-Qwen3.8-27B-abliterated \
--recipe official_w4a16_awq.yaml --dataset calib.jsonl --calib_size 226 --calib_seq 1024 \
--export_path Huihui-Qwen3.8-27B-abliterated-NVFP4-W4A16-AWQ --trust_remote_code
Evaluation (2026-11-25, one RTX PRO 6000 Blackwell, SGLang 0.5.23)
Compared with the BF16 original and with another public NVFP4 quant of the same model
(iQlusion/…-NVFP4-BF16-LMHead:
W4A4 MLP + FP8 attention + BF16 lm_head, max calibration on cnn_dailymail).
| BF16 | NVFP4-W4A16 (max) | NVFP4-W4A16-AWQ | iQlusion W4A4 | |
|---|---|---|---|---|
| Weights | 55.6 GB | 21.9 GB | 21.9 GB | 23.75 GB |
| KL vs BF16 (all text, ≈, top-20) | 0 | 0.0391 | 0.0354 | 0.0540 |
| Perplexity change | — | +2.98% | +2.69% | +4.84% |
| Top-1 agreement with BF16 | — | 91.4% | 92.0% | 90.6% |
| KL on code only | 0 | 0.0524 | 0.0534 | 0.0968 |
| GSM8K (250, thinking, greedy) | 98.4% | 97.2% | 98.4% | 98.4% |
| MMLU-Pro (280, thinking, greedy; ±2.4) | 80.4% | 81.8% | 80.0% | 79.6% |
| Decode, 1 request | 27 tok/s | 69 tok/s | 69 tok/s | 62 tok/s |
| Throughput, 32 concurrent | — | 1147 tok/s | 1156 tok/s | 1199 tok/s |
| Time to first token, 1 request | 155 ms | 147 ms | 147 ms | 76 ms |
- KL / perplexity / top-1: teacher-forced next-token distributions on ~45k positions of text not used for
calibration (wikitext-2 test, HumanEval code, Chinese Wikipedia); KL is approximated over BF16's top-20 tokens. - Tasks: same 530 questions for every model,
reasoning_effort: medium, temperature 0, max 8192 tokens.
With 250/280 questions, differences of 1–2 points are within noise. - Speed:
sglang.bench_serving, random 1024 in / 1024 out,--kv-cache-dtype fp8_e4m3. - Takeaways: W4A16 (BF16 activations) stays closer to BF16 than W4A4, most visibly on code; NVFP4
lm_head
gives faster single-stream decode; W4A4 has faster prefill (TTFT) and slightly higher high-concurrency
throughput. AWQ calibration lowers KL by ~10% vs max (mostly English/Chinese; code about equal).
Serving
Intended for SGLang / vLLM / TensorRT-LLM with ModelOpt checkpoint support on NVIDIA Blackwell GPUs
(native FP4). Tested with SGLang 0.5.23:
sglang serve --trust-remote-code \
--model-path Icharle/Huihui-Qwen3.8-27B-abliterated-NVFP4-W4A16-AWQ \
--kv-cache-dtype fp8_e4m3 --reasoning-parser qwen3 --tool-call-parser qwen3_coder
License
Apache-2.0, inherited from Qwen3.8-27B and huihui-ai's release (see LICENSE). The calibration datasets were
only used to measure activation ranges and are not redistributed here.