Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4

GPTQ Int4 quantization of lordx64/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled — a Claude Opus 4.7 reasoning distill on top of Qwen3.6-35B-A3B (256-expert MoE, ~3B active).

Recipe follows palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4: same skip-list (attention / routers / shared experts / vision / lm_head kept BF16), same calibration mix, same 4-bit / group_size=128 / symmetric / desc_act=False settings. Fits in ~22 GB; runs on a single 24 GB consumer GPU with vLLM/SGLang, or on 32 GB cards (RTX 5090) with comfortable headroom for long context.

Quality

Metric Value
GPTQ success rate 97.29%
RTN fallback rate 2.71%
Loss mean 8.90e-05
Loss max 2.00e-03
Total quantized modules 30,720
Quantized size 22.0 GB (safetensors)

Per-module quantization log: quant_log.csv (every layer, every module, GPTQ loss / RTN marker, sample count, wall time). Fully auditable.

Model specs

Property Value
Source model lordx64/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled
Base model Qwen3.6-35B-A3B (MoE, 35B total / 3B active per token)
Architecture Qwen3_5MoeForConditionalGeneration (vision + text, multimodal-capable)
Experts 256 (top-8 routing per token, 1 shared)
Hidden layers 39
Native context 64K tokens (matches source distill)
Quantization GPTQ v2, 4-bit, group_size=128, symmetric, desc_act=False
KV cache support bf16 / fp16 / fp8_e4m3 (storage-only on Ada/Blackwell consumer cards)

What is quantized vs kept BF16

Quantized (int4) — all routed MoE expert FFN weights across layers 0–38:

  • mlp.experts.{0..255}.gate_proj
  • mlp.experts.{0..255}.up_proj
  • mlp.experts.{0..255}.down_proj

Kept BF16 (per Qwen3.6 GPTQ conventions):

  • All attention layers (*.self_attn.*)
  • MoE routers (*.mlp.gate)
  • Shared experts (*.shared_expert.*)
  • Multi-token prediction heads (*.mtp.*) — present if source ships them
  • Vision encoder (*.visual.*)
  • Embeddings (embed_tokens) and lm_head

Calibration recipe

Same domain-mixed calibration set as palmfuture — chosen to give all 256 experts non-trivial activation signal across reasoning, language, code, and math domains:

Source Samples Purpose
allenai/c4 102 General English text
allenai/tulu-3-sft-mixture 77 Instruction-following
codeparrot/codeparrot-clean 51 Code generation
HuggingFaceH4/MATH-500 26 Mathematical reasoning
Total 256 (seq_len=1024)

Hardware used for quantization

  • GPU: 1× NVIDIA RTX 5090 (Blackwell, 32 GB VRAM, ~1.79 TB/s)
  • RAM: 96 GB DDR5 + 256 GB swap on NVMe (used during cpu-pack finalize bursts)
  • Storage: 2 TB NVMe SSD (offload + output)
  • OS: Ubuntu (homelab box, native — not WSL)
  • Wall-clock: ~3 h 17 m end-to-end (incl. ~17 min single-thread CPU pack)

Single GPU is enough — gptqmodel quantizes layer-by-layer with disk offload, and peak VRAM during quantization stayed around 12–13 GB. Most of the wall clock is layer GPTQ work plus a ~17 min CPU-bound packing/finalize phase at the end.

Toolchain

Component Version
GPTQModel 6.0.3
PyTorch 2.11.0 + CUDA 13.0
Transformers 5.7.0
Datasets 4.8.5
Accelerate 1.13.0
Python 3.12 (standard, GIL on)
CUDA driver target sm_120 (Blackwell)

Why no Python 3.13t free-threading? Multi-core packing is gated on PYTHON_GIL=0 in gptqmodel. With Python 3.12 + GIL, the final pack phase runs single-threaded and adds ~15–25 min for a 35B model. Quality is identical — only wall-clock differs.

Usage

vLLM

vllm serve Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4 \
  --max-model-len 65536 \
  --gpu-memory-utilization 0.85 \
  --kv-cache-dtype fp8 \
  --dtype bfloat16 \
  --reasoning-parser qwen3 \
  --trust-remote-code

Important: Do not pass --quantization moe_wna16 to vLLM. Let vLLM auto-detect from config.json. Forcing the flag triggers a KeyError in the Qwen3.5-MoE loader.

SGLang

python -m sglang.launch_server \
  --model-path Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4 \
  --quantization moe_wna16 \
  --mem-fraction-static 0.85 \
  --kv-cache-dtype fp8_e4m3 \
  --context-length 65536 \
  --reasoning-parser qwen3 \
  --port 30000

Transformers (single-GPU, for testing)

Requires trust_remote_code=True for the Qwen3.5-MoE architecture.

Recommended sampling

Same guidance as the source distill — use long max_new_tokens (16k–32k) for hard reasoning. The distill model emits explicit <think>...</think> blocks in Claude's cadence; budget context accordingly.

Quality vs source

GPTQ-Int4 with group_size=128 typically retains >97% of BF16 perplexity on Qwen3.6-class models (see palmfuture's wikitext-2 retention measurement of ~97.9% on the raw base). This release uses identical hyperparameters, so quality should sit in the same band — but no formal eval has been run on this specific distill yet. If you do run lm-evaluation-harness on this checkpoint, please share the numbers in the discussions tab.

Reproducibility

Credits


Quantized by @Sociopacific. Issues / quality reports welcome in the discussions tab.

Downloads last month
773
Safetensors
Model size
35B params
Tensor type
BF16
·
I32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4