🟣 Patched-Metal / Specialized Runtime: Requires patched
PrismML-Eng/llama.cpp(PTQ1_0+FWHT_512Metal kernels, prebuilt macOS ARM64 binaries included inbin/).
☕ Support Local AI Development: Help me acquire a Mac mini 24GB/32GB to optimize and test local MoE models up to 80B parameters. Donate via Ko-fi →
[!CAUTION] Kenzan-Flint-40B-Abliterated-Hepta48Up — "40B Uncensored MoE, 9.77 GiB, 79 t/s, Zero Guardrails." We took an 11.17 GiB abliterated 40B MoE, rotated expert tensors through
FWHT_512Hadamard surgery, pinned theHepta48Uptail grid inQ4_0, and squeezed the whole thing into 9.77 GiB so a base 16 GB Mac mini can sprint at nearly 80 tokens/sec without a single refusal.
Kenzan-Flint-40B-Abliterated-Hepta48Up (9.77 GiB GGUF)
This repository provides Kenzan-Flint-40B-Abliterated-Hepta48Up, a hybrid ternary-4bit Mixture-of-Experts (MoE) uncensored language model (40B total parameters, 256 routed experts + 2 shared experts, 49 layers) distilled and compressed from orcarouter/Flint-abliterated-GGUF specifically for Apple Silicon 16 GB Unified Memory (Mac mini M6).
Available Releases:
v2 (Recommended):Kenzan-Flint-40B-Abliterated-v2-Hepta48Up-Q4_0-M6-16G.gguf(PPL = 25.99,-3.38 PPLimprovement, Selective Down-Expert Abliteration Graft on mid-layersblk.14..28). Combines the high-accuracy reasoning backbone of cleanHepta48Upwith full uncensored zero-refusal capabilities.v1 (Initial Release):Kenzan-Flint-40B-Abliterated-Hepta48Up-Q4_0-M6-16G.gguf(PPL = 29.38, full-spectrum PTQ1_0 re-quantization from donor).
Architecture & Pin-Grid Surgery
- Ternary Crown (
PTQ1_0, 1.75 bpw): Non-anchor routed expert tensors (blk.2..blk.48) rotated via block-512 Fast Walsh-Hadamard Transform (FWHT_512), quantized withflint_imatrix.datforce-density (0.691active trits), and stabilized with permanent Salient Clipping (κ = 0.15, η = -0.025). - Pin Grid (
Hepta48Up):down_expsanchored at layers{8, 12, 20, 40, 44, 46, 48}+ output-adjacentblk.48.ffn_up_expsinQ4_0+FWHT_512. - Selective Abliteration Graft (v2): In v2, only the critical refusal-mediating expert down-projections (
blk.14..blk.28) receive the abliterated transform while retaining the pristine QAT/STE learned scale resonance ofHepta48Upacross the rest of the network. This eliminates degradation of router alignment. Always-On Backbone: High-precision imatrix-calibratedQ8_0token_embd,Q6_Koutput.weight,Q5_K/IQ4_XS/IQ3_XXSattention and shared experts.
Verified Benchmarks (Mac mini M6, 16 GB Unified Memory)
Measured directly on Apple Silicon Metal GPU (-ngl 99 --no-host -fa on -c 262144 --cache-type-k q4_0 --cache-type-v q4_0) with ngram-map-k (3x4) speculative decoding:
| Metric | Flint-abliterated-Mix-12G (Donor) |
Kenzan-Flint-Abliterated v1 |
Kenzan-Flint-Abliterated v2 (Optimal) |
|---|---|---|---|
| GGUF File Size | 11.168 GiB |
9.768 GiB |
9.768 GiB (-1.40 GiB) |
Process RSS (-c 262144) |
N/A | 11.82 GiB |
11.82 GiB (12,392,128 KB) |
WikiText-2 Holdout (c512) PPL |
28.1418 ± 0.9639 |
29.3767 ± 0.8194 |
25.9901 ± 0.7340 (-3.38 PPL) |
Generation Throughput (tg) |
— | 69.7 – 79.4 t/s |
70.5 – 79.4 t/s |
Prompt Ingestion (pp) |
— | 190.1 – 275.2 t/s |
218.9 – 277.2 t/s |
| Refusal Behavior | Refusal-free | Refusal-free (zero refusal) |
Refusal-free (zero refusal) |
Quick Start & Recommended Deployment (Apple Silicon 16 GB)
Important Runtime Requirement: Stock upstream
llama.cppcannot loadKenzanGGUF files because they use packed ternaryPTQ1_0weights andprism.hadamard.*phase-rotation metadata. You must use the patchedPrismML-Eng/llama.cppruntime (mac-flint v0.7.0-dev build 12128or newer).
1. Required Binaries & Patched Metal Libraries
Download the v2 model (after signing the gated waiver above), the precompiled macOS ARM64 runtime bundle, and tools/kenzan_router.py:
hf download kabcnd/Kenzan-Flint-40B-Abliterated-Hepta48Up-GGUF \
Kenzan-Flint-40B-Abliterated-v2-Hepta48Up-Q4_0-M6-16G.gguf \
bin/llama-flint-metal-macos-arm64.tar.gz \
tools/kenzan_router.py --local-dir .
tar -zxvf bin/llama-flint-metal-macos-arm64.tar.gz
export DYLD_LIBRARY_PATH="$(pwd)/llama-flint:$DYLD_LIBRARY_PATH"
2. Mandatory Metal Environment Variables
export GGML_METAL_PTQ1_MULTICOL=1
export GGML_METAL_FUSE_GATHER_MV=1
export GGML_METAL_TENSOR_ENABLE=1
export GGML_METAL_SHARED_BUFFERS_ENABLE=1
export GGML_METAL_Q1_0_POPCNT=1
3. Production llama-server Launch Command (16 GB Safe, 262k Context)
./llama-flint/llama-server \
-m Kenzan-Flint-40B-Abliterated-v2-Hepta48Up-Q4_0-M6-16G.gguf \
--host 127.0.0.1 --port 11435 \
-ngl 99 --no-host -fa on \
-c 262144 --cache-type-k q4_0 --cache-type-v q4_0 -np 1 -kvu \
-t 4 --threads-draft 2 -b 512 -ub 512 --ctx-checkpoints 8 --cache-ram 2048 \
--jinja --metrics \
--spec-type ngram-map-k --spec-ngram-map-k-size-n 3 --spec-ngram-map-k-size-m 4 \
--spec-draft-n-max 3 --spec-draft-n-min 1 \
--samplers "top_k;dry;penalties;top_p;min_p;temperature" \
--temp 0.20 --top-p 0.95 --top-k 40 --min-p 0.08 \
--repeat-penalty 1.05 --repeat-last-n 256 \
--dry-multiplier 0.8 --dry-base 1.75 --dry-allowed-length 3 --dry-penalty-last-n 512 --dry-sequence-breaker $'\f' \
--reasoning on --reasoning-format deepseek --reasoning-budget -1 --reasoning-preserve \
--alias "kenzan-flint:40b-abliterated"
You can also run the unified multi-model proxy tools/kenzan_router.py on port 11434 (kenzan-flint:40b-abliterated, kenzan-flint:40b, kenzan-qwen3.8:27b, bonsai-2:latest).
Liability Waiver & Responsible Use Disclaimer
This model is an abliterated (uncensored) research artifact with safety refusal directions removed. By downloading, loading, or executing this model or any other model published by kabcnd / Kenzan Project, you agree that:
- You assume full and exclusive responsibility for all outputs, deployments, and consequences.
- The authors and maintainers (kabcnd / Kenzan Project) are completely released from any and all liability for misuse, damages, or harm arising from this or any other model in the Kenzan / Huihui / Flint series.
- You will use this model solely for lawful, ethical, and authorized research purposes.
Acknowledgements & Inspiration
- Prism ML (https://huggingface.co/prism-ml) — Inspired by and built upon the Bonsai-2 architecture,
PTQ1_0ternary quantization,FWHT_512Hadamard transforms, and Metal kernel foundations. - OrcaRouter (https://huggingface.co/orcarouter/Flint-abliterated-GGUF) — For the upstream
Flint-abliterated-Mix-12Gdonor model. - Misha — Special thanks to Misha for ongoing support, encouragement, and financial assistance that helped keep this local AI hardware research moving forward.
Support the Project & Funding Goals
I am an independent researcher optimizing frontier 27B–80B models to run locally on affordable consumer hardware without expensive NVIDIA server clusters.
Current Hardware Fundraising Goal: Mac mini 24 GB / 32 GB Unified Memory
- Why it matters: Testing and calibrating 40B–80B MoE models on a base 16 GB Mac mini hits a hard physical ceiling (~12.5 GB wired Metal limit). A Mac mini 24 GB / 32 GB will unlock higher-precision anchor grids, larger KV caches, and full 70B–80B ternary/4-bit hybrid models for the open-source community.
- What your support funds: Direct hardware upgrades, open-source GGUF releases, Metal kernel benchmarks, and reproducible quantization tooling.
☕ Support Local AI Research on Ko-fi →
Even a small contribution or sharing this repository helps enormously. Thank you! ❤️