We’re pleased to share an open source collaboration between Hugging Face and PaddlePaddle on a shared mission to advance and democratize AI through open source!
First open sourced by Baidu in 2016, PaddlePaddle enables developers of all skill levels to adopt and implement Deep Learning at scale. As of Q4 2022, PaddlePaddle is getting used by greater than 5.35 million developers and 200,000 enterprises, rating first when it comes to market share amongst Deep Learning platforms in China. PaddlePaddle features popular open source repositories reminiscent of the Paddle Deep Learning Framework, model libraries across different modalities (e.g. PaddleOCR, PaddleDetection, PaddleNLP, PaddleSpeech), PaddleSlim for model compression, FastDeploy for model deployment and plenty of more.
With PaddleNLP leading the best way, PaddlePaddle will step by step integrate its libraries with the Hugging Face Hub. You’ll soon find a way to play with the complete suite of awesome pre-trained PaddlePaddle models across text, image, audio, video and multi-modalities on the Hub!
Find PaddlePaddle Models
You’ll find all PaddlePaddle models on the Model Hub by filtering with the PaddlePaddle library tag.
There are already over 75 PaddlePaddle models on the Hub. For instance, you could find our multi-task Information Extraction model series UIE, State-of-the-Art Chinese Language Model ERNIE 3.0 model series, novel document pre-training model Ernie-Layout with layout knowledge enhancement in the entire workflow and so forth.
You’re also welcome to envision out the PaddlePaddle org on the HuggingFace Hub. In additional to the above-mentioned models, you may as well explore our Spaces, including our text-to-image Ernie-ViLG, cross-modal Information Extraction engine UIE-X and awesome multilingual OCR toolkit PaddleOCR.
Inference API and Widgets
PaddlePaddle models can be found through the Inference API, which you’ll be able to access through HTTP with cURL, Python’s requests library, or your chosen method for making network requests.
Models that support a task are equipped with an interactive widget that means that you can play with the model directly within the browser.
Use Existing Models
If you must see the right way to load a particular model, you may click Use in paddlenlp (or other PaddlePaddle libraries in the long run) and also you can be given a working snippet that to load it!
Share Models
Depending on the PaddlePaddle library, it’s possible you’ll find a way to share your models by pushing to the Hub. For instance, you may share PaddleNLP models through the use of the save_to_hf_hub method.
from paddlenlp.transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("PaddlePaddle/ernie-3.0-base-zh", from_hf_hub=True)
model = AutoModelForMaskedLM.from_pretrained("PaddlePaddle/ernie-3.0-base-zh", from_hf_hub=True)
tokenizer.save_to_hf_hub(repo_id="/" )
model.save_to_hf_hub(repo_id="/" )
Conclusion
PaddlePaddle is an open source Deep Learning platform that originated from industrial practice and has been open-sourcing modern and industry-grade projects since 2016. We’re excited to hitch the Hub to share our work with the HuggingFace community and you may expect more fun and State-of-the-Art projects from us soon! To not sleep so far with the most recent news, you may follow us on Twitter at @PaddlePaddle.



