Instructions to use unsloth/ERNIE-4.5-21B-A3B-PT-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/ERNIE-4.5-21B-A3B-PT-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/ERNIE-4.5-21B-A3B-PT-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("unsloth/ERNIE-4.5-21B-A3B-PT-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use unsloth/ERNIE-4.5-21B-A3B-PT-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./llama-cli -hf unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL
Use Docker
docker model run hf.co/unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL
- LM Studio
- Jan
- vLLM
How to use unsloth/ERNIE-4.5-21B-A3B-PT-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/ERNIE-4.5-21B-A3B-PT-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": "unsloth/ERNIE-4.5-21B-A3B-PT-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL
- SGLang
How to use unsloth/ERNIE-4.5-21B-A3B-PT-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "unsloth/ERNIE-4.5-21B-A3B-PT-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/ERNIE-4.5-21B-A3B-PT-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "unsloth/ERNIE-4.5-21B-A3B-PT-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/ERNIE-4.5-21B-A3B-PT-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use unsloth/ERNIE-4.5-21B-A3B-PT-GGUF with Ollama:
ollama run hf.co/unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL
- Unsloth Desktop
- Docker Model Runner
How to use unsloth/ERNIE-4.5-21B-A3B-PT-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL
- Lemonade
How to use unsloth/ERNIE-4.5-21B-A3B-PT-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/ERNIE-4.5-21B-A3B-PT-GGUF:UD-Q4_K_XL
Run and chat with the model
lemonade run user.ERNIE-4.5-21B-A3B-PT-GGUF-UD-Q4_K_XL
List all available models
lemonade list
- Atomic Chat
update the gguf
Can you please update GGUF.
Model was last updated on 26th sept
https://huggingface.co/baidu/ERNIE-4.5-21B-A3B-PT/commits/main
Can you please update GGUF.
Model was last updated on 26th sept
https://huggingface.co/baidu/ERNIE-4.5-21B-A3B-PT/commits/main
We worked with Baidu team actually to implement those fixes which we found. See pinned message
Can you please update GGUF.
Model was last updated on 26th sept
https://huggingface.co/baidu/ERNIE-4.5-21B-A3B-PT/commits/main
We worked with Baidu team actually to implement those fixes which we found. See pinned message
I cannot see the pinned message. Neither here nor on Bidu HF discussions or commit messages.
I know you guys work with original model providers to provide fixes but are you saying that model updated on 26 sept at baidu HF is same as your GGUFs that are currently here ?
Can you please update GGUF.
Model was last updated on 26th sept
https://huggingface.co/baidu/ERNIE-4.5-21B-A3B-PT/commits/main
We worked with Baidu team actually to implement those fixes which we found. See pinned message
I cannot see the pinned message. Neither here nor on Bidu HF discussions or commit messages.
I know you guys work with original model providers to provide fixes but are you saying that model updated on 26 sept at baidu HF is same as your GGUFs that are currently here ?
Yes that is correct, see: https://x.com/ErnieforDevs/status/1976147050463977681
Can you please update GGUF.
Model was last updated on 26th sept
https://huggingface.co/baidu/ERNIE-4.5-21B-A3B-PT/commits/main
We worked with Baidu team actually to implement those fixes which we found. See pinned message
I cannot see the pinned message. Neither here nor on Bidu HF discussions or commit messages.
I know you guys work with original model providers to provide fixes but are you saying that model updated on 26 sept at baidu HF is same as your GGUFs that are currently here ?Yes that is correct, see: https://x.com/ErnieforDevs/status/1976147050463977681
As far as I understand that is thinking version. This is non thinking version. GGUFs pointing in that post are to thinking version. This non thinking version was released earlier and updated later.
Please correct me if I am wrong.
@danielhanchen
Model is updated. Any changelog for update?
Yes it got updated now! Apologies for the previous miscommunication
No worries. It is very much appreciated, I just wanted to know what is changed. We enjoy it free of cost, so this is always in my mind.
Thank you to you guys for your wonderful work.
Just on side note. Are you aware of this PR. Will it impact newly shared GGUF.
convert : fix Gemma3N and Ernie4.5Moe
https://github.com/ggml-org/llama.cpp/pull/19084