Instructions to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF") 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 AutoModel model = AutoModel.from_pretrained("keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF", device_map="auto") - llama-cpp-python
How to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF", filename="Qwen3.6-35B-A3B-REAM-192-heretic-APEX-Compact-Q3_K_L.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L # Run inference directly in the terminal: llama cli -hf keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L # Run inference directly in the terminal: llama cli -hf keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L # Run inference directly in the terminal: ./llama-cli -hf keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L # Run inference directly in the terminal: ./build/bin/llama-cli -hf keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
Use Docker
docker model run hf.co/keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
- LM Studio
- Jan
- vLLM
How to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
- SGLang
How to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF 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 "keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF" \ --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": "keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF" \ --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": "keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF with Ollama:
ollama run hf.co/keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
- Unsloth Studio
How to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF to start chatting
- Pi
How to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF with Docker Model Runner:
docker model run hf.co/keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
- Lemonade
How to use keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF:Q3_K_L
Run and chat with the model
lemonade run user.Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF-Q3_K_L
List all available models
lemonade list
Qwen3.6-35B-A3B-REAM-192-heretic — APEX-GGUF
⚠️ Preliminary release. Quantized from the bf16 GGUF master of keithnull/Qwen3.6-35B-A3B-REAM-192-heretic. The only validation performed so far is (a) Heretic's first-token KL + refusal-marker eval against its 100-prompt evaluation split during the optimization run, (b) a five-prompt qualitative chat spot-check on the bf16 weights, and (c) basic generation-coherence smoke tests on the resulting GGUFs. No perplexity, KL-divergence, or academic-benchmark numbers have been measured against this APEX recipe yet — the published APEX results are on the un-abliterated Qwen3.5-35B-A3B reference, not this model. Treat this release as a preview while those evaluations are pending. Card will be updated with hard numbers as they land.
APEX (Adaptive Precision for EXpert Models) MoE-aware mixed-precision quantizations of keithnull/Qwen3.6-35B-A3B-REAM-192-heretic. For standard llama.cpp K-quants of the same model, see keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-GGUF.
What is APEX?
https://github.com/mudler/apex-quant
Available quantizations
| File | Size | BPW | Notes |
|---|---|---|---|
Qwen3.6-35B-A3B-REAM-192-heretic-APEX-IQuality-Q5_K_M.gguf |
17 GB | 5.30 | Highest quality, smallest "premium" tier. Q6_K (edge) / Q5_K (near) / IQ4_XS (middle) routed experts + Q8_0 shared expert + Q6_K attention + diverse-imatrix calibration. APEX claims F16-equivalent perplexity on the reference model. |
Qwen3.6-35B-A3B-REAM-192-heretic-APEX-IBalanced-Q5_K_M.gguf |
19 GB | 5.91 | Highest quality with pure K-quant inference. Q6_K (edge) / Q5_K (middle) routed experts + Q8_0 shared expert + Q6_K attention + diverse-imatrix calibration. Slightly larger than I-Quality but no IQ-format decode overhead. |
Qwen3.6-35B-A3B-REAM-192-heretic-APEX-ICompact-Q3_K_L.gguf |
~13 GB | ~4.02 | Same size class as standard Q4_K_M, recommended daily driver. Q4_K (edge) + Q3_K (middle) routed experts + Q6_K shared + Q4_K attention + imatrix scales. APEX claims this beats Q4_K_M-class quants on perplexity AND HellaSwag at the same footprint. |
Qwen3.6-35B-A3B-REAM-192-heretic-APEX-Compact-Q3_K_L.gguf |
13 GB | 4.02 | Same tensor recipe as I-Compact but without imatrix calibration. Useful as a "no-imatrix" baseline reference. |
Qwen3.6-35B-A3B-REAM-192-heretic-APEX-Mini-IQ2_S.gguf |
12 GB | ~3.80 | Smallest viable. Q3_K (edge) / IQ2_S (middle) expert gradient + imatrix. Fits 16 GB VRAM consumer GPUs. |
The "I-" prefix in APEX nomenclature means "imatrix-calibrated" — it changes the scale values stored in K-quant blocks but does not change the tensor formats.
A note on filenames
APEX GGUFs are mixed-precision — every file contains multiple llama.cpp quant types simultaneously (e.g. Q6_K for edge layers, Q5_K for near-edge, IQ4_XS for middle-layer routed experts, Q8_0 for shared experts, etc). HuggingFace's hardware-compatibility widget and various model-listing surfaces auto-detect a file's quantization by scanning the filename for a recognized K-quant or IQ-quant token (Q4_K_M, Q3_K_S, IQ4_XS, etc). Because no single token is strictly correct for a mixed-precision file, the parser would otherwise show "Unknown" / "Cannot determine variant" and the model wouldn't surface on hardware-filtered model lists.
To work around this, each file in this repo has a parser-friendly K-quant suffix appended that matches its dominant middle-layer expert quantization (since middle layers comprise the bulk of routed-expert parameters and most strongly determine the file's effective BPW). For example: APEX I-Compact uses Q4_K-edge + Q3_K-middle experts, so its file is named ...-APEX-ICompact-Q3_K_L.gguf. The Q3_K_L tag isn't exactly the file's contents — the actual tensor types are mixed — but it's the closest single recognizable token for HF's parser, and the BPW lands close to Q3_K_L's 4.27.
Pay attention to the APEX tier name (Mini / Compact / I-Compact / I-Balanced / I-Quality) for the real description of what's inside each file. Treatt the "Q_#" suffix purely as a UX hint for HF's display layer.
Vision support
These GGUFs are text-only weights, but the underlying REAM-192 architecture preserves the Qwen3.6-VL vision tower. Pairing with the standard Qwen3.6-VL projector enables image input via llama-server's OpenAI-compatible chat-completions endpoint.
The compatible projector is mirrored here for convenience:
| File | Size | Notes |
|---|---|---|
mmproj-REAP-26B-F16.gguf |
899 MB | F16 vision encoder + projector. Bit-identical mirror of the file in keithnull/Qwen3.6-VL-REAP-26B-A3B-GGUF, which was itself converted from the vision shard in atbender/Qwen3.6-VL-REAP-26B-A3B. |
Why a REAP-derived projector works with REAM
Both REAM (this model) and REAP (atbender's source) preserve the unmodified Qwen3.6-VL vision encoder, hidden-state dimension, and tokenizer — neither method touches the vision tower or the input-embedding layer. The mmproj's image-token embeddings land in the same hidden-state space the LM was originally trained against. The APEX recipe further keeps shared experts and attention layers at high precision (Q6–Q8) across every tier, so vision-LM alignment survives even at the most aggressive (Mini-IQ2_S) routed-expert quantization.
This is a cross-recipe pairing without any vision-specific fine-tuning. A REAM-native projector would likely improve quality further, but is not yet released.
Validation (2026-05-12, n=1, qualitative)
Single-rater smoke test on a 590×904 JPEG product photo of a Canon PowerShot G5, running APEX Mini-IQ2_S + this projector on Apple M3 Metal:
- Correctly identified the camera (
Canon PowerShot G5) and attached flash (Canon Speedlite 420EX). - Read fine print:
5.0 MEGA PIXELS,CANON ZOOM LENS 7.2-28.8mm 1:2.0-3.0. - Noted the
CENEOwatermark across the middle of the image. - ~40 s end-to-end via an agent harness (pi-mono) on the 10 GB Mini quant.
No quantitative VLM benchmarks (MMMU, MM-Vet, OCR-Bench, etc.) have been run against this pairing yet. The above is a smoke test, not a result. The same probe was previously validated against the REAP-26B-A3B Q4_K_M native pairing on 2026-05-01 — REAM Mini matches REAP-native on this image.
Usage
llama-server \
-m Qwen3.6-35B-A3B-REAM-192-heretic-APEX-Mini-IQ2_S.gguf \
--mmproj mmproj-REAP-26B-F16.gguf \
-c 32768 -ngl 99 --jinja
Then POST OpenAI-compatible chat completions with an image_url content block (base64 data URI, data:image/jpeg;base64,…). Confirmed working on JPEG and PNG; WebP is rejected by llama-server's mtmd loader at the time of writing — convert to JPEG/PNG first.
For grounding-heavy tasks, the upstream Qwen-VL guidance applies: add --image-min-tokens 1024 if accuracy on text reading or bounding-box-style queries drops.
Refusal and capability metrics (inherited from source bf16)
| Metric | This model (bf16 source) | Pre-heretic (REAM-192) |
|---|---|---|
| Refusals on Heretic eval set | ✅ 10 / 100 | ❌ ~80 / 100 |
| First-token KL divergence | 0.0008 | 0 (by definition) |
These numbers are from the Heretic optimization run on the bf16 weights, prior to APEX quantization. APEX-specific refusal/KL deltas (whether Q3-tier or IQ-tier middle layers change the refusal-suppression effectiveness) have not been measured. We do not expect significant change but it is on the validation TODO list.
Quantization recipe
- Source:
Qwen3.6-35B-A3B-REAM-192-heretic-bf16.gguf(51 GB / 16.01 BPW), the bf16 master from the standard GGUF repo. - Tooling: APEX configs + goblincore/llama-cpp-turboquant build of
llama-quantizeandllama-imatrix. - Imatrix calibration corpus: bartowski's
calibration_datav3.txt. APEX's own pipeline references acalibration_v1.2.txtthat isn't bundled in the repo; we used the de-facto community standard instead. Quality difference is reportedly small per APEX's own ablations. - Imatrix generation: 32 chunks × 2048 ctx (corpus length capped the chunk count), all 40 transformer blocks GPU-resident on H100.
- Profile-to-config mapping: APEX
--profile compact / i-compact / i-balanced / i-quality / mini(theqwen36_heretic_*.txtconfigs are byte-identical toqwen36_35b_*.txt— no heretic-specific tuning beyond the layer-gradient strategy that's universal across the Qwen3.5/3.6 family).
Quick start
Inference (any APEX tier)
./llama-cli \
-m Qwen3.6-35B-A3B-REAM-192-heretic-APEX-ICompact-Q3_K_L.gguf \
-p "Write a Python function that returns the nth Fibonacci number." \
-n 1000 --temp 0.7 --n-gpu-layers 999
(Use -n 1000 minimum since Qwen3.6's default thinking mode emits long [Start thinking] ... [End thinking] blocks before the answer. Pass /no_think in the prompt to skip thinking for quick sanity checks.)
Server
./llama-server \
-m Qwen3.6-35B-A3B-REAM-192-heretic-APEX-IBalanced-Q5_K_M.gguf \
--host 0.0.0.0 --port 8080 \
--ctx-size 32768 \
--n-gpu-layers 999
Preliminary local code-gen smoke test (ICompact only)
A small-scale single-run shakedown of the ICompact-Q3_K_L tier against a real coding workload, run via llama-server from TheTom-llama-cpp-turboquant with KV cache q8_0/turbo3, ngram-simple speculative decode, free-form thinking with --reasoning-budget 1500, and ctx 32768. Date: 2026-05-09.
This is not a benchmark. Sample sizes are tiny (2 standalone tasks + 3 agentic tasks), n=1 per task, single rater. It exists to confirm the recipe survives an agentic workload without obvious breakage, ahead of the larger evals on the validation TODO list.
- 2× standalone TypeScript code-gen (mulberry32
SeededRng+LRUCache<K,V>) | 33/33 vitest tests pass on the produced sources | - 3× agentic tasks against a ~360-test repo
(vitest sanity / Box-MullernextGaussian+ stats test / multi-filereadonly namefield on post-processing Effect classes +tsc --noEmit) | 3/3 clean diffs; vitest pass;tsc --noEmitclean | - Pre-bench probes terminated cleanly (
finish_reason=stop, no V-quant attention loop). On thenextGaussiantask the agent produced library-grade Box-Muller — caching the second sample of each pair and patchingfork()to copy the cache — without being prompted for either detail. The test (10 000 samples; assert|mean| < 0.1and|stddev − 1| < 0.1) passed first try.
What this can support saying: the I-Compact recipe runs end-to-end through Read/Grep/Edit/Bash + self-verify loops and produces diffs that pass vitest and tsc on the cases tried.
What it cannot support saying: anything about quality vs other APEX tiers (not benched here), vs vanilla REAM Q4_K_M on agentic loops (no comparison run yet), or about academic-eval scores (still deferred).
Per-task diffs, raw stdout/stderr, and the produced source snapshots are uploaded under bench/2026-05-09-icompact-smoke/ in this repo.
Lineage
Qwen/Qwen3.6-35B-A3B (base, 35.11B params, 256 routed experts)
│
▼ REAM (Cerebras / Samsung SAIL Montreal expert merging)
│ 256→192 routed experts
│
keithnull/Qwen3.6-35B-A3B-REAM-192 (27.05B params, vision tower preserved)
│
▼ Heretic (directional ablation + Optuna kernel optimization)
│ Custom fork goblincore/heretic@qwen3_5-packed-experts-v2
│
keithnull/Qwen3.6-35B-A3B-REAM-192-heretic (bf16 safetensors)
│
▼ llama.cpp convert_hf_to_gguf.py
│
keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-GGUF (bf16 master + standard K-quants)
│
▼ APEX mixed-precision recipe + imatrix calibration
│
keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF (this repo)
Credits
- @mudler and the LocalAI team for APEX — the MoE-aware mixed-precision quantization recipe, configs, and pipeline that produced these GGUFs.
- @bartowski1182 for the diverse calibration corpus used for imatrix generation.
- @p-e-w for Heretic and the underlying abliteration framework.
- @Sehyo for the per-trial fused-expert ablation approach in PR #207.
- @grimjim for the Magnitude-Preserving Orthogonal Ablation formulation.
- Inspired by @llmfan46's prior Qwen3.6 heretic work.
License
Apache 2.0, inherited from the source model.
- Downloads last month
- 1,934
2-bit
3-bit
5-bit
Model tree for keithnull/Qwen3.6-35B-A3B-REAM-192-heretic-APEX-GGUF
Base model
Qwen/Qwen3.6-35B-A3B