Myric/ERNIE-4.5-21B-A3B-APEX-GGUF overview
ERNIE 4.5 21B A3B — APEX GGUF MoE aware, mixed precision APEX quantizations of baidu/ERNIE 4.5 21B A3B PT https://huggingface.co/baidu/ERNIE 4.5 21B A3B PT — B…
Runs locally from ~10.44 GB disk (12 GB VRAM class GPUs with llama.cpp / guIDE).
Repository Files & Downloads
Model Details
| Model ID | Myric/ERNIE-4.5-21B-A3B-APEX-GGUF |
|---|---|
| Author | Myric |
| Pipeline | text-generation |
| License | apache-2.0 |
| Base model | baidu/ERNIE-4.5-21B-A3B-PT |
| Last modified | 2026-07-22T14:08:17.000Z |
Model README
---
license: apache-2.0
base_model: baidu/ERNIE-4.5-21B-A3B-PT
base_model_relation: quantized
pipeline_tag: text-generation
library_name: gguf
tags:
- gguf
- moe
- apex
- quantized
- ernie
- llama.cpp
---
ERNIE-4.5-21B-A3B — APEX GGUF
MoE-aware, mixed-precision APEX quantizations of
— Baidu's ernie4_5-moe: 28 layers (dense layer 0 + 27 MoE), **64 routed + 2
shared** experts, top-6 routing, ~21B total / ~3B active, Apache-2.0.
Results & which file to pick
Perplexity on wikitext-2-raw (test, 200×512-token windows), llama-perplexity.
Both quants are imatrix-guided (Bartowski calibration_datav3).
| File | Size | BPW | PPL | Δ vs bf16 | Fits (VRAM) |
|------|------|-----|-----|-----------|-------------|
| bf16 (reference) | 41 GB | 16.0 | 7.362 | — | — |
| APEX-i-quality | 15 GB | 5.63 | 7.352 | −0.14% (at parity) | 16 GB — best quality |
| APEX-i-compact | 11 GB | 4.11 | 7.640 | +3.77% | 12 GB — smallest usable |
- i-quality — recommended; effectively lossless — its PPL lands a hair
below the bf16 reference (within noise). Q6_K/Q5_K experts on a depth gradient,
Q8_0 shared, Q6_K attention. Runs on a 16 GB card.
- i-compact — Q4_K_M-class mid experts; a real but usable step (+3.8%) that
fits a 12 GB card.
ERNIE's routed-expert intermediate dim is 1536 (256-divisible), so i-quants
apply cleanly to every expert tensor — no IQ4_NL fallback needed.
Usage (llama.cpp)
llama-cli -m ERNIE-4.5-21B-A3B-APEX-i-quality.gguf -ngl 999 -p "Hello"
llama-server -m ERNIE-4.5-21B-A3B-APEX-i-compact.gguf -ngl 999 --host 0.0.0.0 --port 8080
Requires a llama.cpp build supporting the ernie4_5-moe architecture.
Method
APEX = per-tensor-role, per-layer precision over stock
llama-quantize --tensor-type-file. ERNIE-4.5-21B is a standard MoE —
conventional ffn__exps / ffn__shexp tensor names, a single dense layer 0
(--dense-layers 1) — so it used the stock APEX config generator, no patching
(unlike the Kimi/Granite/Moonlight hybrids in this collection). Routed experts on
a layer-depth gradient; shared experts protected at Q8_0/Q6_K; router left high.
Baseline: bartowski's bf16 GGUF.
imatrix from Bartowski calibration_datav3. See REPRODUCE.md and configs/.
Attribution & licenses
See LICENSE (Apache-2.0) and NOTICE.
- Base: Baidu (@baidu) — ERNIE-4.5-21B-A3B-PT (Apache-2.0)
- bf16 GGUF: bartowski (@bartowski) — source
- Engine: llama.cpp (@ggml-org) (MIT)
- APEX: Ettore Di Giacinto / LocalAI (@mudler) — localai-org/apex-quant (MIT)
- Calibration: Bartowski (@bartowski) — calibration_datav3
Unofficial community quantization; not affiliated with or endorsed by Baidu.
Run Myric/ERNIE-4.5-21B-A3B-APEX-GGUF with guIDE
Download guIDE — the AI-native code editor with local LLM inference and 69 built-in tools.
Source: Hugging Face · Compare models