Qwen3.8 40B Ultimate Heretic: Q8 attention, Q4_K the rest (GGUF)

One GGUF of DavidAU/Qwen3.8-40B-Ultimate-Heretic-Uncensored (build 1, the one with instruct modes). The base is Qwen3.8-27B expanded to 96 layers, plus one MTP layer.

  • Kept at Q8_0: attention (attn_*), the linear-attention/SSM blocks (ssm_*), the MTP layer (blk.96), embeddings and output.
  • Dense FFNs, at Q4_K_M's usual mix: ffn_gate and ffn_up are Q4_K; ffn_down is Q6_K in 48 layers and Q4_K in the other 48.

The file is 30.3 GB and fits across two 20 GB cards with 64K context.

Files

file size
Qwen3.8-40B-Ultimate-Heretic-Q8attn-Q4K.gguf 30.3 GB
mmproj-Qwen3.8-40B-F16.gguf vision projector, F16

How it was made

Converted from DavidAU's BF16 safetensors to a BF16 GGUF, then quantized with llama.cpp 54cde7106 as Q4_K_M with Q8_0 overrides. You need that build or newer: older converters can't handle this architecture (qwen35). The types listed above are read from the shipped file. This command should reproduce them, but it hasn't been rerun, because the BF16 source has since been deleted:

llama-quantize --tensor-type "attn_.*=q8_0" --tensor-type "ssm_.*=q8_0" --tensor-type "blk\.96\..*=q8_0" \
  --token-embedding-type q8_0 --output-tensor-type q8_0 q40-bf16.gguf Qwen3.8-40B-Ultimate-Heretic-Q8attn-Q4K.gguf Q4_K_M

No imatrix.

Quality

Perplexity on wikitext-2 (test set, 40 chunks of 512 tokens): 6.214 ± 0.146. The BF16 source was deleted before we measured, so there's no BF16 number to compare against.

Speed (measured)

Two RTX 3080 20 GB, no P2P, llama.cpp 54cde7106:

setup generation tok/s
-sm layer 22.1
-sm tensor 30.5
-sm tensor + MTP (--spec-type draft-mtp), code about 60
same, prose about 47

Prompt processing at 2048 tokens: 950-1000 tok/s. The draft is accepted about 85% of the time.

Running it

llama-server -m Qwen3.8-40B-Ultimate-Heretic-Q8attn-Q4K.gguf -ngl 99 -sm tensor -c 65536 -fa on \
  --spec-type draft-mtp --jinja --mmproj mmproj-Qwen3.8-40B-F16.gguf --no-mmproj-offload
  • Context: 64K used 17.8 and 16.9 GB on the two cards; 128K ran out of memory on the first request.
  • --no-mmproj-offload: with -sm tensor, loading the projector onto the GPU aborts, so vision runs on the CPU.
  • Single 24 GB card: the file doesn't fit. Use -ngl to put part of the 96 layers on the GPU (untested by us).
  • Thinking off: enable_thinking=false isn't enough, because the model reopens <think> on its own. Ban the token with logit_bias (token 248068 is <think>; also ban </think>). A per-request thinking_budget_tokens (for example 200) works well as a middle setting.

Credits and license

  • Base: Qwen3.8-27B (Qwen team), Apache-2.0.
  • 40B expansion and Heretic abliteration: DavidAU.
  • llama.cpp.
  • This quant: AnubysIII (Sovereign Games LLC). Apache-2.0.

This model has had its refusals removed. You are responsible for how you use it.

Downloads last month
182
GGUF
Model size
39B params
Architecture
qwen35
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AnubysIII/Qwen3.8-40B-Ultimate-Heretic-Q8attn-Q4K-GGUF

Base model

Qwen/Qwen3.8-27B
Quantized
(11)
this model