alt.freeweights.text / ERNIE-4.5-21B-A3B-Thinking
From: baidu <huggingface.co/baidu>Newsgroups: alt.freeweights.textSubject:

ERNIE-4.5-21B-A3B-Thinking

Date: 2026-11-15Commit: 4341bb4Signed: 2DC28CC7B26A283B ✓

Text generation model with 21.8B parameters. Safetensors weights, 43.7 GB in all. Published by baidu under Apache-2.0.

21.8B params43.7GBERNIE-4.5-21B-A3B-Thinkingsafetensorspermissive
FactsParams21.8BSize43.7 GBFormatssafetensorsTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get baidu/ERNIE-4.5-21B-A3B-Thinking
# manifest sha256 92204577df62… · 43.7 GB · 21 files
$ fw verify ./ERNIE-4.5-21B-A3B-Thinking baidu/ERNIE-4.5-21B-A3B-Thinking
From sourceHosted (signed)baidu/ERNIE-4.5-21B-A3B-ThinkingLast check: 2026-11-15 02:32 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Runs withAIBrixBentoMLCTranslate2ExLlamaV2ExLlamaV3exofastllmFlashInfergpu-unlockKTransformersLitServeLMCacheLMDeployLocalAImistral.rsMLC LLMMooncakeSGLangText Generation WebUItinygradTransformersTriton Inference ServervLLMXinferenceFine-tune withAccelerateAlignment HandbookAxolotlColossal-AIDeepSpeedEasyR1FlashAttentionH2O LLM StudioJAXKerasLiger KernelLitGPTLLaMA-FactoryMegatron-LMms-swiftnanotronOLMo-coreOpenRLHFOumiPEFTPyTorch Lightningsd-scriptsSimpleTunerTorchTitantorchtuneTransformer EngineTRLUnslothverlConvert withAQLMAutoRoundCore ML ToolsExecuTorchGPTQModelLLM CompressormergekitNeural CompressorOliveONNXOptimum QuantoOptimumsafetensorsTensorRT Model OptimizertorchaoEvaluate withAutoevalsDeepEvalEvaluateHELMLightEvallm-evaluation-harnessOpenCompassOpikRagassimple-evalsSWE-benchTruLensWeaveScan withAgentDojoAI Fairness 360DeepTeamDetoxifyFairlearngarakGiskardGuardrailsMCP ScannerModelScanNeMo GuardrailspicklescanpromptfooWorks withAgent Development KitAG2Google AI Edge GalleryAiderany-llmAnythingLLMBAMLbrowser-useCAMELHugging Face Chat UIChatboxCherry StudioClineCodex CLICogneeCrewAIDeerFlowDSPyEnchantedGemini CLIGitHub MCP ServergooseGPT ResearcherGradioGraphitiGuidanceHollamaInstructorKilo CodeLangflowLangGraphLiteLLMLlamaIndexLLMLocalAGILoLLMs WebUIMCP Python SDKMem0MetaGPTNextChatOllama JavaScriptOllama PythonOpenAI Agents SDKopencodeOpenHandsotermOutlinesPage AssistPlaywright MCPPortkey AI GatewayPrivateGPTQwen CodeRWKV RunnerSemantic KernelsmolagentsStrands AgentsVaneXGrammar

Overview

Size
43.7 GB
Weights
43.7 GB (safetensors)
Parameters
21.8B
Formats
safetensors
Task
text generation
License
Apache-2.0 (permissive)
Files
21, each with a sha256
Publisher
baidu
Added
2026-11-15
Section
alt.freeweights.text
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 02:32 UTCpassed

Model card

From the publisher at commit 4341bb4. Shown as plain text with links; images open at the publisher.

Chat Hugging Face Github Blog Discord X

License

ERNIE-4.5-21B-A3B-Thinking#

Model Highlights#

Over the past three months, we have continued to scale the thinking capability of ERNIE-4.5-21B-A3B, improving both the quality and depth of reasoning, thereby advancing the competitiveness of ERNIE lightweight models in complex reasoning tasks. We are pleased to introduce ERNIE-4.5-21B-A3B-Thinking, featuring the following key enhancements:

  • Significantly improved performance on reasoning tasks, including logical reasoning, mathematics, science, coding, text generation, and academic benchmarks that typically require human expertise.
  • Efficient tool usage capabilities.
  • Enhanced 128K long-context understanding capabilities.

Note. Note: This version has an increased thinking length. We strongly recommend its use in highly complex reasoning tasks.

Image: benchmark

Model Overview#

ERNIE-4.5-21B-A3B-Thinking is a text MoE post-trained model, with 21B total parameters and 3B activated parameters for each token. The following are the model configuration details:

|Key|Value|

|-|-|

|Modality|Text|

|Training Stage|Posttraining|

|Params(Total / Activated)|21B / 3B|

|Layers|28|

|Heads(Q/KV)|20 / 4|

|Text Experts(Total / Activated)|64 / 6|

|Shared Experts|2|

|Context Length|131072|

Quickstart#

Note. To align with the wider community, this model releases Transformer-style weights. Both PyTorch and PaddlePaddle ecosystem tools, such as vLLM, transformers, and FastDeploy, are expected to be able to load and run this model.

FastDeploy Inference#

Quickly deploy services using FastDeploy as shown below. For more detailed usage, refer to the FastDeploy GitHub Repository.

Note: 80GB x 1 GPU resources are required. Deploying this model requires FastDeploy version 2.2.

python -m fastdeploy.entrypoints.openai.api_server \
       --model baidu/ERNIE-4.5-21B-A3B-Thinking \
       --port 8180 \
       --metrics-port 8181 \
       --engine-worker-queue-port 8182 \
       --load-choices "default_v1" \
       --tensor-parallel-size 1 \
       --max-model-len 131072 \
       --reasoning-parser ernie_x1 \
       --tool-call-parser ernie_x1 \
       --max-num-seqs 32

The ERNIE-4.5-21B-A3B-Thinking model supports function call.

curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
-H "Content-Type: application/json" \
-d $'{
  "messages": [
    {
      "role": "user",
      "content": "How \'s the weather in Beijing today?"
    }
  ],
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Determine weather in my location",
        "parameters": {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "The city and state e.g. San Francisco, CA"
            },
            "unit": {
              "type": "string",
              "enum": [
                "c",
                "f"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "location",
            "unit"
          ]
        },
        "strict": true
      }
    }]
}'
vLLM inference#

VLLM>=0.10.2 (excluding 0.11.0)

vllm serve baidu/ERNIE-4.5-21B-A3B-Thinking

The reasoning-parser and tool-call-parser for vLLM Ernie need install vllm main branch

Using transformers library#

Note: You'll need thetransformerslibrary (version 4.54.0 or newer) installed to use this model.

The following contains a code snippet illustrating how to use the model generate content based on given inputs.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "baidu/ERNIE-4.5-21B-A3B-Thinking"

# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    device_map="auto",
    torch_dtype=torch.bfloat16,
)

# prepare the model input
prompt = "Give me a short introduction to large language model."
messages = [
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
model_inputs = tokenizer([text], add_special_tokens=False, return_tensors="pt").to(model.device)

# conduct text completion
generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=1024
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()

# decode the generated ids
generate_text = tokenizer.decode(output_ids, skip_special_tokens=True)
print("generate_text:", generate_text)

License#

The ERNIE 4.5 models are provided under the Apache License 2.0. This license permits commercial use, subject to its terms and conditions. Copyright (c) 2025 Baidu, Inc. All Rights Reserved.

Citation#

If you find ERNIE 4.5 useful or wish to use it in your projects, please kindly cite our technical report:

@misc{ernie2025technicalreport,
      title={ERNIE 4.5 Technical Report},
      author={Baidu-ERNIE-Team},
      year={2025},
      primaryClass={cs.CL},
      howpublished={\url{https://ernie.baidu.com/blog/publication/ERNIE_Technical_Report.pdf}}
}

Files

21 files · 43.7 GBWeights 43.7 GB (safetensors). Sizes and sha256 from the signed manifest.
Show all 21 files with their sha256
FileSizesha256
.gitattributes1.62 KBb7509967bdf06ff16c6f07e74af0efc1088a96d5f37c306f901542b1b710b163
LICENSE11.4 KB5d7deeaff0d6f92ef5c74658a46e4750ccbcd0602efcdfd24cd7ec6ae7c822f9
README.md7.20 KBb46ba203c179d77c52a07a4d470ca9e9d37d69ec6f6affe5d40453f18695d722
benchmark.png568 KB8fc0515602d17a94ecc9e03fbc0fce47a93a0a6ef3e7b0ded789041c2b3597f1
chat_template.jinja3.66 KBe141f14fb656c78182da82e2d900e404c021112a7f2df1953db26cab705c06f0
config.json903 B358949b999a98add16ff96dd06c2dc893dd8f4e65c96939e3916b7291629974a
generation_config.json205 Bfef4cb7d9d0f486629dbb12a54ff158fb343d4cb99d35c0cbe72627fe56f25e9
model-00001-of-00009.safetensors5.00 GBde3efa16f537a74aff72e9fea5fb1a7e08a0faffc7132869a67d5bb6b78064aa
model-00002-of-00009.safetensors5.00 GB91f473afe859ee0f0dcdba1550d98b8ad11a9b839e7ebd02bad168070dc33d8e
model-00003-of-00009.safetensors5.00 GBcfac0aefbd02009bbbbc3e771b79fe0610a80fbea0096dd0667e7efde6b4ed1b
model-00004-of-00009.safetensors5.00 GB5671525a678ea400d874cff61425ed035fafa7a238193ce1bdbdf01eb8a11831
model-00005-of-00009.safetensors4.99 GB5ecbcba73a31c60e08baabcb4b3fdcd405340dfde2abfda8a241da8638e4a2fb
model-00006-of-00009.safetensors5.00 GBbebfbe2957c04dfe8fb9c1b296c12228357e88589645d2f08cec5f5068fafed6
model-00007-of-00009.safetensors4.99 GBd9e6fdfd3388ad61497dbee292ccedb5fee649fa232375234d60b4d90801c934
model-00008-of-00009.safetensors5.00 GB64c6d7593febe2c13857baaf44c9dfb5cc6895a203b1b5389ad1bea2a105026b
model-00009-of-00009.safetensors3.71 GBa2612a786bde0d6b8afd947cf23f5f61041921bf5a77ef25877b775d0d7b4d43
model.safetensors.index.json515 KBbe7d1c67bf4872dde6865f2ec2ff4d4608fe68ec855e990e312af0a14c23d27c
special_tokens_map.json658 B296e45aa011ba3e32681123b54f4e0b01dd232011c71e782c6814d2f17e3d429
tokenizer.json11.0 MB93a291ef6e5c89e6c0f2d5d004734ff429faa8ab925e39d71d2374b3d0daf49e
tokenizer.model1.61 MB098d756440604e3829c6c2375f835a82a1968c044b74e561f4b0084e53befd2e
tokenizer_config.json4.23 KBc3249e7ebb907d17390c48b6e5a2466bb703cc2a74cf5ed673b5ae79f9247c82
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
4341bb4264 pinned now2026-11-15 02:32 UTC21 files · 43.7 GB

Use it

$ fw get baidu/ERNIE-4.5-21B-A3B-Thinking
# manifest sha256 92204577df62… · 43.7 GB · 21 files
$ fw verify ./ERNIE-4.5-21B-A3B-Thinking baidu/ERNIE-4.5-21B-A3B-Thinking
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/baidu/ERNIE-4.5-21B-A3B-Thinking.json --dir ./ERNIE-4.5-21B-A3B-Thinking $ python3 fw.py verify ./ERNIE-4.5-21B-A3B-Thinking ./baidu__ERNIE-4.5-21B-A3B-Thinking.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download baidu/ERNIE-4.5-21B-A3B-Thinking --revision 4341bb42644d5422859509fa25d41544c57181f8 --local-dir ./ERNIE-4.5-21B-A3B-Thinking
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("baidu/ERNIE-4.5-21B-A3B-Thinking", revision="4341bb42644d5422859509fa25d41544c57181f8") model = AutoModelForCausalLM.from_pretrained("baidu/ERNIE-4.5-21B-A3B-Thinking", revision="4341bb42644d5422859509fa25d41544c57181f8", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve baidu/ERNIE-4.5-21B-A3B-Thinking --revision 4341bb42644d5422859509fa25d41544c57181f8

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
LICENSE
Text sha256
5d7deeaff0d6f92ef5c74658a46e4750ccbcd0602efcdfd24cd7ec6ae7c822f9
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: baidu <huggingface.co/baidu>Newsgroups: alt.freeweights.textSubject: ERNIE-4.5-21B-A3B-ThinkingDate: 2026-11-15Commit: 4341bb4Signed: 2DC28CC7B26A283B ✓
Upstream
baidu/ERNIE-4.5-21B-A3B-Thinking
Pinned commit
4341bb42644d5422859509fa25d41544c57181f8
Manifest
ERNIE-4.5-21B-A3B-Thinking.json · .minisig
Manifest sha256
92204577df629f3334c9b6a6e1368edadc38ccb93c2fa40daab56db16b703501
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:32 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/baidu/ERNIE-4.5-21B-A3B-Thinking.json $ curl -O https://freeweights.allternit.com/manifests/baidu/ERNIE-4.5-21B-A3B-Thinking.json.minisig $ minisign -Vm ERNIE-4.5-21B-A3B-Thinking.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

2 models in the catalog name this one as their parent.

Quantizations
2
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download baidu/ERNIE-4.5-21B-A3B-Thinking
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. ERNIE-4.5-21B-A3B-Thinking.json. Provenance. Takedown history: none.

Variants

2 quantized or adapter builds of ERNIE-4.5-21B-A3B-Thinking. Each has its own license check and page.

From: laion <huggingface.co/laion>Subject: a2-rl-e2egit_large-50-32B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-large-15-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-v2-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_pymethods2test-large-80-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_unitsyn-python-large-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_mix_h2_language_proportional-65-8B