Instructions to use Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4") model = AutoModelForMultimodalLM.from_pretrained("Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4
- SGLang
How to use Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4 with Docker Model Runner:
docker model run hf.co/Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4
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_projmlp.experts.{0..255}.up_projmlp.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) andlm_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=0in 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_wna16to vLLM. Let vLLM auto-detect fromconfig.json. Forcing the flag triggers aKeyErrorin 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
- Per-module loss / time / sample / RTN-fallback log:
quant_log.csv - Quantization config:
quantize_config.json - Source model commit: lordx64's repo
Credits
- @lordx64 — source Claude 4.7 distill
- Qwen Team — Qwen3.6-35B-A3B base model
- Anthropic — Claude Opus 4.7 (teacher used to produce the distill)
- @palmfuture — recipe and skip-list reference, palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4
- ModelCloud / GPTQModel — quantization framework
Quantized by @Sociopacific. Issues / quality reports welcome in the discussions tab.
- Downloads last month
- 773
Model tree for Sociopacific/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-GPTQ-Int4
Base model
Qwen/Qwen3.6-35B-A3B