13K ·GitHub
What is this?
PaddleFormers is a Transformers-style library built on Baidu's PaddlePaddle deep learning framework, giving the PaddlePaddle ecosystem the same kind of model interface and training workflow as Hugging Face Transformers, with full training support for 100+ LLMs and vision-language models.
Is this a framework or a library I import into my code?
It's a Python library whose API design intentionally mirrors Hugging Face Transformers, so if you know 'transformers' you can use this the same way, just running on PaddlePaddle instead of PyTorch.
What do I need before installing it?
You need Python 3.12 or newer and CUDA 13.0 or newer, plus PaddleFleet 0.3+ which is only required if you want to use the GPU training features.
Is a lightweight install possible if I only need tokenization?
Yes — there's a minimal install option that skips all training dependencies if you only need the tokenizer or processor, which installs faster but can't be used for actual model training.
Which hardware beyond NVIDIA GPUs is supported?
PaddleFormers has dedicated adaptation for several Chinese domestic AI accelerators, including Kunlunxin P800, Iluvatar Tiangai 150, Moxin C550, and Moore Threads chips.
Does it support fine-tuning methods like LoRA and DPO?
Yes, it covers the full post-training pipeline including CPT, SFT, SFT-LoRA, DPO, and DPO-LoRA, letting you go from pretrained checkpoint to an aligned model.
Can models trained here be deployed with vLLM or SGLang?
Yes, trained models are saved in the standard Safetensors format compatible with Hugging Face weights, so they can be served directly via FastDeploy, vLLM, or SGLang without conversion.
What's new in the latest v1.2 release?
v1.2 adds full support for training DeepSeek-V4 at 128K+ context length, including its CSA+HCA hybrid attention, mHC residual connections, and Muon optimizer, plus new FP8 MoE kernels and expert-parallel communication libraries.
How does its training performance compare to Megatron-LM?
On flagship models like DeepSeek-V3 and GLM-4.5-Air, PaddleFormers reports training performance that clearly surpasses Megatron-LM thanks to its fused operators and communication-compute overlap optimizations.
What are similar projects?
Qwen3.8-Flash-Next, Hy4-preview, Hy-MT2, diy-llm, open-r1, nanochat, verl, jeeves
Which topics is it in?
baidu, pretraining, llm-training, model, distributed-training, mixture-of-experts, vllm, nlp, fine-tuning, transformer, gpu-acceleration, large-language-models