How to use from
vLLM
Install from pip and serve model
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Myric/ERNIE-4.5-21B-A3B-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": "Myric/ERNIE-4.5-21B-A3B-APEX-GGUF",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Use Docker
docker model run hf.co/Myric/ERNIE-4.5-21B-A3B-APEX-GGUF
Quick Links

ERNIE-4.5-21B-A3B β€” APEX GGUF

MoE-aware, mixed-precision APEX quantizations of baidu/ERNIE-4.5-21B-A3B-PT β€” 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.

Unofficial community quantization; not affiliated with or endorsed by Baidu.

Downloads last month
2,026
GGUF
Model size
22B params
Architecture
ernie4_5-moe
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Myric/ERNIE-4.5-21B-A3B-APEX-GGUF

Quantized
(23)
this model