Views
No views yet
[!NOTE] Note: "-Paddle" models use PaddlePaddle weights, while "-PT" models use Transformer-style PyTorch weights.
| Key | Value |
|---|---|
| Modality | Text |
| Training Stage | Pretraining |
| Params(Total / Activated) | 300B / 47B |
| Layers | 54 |
| Heads(Q/KV) | 64 / 8 |
| Text Experts(Total / Activated) | 64 / 8 |
| Vision Experts(Total / Activated) | 64 / 8 |
| Context Length | 131072 |
transformers librarytransformers library installed (version 4.50.0 or higher)1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "baidu/ERNIE-4.5-300B-A47B-Base-PT"
4tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
5model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
6
7prompt = "Large language model is"
8model_inputs = tokenizer([prompt], add_special_tokens=False, return_tensors="pt").to(model.device)
9
10generated_ids = model.generate(
11 model_inputs.input_ids,
12 max_new_tokens=1024
13)
14result = tokenizer.decode(generated_ids[0].tolist(), skip_special_tokens=True)
15print("result:", result)1# 80G * 16 GPU
2vllm serve baidu/ERNIE-4.5-300B-A47B-Base-PT --trust-remote-code1# FP8 online quantification 80G * 16 GPU
2vllm serve baidu/ERNIE-4.5-300B-A47B-Base-PT --trust-remote-code --quantization fp81@misc{ernie2025technicalreport,
2 title={ERNIE 4.5 Technical Report},
3 author={Baidu ERNIE Team},
4 year={2025},
5 eprint={},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={}
9}