A Transformers library for PaddlePaddle that trains large language and vision-language models
open sourceApache-2.0free
PaddleFormers is a Transformers library built on Baidu's PaddlePaddle framework, meant to give PaddlePaddle the same model interfaces as Hugging Face's Transformers, with training for large language models and vision-language models. It supports more than 100 models, including DeepSeek-V3 and V4, the GLM-4.5 series, Qwen2, Qwen3 and Qwen3-VL, ERNIE-4.5 and PaddleOCR-VL, and covers pretraining and post-training: continued pretraining, SFT, LoRA and DPO. It uses tensor, pipeline, expert and context parallelism, FP8 training and mixed precision, and saves models as Safetensors in the same format as Hugging Face's weights, so tools such as vLLM and SGLang can serve them. It also runs on Chinese accelerators such as Kunlunxin P800.
Problems it solves
- fine-tune DeepSeek or Qwen models on PaddlePaddle instead of PyTorch
- train a large language model with tensor and expert parallelism on Chinese accelerators
- a Hugging Face Transformers equivalent for the PaddlePaddle framework
Features
- training for more than 100 large language and vision-language models
- pretraining and post-training with SFT, LoRA and DPO
- tensor, pipeline, expert and context parallelism with FP8 training
- saves models as Safetensors in Hugging Face's weight format
Limitations
- It needs Python 3.10 or later, and its README is in Chinese.1
Alternatives
The same job
These do what PaddleFormers does.
- torchtitan A PyTorch-native platform for training generative AI models at scale
- Axolotl A free and open source framework for fine-tuning and post-training large language models
- Colossal-AI PyTorch library for distributed training, fine-tuning and inference of large AI models
- ms-swift Fine-tune, align, evaluate, quantize and deploy 600+ LLMs and 400+ multimodal models
- LlamaFactory An open source framework for fine-tuning 100+ language and vision-language models from a CLI or a web UI
- KTransformers Run and fine-tune huge mixture-of-experts LLMs on limited GPUs by splitting work between CPU and GPU
