CoolFace
Modelpublic

IsValorum/KAT-Coder-V2.5-Dev-APEX-I-MiniPlus-V2.1-GGUF

sourceHugging Faceapache-2.0updated 2h agoView on Hugging Face
2likes2.1kdownloads
Model Card

KAT-Coder-V2.5-Dev APEX-I-MiniPlus-V2.1 GGUF

The Definitive Frontier MoE · Efficient System RAM Offload · Full 256K Context on 24GB Workstations

[!IMPORTANT] ### THE DEFINITIVE SPECIFICATION IN THE 13–14 GB CEILING This APEX-I-MiniPlus-V2.1 release represents the absolute technological limit of sparse Mixture-of-Experts quantization within the 13–14 GB envelope. Every single tensor of its 40 layers and 256 micro-experts has been mathematically audited to maximize reasoning precision, eliminate recurrence state drift, and prevent AVX2 CPU dequantization stalls.
[!TIP] ### 🏆 THE QUANTIZATION SWEET SPOT: Q5–Q6 FIDELITY AT 3-BIT FOOTPRINT Why APEX-I-MiniPlus V2.1 outperforms standard community quants: - Empirical WikiText-2 Perplexity: 5.5045 ± 0.1330 — (ΔPPL ≈ +0.06) from unquantized baseline (approx. 5.44). - Q5–Q6 Fidelity at Less-Than-Q3_K_M Weight: Measured at ΔPPL ≈ +0.06 for this GGUF; Delivers reasoning fidelity and syntax consistency typical of Q5_K / Q6_K while occupying only approx. 14.7 GB (below the 16.2 GB Q3_K_M reference). - Zero Routing Drift: 100% of expert routing matrices (gate_inp) remain in uncompressed `F32`, ensuring tokens are dispatched to the exact right experts on every forward pass.
[!TIP] ### SYSTEM RAM INFERENCE: FULL OR PARTIAL This APEX-I-MiniPlus release is designed for full or partial system-RAM inference. Depending on the processor, memory bandwidth, and DDR4/DDR5 configuration, generation can range from 20 to 45 tok/s. With partial GPU offload, systems that cannot fit 128K or more context entirely in VRAM can place the remaining model and context load in system RAM, maintaining stable, responsive generation at longer context lengths.

[!WARNING] ### DO NOT CONFUSE APEX-I-MINIPLUS WITH GENERIC COMMUNITY APEX-I-MINI! Regardless of release version (whether V1, V2, or V2.1), NEVER confuse handcrafted APEX-I-MiniPlus builds with generic community APEX-I-Mini releases: - Generic Community APEX-I-Mini: Uniformly compresses all core MoE experts down to aggressive 2-bit IQ2_S (dropping below the critical quality floor), leaves the sensitive token output head unarmored at 3-bit Q3_K_M, and compresses attention projections down to Q3_K. In deep reasoning models, this triggers severe perplexity spikes, syntax errors, and broken code brackets. - Handcrafted APEX-I-MiniPlus (All Editions by IsValorum): Every single MiniPlus release—from V1 and V2 to V2.1—is a custom tensor-by-tensor architecture that preserves uncompressed F32 router gates, armors the token output head in high-precision Q6_K, safeguards attention gates in Q8_0, and keeps core reasoning experts at or above calibrated 3-bit (IQ3_XXS/IQ3_S). Even our earlier builds vastly outperform generic community APEX recipes and flat 3-bit quants.

Optimization History & Transparency Notice

We maintain our previous releases publicly as a transparent engineering record of continuous optimization. Below is the exact evolutionary roadmap of our MiniPlus architectures:

SpecificationCore Experts (10–29)Edge Experts (0–9, 30–39)Shared Expert (`shexp`)Full Attention (L3, 7, 11, ...)Attention Gates (30 Layers)Output Head (`output.weight`)Routers (`gate_inp`)Size / OverheadReal-World Impact
Generic APEX MiniIQ2_S (2.50 bpw)Q3_K (only 5 layers)Q4_K / Q3_KQ3_KCompressedQ3_K_MCompressedBaseline (approx. 12.5 GB)Severe syntax errors, broken code indentation, high perplexity in <think>.
MiniPlus V2 (High Theoretical Armor)IQ3_XXSIQ3_S (10 layers)IQ4_NLQ3_KQ8_0Q6_KF32+1.2 GB vs genericHeavy theoretical edge envelope. In practice, virtually identical quality to V2.1 even at +160K context. Excellent for 100% VRAM offload.
MiniPlus V2.1 (CURRENT)`IQ3_XXS``Q3_K` (10 layers)`Q5_K` (All 40 layers)`Q4_K` (`q/k/v`) + `Q6_K` (`output`)`Q8_0``Q6_K``F32`< 100 MB extra over V2 (approx. 13.74 GiB total)Zero AVX2 CPU stalls and efficient streaming when offloading bulk of the model to system RAM (DDR4/DDR5). Only approx. 100 MB overhead over V2 (completely negligible in RAM). If 100% in VRAM, both perform identically.
[!TIP] ### Architecture & Edition Guide — Choosing Between Editions - Full GPU VRAM Offload (24GB+ VRAM, `-ngl 99`): Both V2 and V2.1 run blistering fast on GPU tensor cores with virtually identical top-tier quality. - In Practical Long-Context (+160K tokens): Although V2 provides higher theoretical protection on paper, real-world benchmarks show virtually zero perceptible quality difference compared to V2.1 even across deep +160K contexts. - System RAM Streaming Specialist (DDR4/DDR5 & Massive Context): V2.1 is specially engineered to run either partially or entirely out of system RAM across large or full (+160k to 256k) context windows. By replacing non-linear codebooks with linear SIMD-optimized Q3_K edge experts and upgrading shared foundation experts to Q5_K across all 40 layers, AVX2 CPU dequantization stalls are completely eliminated. Depending on your processor architecture and memory bandwidth (dual-channel DDR4 or high-speed DDR5 6000+ MT/s), streaming generation speeds in system RAM can approach speeds remarkably close to full VRAM execution, allowing you to reserve GPU VRAM exclusively for large context KV caches while the 35B MoE code engine streams responsively from system RAM. The approx. 100 MB difference over V2 is completely negligible when running in system RAM. Both editions are handcrafted and vastly outperform flat 3-bit quants and generic community APEX-I-Mini releases. Prefer high theoretical edge layer protection on paper? Explore the [KAT-Coder-V2.5-Dev MiniPlus V2 Edition](https://huggingface.co/IsValorum/KAT-Coder-V2.5-Dev-APEX-I-MiniPlus-V2-GGUF).

<a id="quick-navigation"></a>Quick Navigation Index

[!IMPORTANT] ### LOOKING FOR A MORE ESTABLISHED 35B MOE? If you enjoy this handcrafted APEX-I-MiniPlus quantization, explore these newer V2.1 releases. Each uses the same tensor-by-tensor approach, integrated MTP support, and full or partial system-RAM inference: - [Qwen3.6-35B-A3B MTP](https://huggingface.co/IsValorum/Qwen3.6-35B-A3B-MTP-APEX-I-MiniPlus-V2.1-GGUF): versatile reasoning, agents, tool use, and multimodal workloads. - [Ornith 1.5](https://huggingface.co/IsValorum/Ornith-1.5-35B-A3B-APEX-I-MiniPlus-V2.1-GGUF): repository-scale software engineering and autonomous coding agents. - [Tiel Coder](https://huggingface.co/IsValorum/Tiel-Coder-35B-A3B-APEX-I-MiniPlus-V2.1-GGUF): a specialist 35B MoE for agentic coding and iterative tool use.

<a id="independent-benchmark"></a>

🏅 Independent Benchmark of the APEX-I-MiniPlus Family (Occamy V2 Reference)

[!NOTE] External report: zephel01 independently benchmarked Occamy V2. The benchmark below was performed on Occamy-1.0 APEX-I-MiniPlus V2, not on this specific V2.1 model. It is included as independent evidence of the broader MiniPlus quantization approach.

The APEX-I-MiniPlus quantization architecture powering this model was subjected to an extensive independent evaluation by Japanese AI researcher and evaluator zephel01 (CoolZero) on an NVIDIA RTX 5090 (32GB) workstation running llama.cpp CUDA b11027 with FlashAttention (-fa on -ctk q8_0 -ctv q8_0 -ngl 99).

The evaluation tested the APEX-I hybrid MoE engine across 348 unseeded trials on SWE-bench style multi-file Python bug-fixing tasks with hidden pytest suites (llmbench):

  • L6 Multi-File Code Generation (60 tasks):
  • Context 32,768 (32K): 93.3% Resolved (46/60 tasks passed 5/5 consecutive trials; 20/20 on Easy–Hard).
  • Context 65,536 (65K): 90.0% Resolved (45/60 tasks passed 5/5 consecutive trials).
  • Match with 25–28 GB Models: Matches or exceeds the resolution rate of full 25–28 GB models (such as Ornith-1.5 and Tiel-Coder 35B-A3B) while consuming over 10 GB less VRAM (14.6 GB vs approx. 26 GB).
  • Extreme Context VRAM Scaling (The Hybrid DeltaNet SSM Advantage):
  • 32K Context: 14.6 GB total VRAM allocation.
  • 65K Context: 15.1 GB total VRAM allocation (only +0.5 GB VRAM added when doubling context!).
  • Architectural Explanation: Because 30 of the 40 layers utilize Linear Attention / DeltaNet SSM ($O(1)$ constant recurrence memory), only the 10 full-attention anchor layers expand the KV cache. This proves empirically that 65,536 context runs 100% in VRAM on consumer 16GB GPUs (RTX 4080 / RTX 5080) without offloading to system RAM.
  • Measured Real-World Throughput: Sustained single-stream generation of approx. 247 – 251 tok/s on NVIDIA RTX 5090.

<a id="model-specifications"></a> <a id="empirical-benchmarks"></a>

Empirical Benchmarks & Fidelity Verification

MetricBaseline (FP16)APEX-I-MiniPlus V2.1 (GGUF)Notes / Verification Method
WikiText-2 Perplexityapprox. 5.445.5045 ± 0.1330(ΔPPL ≈ +0.06)
Model Sizeapprox. 70 GB (BF16)14.75 GB (13.74 GiB)80.0% VRAM reduction with 100% active MoE execution
Router Stability100% (Reference)100% Zero DriftAll gate_inp and gate_shexp preserved in uncompressed F32

<a id="quality-spectrum"></a>

Quality Spectrum: APEX-I-MiniPlus V2.1 vs. Standard Flat Quantizations

How the handcrafted APEX-I-MiniPlus V2.1 architecture compares against standard flat quantizations in llama.cpp on 35B Mixture-of-Experts architectures:

Quantization FormatBits Per Weight (BPW)Model Footprint (Disk / VRAM)Perplexity Delta (vs. FP16 Baseline)Token Fidelity & Syntactic Stability Tier
FP16 / BF16 (Uncompressed)16.0 bpwapprox. 70 GB0.00 (Reference)100% full uncompressed reference fidelity.
Standard Q8_08.50 bpwapprox. 38 GBapprox. +0.01Virtually lossless; excessive memory overhead for consumer hardware.
Standard Q6_K6.56 bpwapprox. 30 GBapprox. +0.02 to +0.05Near-lossless FP16 fidelity; requires multi-GPU or 32GB+ VRAM setups.
🏆 APEX-I-MiniPlus V2.1 (IsValorum)3.40 bpw14.64 GB (13.64 GiB)approx. +0.06 (PPL: 5.5045 vs FP16 approx. 5.44)Model-specific result: ΔPPL approx +0.06 (PPL: 5.5045 vs FP16 approx 5.44), supporting a Q5_K / Q6_K-class fidelity tier at less-than-Q3_K_M weight, at an 80% VRAM reduction. Full native 256K context on standard 24GB workstations.
Standard Q5_K_M5.50 bpwapprox. 25 GBapprox. +0.05 to +0.10Commercial transparent threshold; exceeds standard single 24GB GPU limits.
Standard Q4_K_M4.50 bpwapprox. 20 GBapprox. +0.15 to +0.25Standard industry trade-off; requires context offload compromises.
Standard Q3_K_M / Q3_K_S3.44 bpw16.2 GBapprox. +0.40 to +0.85Noticeable syntax drop, bracket corruption, and tokenizer classification noise.
Standard IQ2_S / Generic APEX Mini2.50 bpwapprox. 12.5 GBapprox. +1.50 to +3.00+Severe reasoning breakdown, high perplexity spikes in <think> chains.

Model Files & Technical Specifications

File NameFile SizeMemory FootprintBPWDescription
`KAT-Coder-V2.5-Dev.APEX-I-MiniPlus-V2.1.gguf``14.75 GB` (`13.74 GiB`)13.74 GiB3.40 BPWDedicated deep coding, algorithm synthesis, test generation & software engineering MoE
  • Base Model: KAT-Dev/KAT-Coder-V2.5-Dev
  • Parameters: 35.2B total (approx. 2.6B to 3.2B active per token)
  • Architecture: 40 layers, 256 micro-experts (8 active per token) + hybrid linear attention / DeltaNet recurrent layers
  • Context Length: 262,144 tokens (native 256K)

<a id="tensor-map"></a>

Surgical Tensor Quantization Map (Audited from GGUF)

The exact tensor breakdown below has been verified directly from the compiled binary weights:

Layer GroupSub-Component / TensorQtyPrecisionEngineering Rationale
Global Output Headoutput.weight1`Q6_K`Preserves near-FP16 token classification; eliminates syntax errors, bracket drops, and hallucinations.
Global Embeddingstoken_embd.weight1`Q4_K`High-fidelity vocabulary embedding representation.
All Normalizationsoutput_norm, attn_*_norm, ssm_norm171`F32`100% uncompressed numerical stability across all 40 layers.
Expert Routersblk.*.ffn_gate_inp, ffn_gate_inp_shexp80`F32`100% uncompressed routing fidelity across 256 micro-experts; zero router drift.
Attention Gatesblk.*.attn_gate.weight (30 Hybrid Layers)30`Q8_0`High-precision attention gating across hybrid DeltaNet recurrence layers; eliminates crosstalk.
Shared Foundation Expertsblk.*.ffn_{gate,down,up}_shexp (All 40 Layers)120`Q5_K`Foundation knowledge backbone active on 100% of tokens; protected in high-precision linear Q5_K.
Periodic Full Attentionblk.{3,7,11,...}.attn_q/k/v (10 Anchor Layers)30`Q4_K`Full quadratic attention anchor checkpoints for deep needle-in-a-haystack retrieval.
Periodic Full Attentionblk.{3,7,11,...}.attn_output (10 Anchor Layers)10`Q6_K`Armored attention output projection over deep context.
Recurrent SSM Scalesblk.*.ssm_alpha, ssm_a, ssm_conv1d, ssm_dt120`F32`Guarded in uncompressed FP32 to prevent DeltaNet recurrent state drift.
Linear Attention & SSMblk.*.attn_qkv, ssm_beta, ssm_out90`Q3_K`Linear AVX2 execution; zero SIMD CPU stalls during system RAM streaming.
Edge MoE ExpertsLayers 0–9 & 30–39 (ffn_*_exps)60`Q3_K`Linear SIMD execution optimized for system RAM offload.
Core MoE ExpertsLayers 10–29 (ffn_*_exps)60`IQ3_XXS`Calibrated with importance matrix (imatrix) for maximum compactness in deep layers.

<a id="throughput-projections"></a>

Hardware Throughput & Offload Benchmarks (RTX 30 / 40 / 50 & RAM Streaming)

Empirically verified in Unsloth Studio & llama.cpp:

Hardware TargetOffload ModeGeneration Speed (Est.)Prompt Prefill Speed (Est.)Highlights
NVIDIA RTX 5080 / 5090 (Blackwell)Full GPU (-ngl 99)approx. 247 – 251 tok/s2,800 – 3,900+ tok/sEmpirically verified on RTX 5090 by zephel01 (Occamy V2 Reference)
NVIDIA RTX 4090 (24GB GDDR6X)Full GPU (-ngl 99)90 – 115+ tok/s2,000 – 2,800+ tok/sLinear attention layers slash prefill latency
NVIDIA RTX 3090 (24GB GDDR6)Full GPU (-ngl 99)72 – 88+ tok/s1,500 – 2,200+ tok/sFull 256k native window in VRAM
Workstation / Laptop (DDR4 / DDR5 RAM)Hybrid Offload (Few layers in VRAM)Hardware-dependentHardware-dependentZero AVX2 CPU stalls; efficient streaming from system RAM
  • Aggressive Hybrid Offload Profile: Hybrid offload supports reasoning-enabled generation with limited VRAM while the remaining model weights stream from system RAM.
[!NOTE] ### Empirical Testbed Architecture & Desktop/Server Scaling - Empirical Benchmark Hardware: The hybrid offload and system RAM streaming behavior documented above was measured on a consumer laptop powered by an Intel 12th Gen Alder Lake architecture featuring a hybrid design of Performance Cores (P-Cores) and Efficient Cores (E-Cores) paired with dual-channel system RAM and constrained laptop power/thermal envelopes. - Thread Scheduling & E-Core Contention: In hybrid architectures like Alder Lake, OS thread scheduling across background E-Cores and lower single-core mobile power limits introduce memory bandwidth and thread synchronization overhead during CPU dequantization. - Dramatic Scaling on Higher-End Processors: When running on desktop or server processors (such as modern AMD Ryzen 7000 / 9000 Zen 4/5 series or high-TDP Intel desktop platforms with dedicated performance cores, large L3 caches, and high-bandwidth dual- or quad-channel DDR5 running at 6000+ MT/s), streaming generation speeds and prefill throughput will scale dramatically higher, substantially exceeding these measured mobile numbers.

<a id="context-scaling"></a>

The 24GB Miracle: Full 256K Context Runs In VRAM!

KAT-Coder-V2.5-Dev APEX-I-MiniPlus-V2.1 fits the entire 256K context window within 24GB VRAM:

Context LengthModel Weights (Est.)KV Cache (q8_0, 4 slots)Compute Buffers**Total GPU VRAM (Est.)**Feasibility
32,768 (32k)13.74 GiB0.58 GiB1.80 GiB`16.12 GiB`Full offload on 24GB; partial on 16GB
65,536 (64k)13.74 GiB0.92 GiB1.95 GiB`16.61 GiB`Effortless fit on 24GB GPUs
131,072 (128k)13.74 GiB1.58 GiB2.22 GiB`17.54 GiB`Effortless fit on 24GB GPUs
262,144 (256k)13.74 GiB2.92 GiB2.80 GiB`19.46 GiB`FULL 256K NATIVE IN VRAM!

Note: Leaves comfortable headroom for display drivers and compute buffers on standard 24GB GPUs (RTX 3090, RTX 4090, RTX 5090).

[!TIP] ### 💡 Empirical 16GB GPU Verification (Single Stream / Desktop) While theoretical multi-slot server buffers estimate approx. 16.5 GiB, independent hardware testing by zephel01 on an RTX 5090 (Occamy V2 Reference) confirmed that single-stream desktop inference consumes only 14.6 GB at 32,768 ctx and only 15.1 GB at 65,536 ctx (-ctk q8_0 -ctv q8_0 -fa on). This empirically proves that full 65K context runs completely in VRAM on 16GB cards (RTX 4080 / RTX 5080) without system RAM offload!

<a id="recommended-setup"></a>

Recommended Configuration & Setup

bash
llama-server.exe \
 -m KAT-Coder-V2.5-Dev.APEX-I-MiniPlus-V2.1.gguf \
 --port 8080 \
 --parallel 4 \
 --flash-attn on \
 --fit on \
 -c 104960 \
 --cache-type-k q8_0 \
 --cache-type-v q8_0

<a id="generation-parameters"></a>

⚙️ Recommended Generation Parameters (Kwaipilot Official)

Official sampling hyperparameters specified by Kwaipilot across benchmark evaluation tracks:

Evaluation Track / WorkloadTemperatureTop-PTop-KPresence PenaltyMax TokensThinking Mode
SWE-bench & Agent Coding (Official)1.000.95201.5081,920enable_thinking: true
Terminal-Bench & Direct Code Execution0.701.00201.5032,768enable_thinking: false
PinchBench & SciCode Scientific Logic0.60 – 0.701.00201.5032,768preserve_thinking: true
[!IMPORTANT] <a id="quantization-fidelity"></a> ### 🔍 Model Inherent Behavior vs. Quantization Fidelity Notice Any behavioral nuances, stylistic tendencies, domain-specific habits, or zero-shot edge-case oversights stem entirely from the original unquantized checkpoint weights and fine-tuning distribution, NOT from the APEX-I quantization process. Handcrafted APEX-I-MiniPlus strictly preserves mathematical tensor fidelity—keeping 100% of expert routing matrices (gate_inp) in uncompressed F32 (zero router drift), armoring the token output head in Q6_K, and safeguarding attention gates in Q8_0. Empirical verification confirms near-zero perplexity loss (ΔPPL ≈ +0.06), ensuring that token logits, routing decisions, and reasoning trajectories are mathematically faithful to the original base model.
[!TIP] ### 💡 Developer Tip for Autonomous Coding & CI Agents (Import Discipline) In independent evaluations of the APEX-I-MiniPlus architecture (Occamy V2 reference), reasoning and code generation scored a remarkable 90%–93.3% resolution rate on multi-file SWE benchmarks. When deploying autonomous coding agents in production, best practices include specifying in your system prompt: "Always declare complete, explicit import statements at the beginning of the file" or pairing with an automated linter (ruff) to guarantee clean, zero-shot execution.