Skip to content
English

Switch theme

// Baidu ERNIE · Text LLM

ERNIE-4.5-21B-A3B-PT: VRAM & local deployment

21.9B total · 3B active (MoE) parameters. About 15.6 GB at 4-bit and 49.3 GB at BF16 with one 8K-token request.

released 2025-06-28licence: Commercial OKmemory figures are estimates

01Specs

PublisherBaidu · baidu
Family / seriesBaidu ERNIE · ERNIE-4.5
TypeText LLM (text-generation)
Parameters21.9B total · 3B active (MoE) Source: counted from official safetensors weights
Context length128K tokens (131,072)max_position_embeddings in config.json
Architecture28 layers · GQA · MoE
Released weightsBF16 · 43.9 GBdownload
LicenceApache-2.0 · Commercial OKPermissive licence (Apache-2.0 / MIT / CC-BY / OpenMDW): commercial use allowed.
Released2025-06-28 (Hugging Face repo created)

02How much VRAM it needs (estimate)

Total = weights + 10% + 0.5GB overhead + KV cache for one request (FP16 KV). More concurrent users multiply the KV column.

PrecisionWeightsTotal @ 8KTotal @ 32KTotal @ 128KSmallest GPUMac
BF16 / FP16 (original)43.9 GB 49.3 GB50.7 GB56.3 GB 2 × RTX 5090 (64GB)Mac 128GB
FP8 / INT8 / Q8_023.3 GB 26.6 GB28.0 GB33.7 GB RTX 5090 32GBMac 64GB
4-bit (Q4_K_M / AWQ / GPTQ-Int4)13.3 GB 15.6 GB17.0 GB22.7 GB RTX 4090 24GBMac 36GB

KV cache per request: 8K 0.5 GB · 32K 1.9 GB · 128K 7.5 GB

Bits per weight: BF16 16, FP8 8.5, 4-bit 4.85. “Fits” = total ≤ 90% of memory; Mac GPU can use ~2/3 of unified memory (≤36GB) or ~3/4 (larger). For MoE, all experts must be in memory, so size by total parameters. Method →

03How to run it

Only runtimes the publisher or the runtime’s official library names for this model.

Which inference engine to choose →

04Official repositories & quantised builds

1 official repo(s) from baidu.

05Other Baidu ERNIE models

All 11 →
ModelParams4-bit totalReleased
ERNIE-4.5-0.3B-PT · same series361M0.9 GB2025-06-28
ERNIE-4.5-300B-A47B-PT · same series300.5B / 47B203 GB2025-06-28
ERNIE-Image8.03B5.9 GB2026-04-07
ERNIE-Image-Turbo8.03B5.9 GB2026-04-02
ERNIE-4.5-VL-28B-A3B-Thinking29.7B / 3B20.8 GB2025-11-07
ERNIE-4.5-21B-A3B-Thinking21.8B / 3B15.5 GB2025-09-08
ERNIE-4.5-300B-A47B-Paddle300.5B / 47B203 GB2025-06-28
ERNIE-4.5-VL-28B-A3B-PT29.4B / 3B20.6 GB2025-06-28
ERNIE-4.5-VL-424B-A47B-PT423.5B / 47B285 GB2025-06-28
ERNIE-4.5-VL-424B-A47B-Paddle423.5B / 47B285 GB2025-06-28

06Sources

Data checked 2025-11-26. Parameters, context and licence are copied from the official repository; memory figures are our estimates.

Data updated: Self-host open models(UTC+8)