• Stars
    star
    6,839
  • Rank 5,484 (Top 0.2 %)
  • Language
    C++
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated 9 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PaddlePaddle High Performance Deep Learning Inference Engine for Mobile and Edge (飞桨高性能深度学习端侧推理引擎)

Paddle Lite

English | 简体中文

Documentation Status Release License

Paddle Lite 是一个高性能、轻量级、灵活性强且易于扩展的深度学习推理框架,定位于支持包括移动端、嵌入式以及边缘端在内的多种硬件平台。

当前 Paddle Lite 不仅在百度内部业务中得到全面应用,也成功支持了众多外部用户和企业的生产任务。

快速入门

使用 Paddle Lite,只需几个简单的步骤,就可以把模型部署到多种终端设备中,运行高性能的推理任务,使用流程如下所示:

一. 准备模型

Paddle Lite 框架直接支持模型结构为 PaddlePaddle 深度学习框架产出的模型格式。目前 PaddlePaddle 用于推理的模型是通过 save_inference_model 这个 API 保存下来的。 如果您手中的模型是由诸如 Caffe、Tensorflow、PyTorch 等框架产出的,那么您可以使用 X2Paddle 工具将模型转换为 PaddlePaddle 格式。

二. 模型优化

Paddle Lite 框架拥有优秀的加速、优化策略及实现,包含量化、子图融合、Kernel 优选等优化手段。优化后的模型更轻量级,耗费资源更少,并且执行速度也更快。 这些优化通过 Paddle Lite 提供的 opt 工具实现。opt 工具还可以统计并打印出模型中的算子信息,并判断不同硬件平台下 Paddle Lite 的支持情况。您获取 PaddlePaddle 格式的模型之后,一般需要通过该 opt 工具做模型优化。opt 工具的下载和使用,请参考模型优化方法

三. 下载或编译

Paddle Lite 提供了 Android/iOS/x86/macOS 平台的官方 Release 预测库下载,我们优先推荐您直接下载 Paddle Lite 预编译库,或者从 Release notes 处获取最新的预编译编译库

Paddle Lite 已支持多种环境下的源码编译,为了避免复杂、繁琐的环境搭建过程,我们建议您使用 Docker 统一编译环境搭建 进行编译。当然,您也可以根据宿主机和目标设备的 CPU 架构和操作系统,在源码编译中找到相应的环境搭建及编译指南,自行完成编译环境的搭建。

四. 预测示例

Paddle Lite 提供了 C++、Java、Python 三种 API,并且提供了相应 API 的完整使用示例:

您可以参考示例中的说明快速了解使用方法,并集成到您自己的项目中去。

针对不同的硬件平台,Paddle Lite 提供了各个平台的完整示例:

主要特性

  • 支持多平台:涵盖 Android、iOS、嵌入式 Linux 设备、Windows、macOS 和 Linux 主机
  • 支持多种语言:包括 Java、Python、C++
  • 轻量化和高性能:针对移动端设备的机器学习进行优化,压缩模型和二进制文件体积,高效推理,降低内存消耗

持续集成

System x86 Linux ARM Linux Android (GCC/Clang) iOS
CPU(32bit) Build Status Build Status Build Status Build Status
CPU(64bit) Build Status Build Status Build Status Build Status
OpenCL - - Build Status -
Metal - - - Build Status
华为麒麟 NPU - - Build Status -
华为昇腾 NPU Build Status Build Status - -
昆仑芯 XPU Build Status Build Status - -
昆仑芯 XTCL Build Status Build Status - -
高通 QNN - - Build Status -
寒武纪 MLU Build Status - - -
(瑞芯微/晶晨/恩智浦) 芯原 TIM-VX - Build Status Build Status -
Android NNAPI - - Build Status -
联发科 APU - - Build Status -
颖脉 NPU - Build Status - -
Intel OpenVINO Build Status - - -
亿智 NPU - Build Status - -

架构设计

Paddle Lite 的架构设计着重考虑了对多硬件和平台的支持,并且强化了多个硬件在一个模型中混合执行的能力,多个层面的性能优化处理,以及对端侧应用的轻量化设计。

其中,Analysis Phase 包括了 MIR(Machine IR) 相关模块,能够对原有的模型的计算图针对具体的硬件列表进行算子融合、计算裁剪 在内的多种优化。Execution Phase 只涉及到 Kernel 的执行,且可以单独部署,以支持极致的轻量级部署。

进一步了解 Paddle Lite

如果您想要进一步了解 Paddle Lite,下面是进一步学习和使用 Paddle Lite 的相关内容:

文档和示例

关键技术

FAQ

  • FAQ:常见问题,可以访问 FAQ、搜索 Issues、或者通过页面底部的联系方式联系我们

贡献代码

  • 贡献代码:如果您想一起参与 Paddle Lite 的开发,贡献代码,请访问开发者共享文档

交流与反馈

  • AIStudio 实训平台端测部署系列课程:https://aistudio.baidu.com/aistudio/course/introduce/22690
  • 欢迎您通过 Github Issues 来提交问题、报告与建议
  • 技术交流微信群:添加 wechat id:baidupaddle或扫描下方微信二维码,添加并回复小助手“端侧”,系统自动邀请加入;技术群 QQ 群: 一群696965088(已满) ;二群,959308808;

     

   微信公众号                官方技术交流QQ群

  • 如果您对我们的工作感兴趣,也欢迎加入我们

版权和许可证

Paddle Lite由 Apache-2.0 license 提供。

More Repositories

1

PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
Python
38,354
star
2

Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
C++
21,619
star
3

PaddleHub

Awesome pre-trained models toolkit based on PaddlePaddle. (400+ models including Image, Text, Audio, Video and Cross-Modal with Easy Inference & Serving)
Python
12,439
star
4

PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Python
12,003
star
5

PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
Python
11,233
star
6

PaddleSpeech

Easy-to-use Speech Toolkit including Self-Supervised Learning model, SOTA/Streaming ASR with punctuation, Streaming TTS with text frontend, Speaker Verification System, End-to-End Speech Translation and Keyword Spotting. Won NAACL2022 Best Demo Award.
Python
10,060
star
7

PaddleSeg

Easy-to-use image segmentation library with awesome pre-trained model zoo, supporting wide-range of practical tasks in Semantic Segmentation, Interactive Segmentation, Panoptic Segmentation, Image Matting, 3D Segmentation, etc.
Python
8,188
star
8

PaddleGAN

PaddlePaddle GAN library, including lots of interesting applications like First-Order motion transfer, Wav2Lip, picture repair, image editing, photo2cartoon, image style transfer, GPEN, and so on.
Python
7,661
star
9

models

Officially maintained, supported by PaddlePaddle, including CV, NLP, Speech, Rec, TS, big models and so on.
Python
6,868
star
10

ERNIE

Official implementations for various pre-training models of ERNIE-family, covering topics of Language Understanding & Generation, Multimodal Understanding & Generation, and beyond.
Python
6,197
star
11

PaddleClas

A treasure chest for visual classification and recognition powered by PaddlePaddle
Python
5,244
star
12

VisualDL

Deep Learning Visualization Toolkit(『飞桨』深度学习可视化工具 )
HTML
4,716
star
13

PaddleX

PaddlePaddle End-to-End Development Toolkit(『飞桨』深度学习全流程开发工具)
Python
4,564
star
14

PaddleRec

Recommendation Algorithm大规模推荐算法库,包含推荐系统经典及最新算法LR、Wide&Deep、DSSM、TDM、MIND、Word2Vec、Bert4Rec、DeepWalk、SSR、AITM,DSIN,SIGN,IPREC、GRU4Rec、Youtube_dnn、NCF、GNN、FM、FFM、DeepFM、DCN、DIN、DIEN、DLRM、MMOE、PLE、ESMM、ESCMM, MAML、xDeepFM、DeepFEFM、NFM、AFM、RALM、DMR、GateNet、NAML、DIFM、Deep Crossing、PNN、BST、AutoInt、FGCNN、FLEN、Fibinet、ListWise、DeepRec、ENSFM,TiSAS,AutoFIS等,包含经典推荐系统数据集criteo 、movielens等
Python
4,100
star
15

PARL

A high-performance distributed training framework for Reinforcement Learning
Python
3,182
star
16

awesome-DeepLearning

深度学习入门课、资深课、特色课、学术案例、产业实践案例、深度学习知识百科及面试题库The course, case and knowledge of Deep Learning and AI
Jupyter Notebook
2,752
star
17

book

Deep Learning 101 with PaddlePaddle (『飞桨』深度学习框架入门教程)
Jupyter Notebook
2,728
star
18

FastDeploy

⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
C++
2,695
star
19

Research

novel deep learning research works with PaddlePaddle
Python
1,694
star
20

PGL

Paddle Graph Learning (PGL) is an efficient and flexible graph learning framework based on PaddlePaddle
Python
1,558
star
21

PaddleSlim

PaddleSlim is an open-source library for deep model compression and architecture search.
Python
1,507
star
22

PaddleVideo

Awesome video understanding toolkits based on PaddlePaddle. It supports video data annotation tools, lightweight RGB and skeleton based action recognition model, practical applications for video tagging and sport action detection.
Python
1,392
star
23

Paddle.js

Paddle.js is a web project for Baidu PaddlePaddle, which is an open source deep learning framework running in the browser. Paddle.js can either load a pre-trained model, or transforming a model from paddle-hub with model transforming tools provided by Paddle.js. It could run in every browser with WebGL/WebGPU/WebAssembly supported. It could also run in Baidu Smartprogram and WX miniprogram.
JavaScript
928
star
24

Serving

A flexible, high-performance carrier for machine learning models(『飞桨』服务化部署框架)
C++
869
star
25

PaddleHelix

Bio-Computing Platform Featuring Large-Scale Representation Learning and Multi-Task Deep Learning “螺旋桨”生物计算工具集
Python
784
star
26

RocketQA

🚀 RocketQA, dense retrieval for information retrieval and question answering, including both Chinese and English state-of-the-art models.
Python
742
star
27

X2Paddle

Deep learning model converter for PaddlePaddle. (『飞桨』深度学习模型转换工具)
Python
713
star
28

Knover

Large-scale open domain KNOwledge grounded conVERsation system based on PaddlePaddle
Python
670
star
29

Paddle-Lite-Demo

lib, demo, model, data
C++
640
star
30

Paddle2ONNX

ONNX Model Exporter for PaddlePaddle
Python
637
star
31

Parakeet

PAddle PARAllel text-to-speech toolKIT (supporting Tacotron2, Transformer TTS, FastSpeech2/FastPitch, SpeedySpeech, WaveFlow and Parallel WaveGAN)
Python
599
star
32

FlyCV

FlyCV is a high-performance library for processing computer visual tasks.
C++
560
star
33

Anakin

High performance Cross-platform Inference-engine, you could run Anakin on x86-cpu,arm, nv-gpu, amd-gpu,bitmain and cambricon devices.
C++
530
star
34

Paddle3D

A 3D computer vision development toolkit based on PaddlePaddle. It supports point-cloud object detection, segmentation, and monocular 3D object detection models.
Python
529
star
35

Quantum

Jupyter Notebook
528
star
36

PaddleYOLO

🚀🚀🚀 YOLO series of PaddlePaddle implementation, PP-YOLOE+, RT-DETR, YOLOv5, YOLOv6, YOLOv7, YOLOv8, YOLOX, YOLOv5u, YOLOv7u, YOLOv6Lite, RTMDet and so on. 🚀🚀🚀
Python
500
star
37

PaddleFL

Federated Deep Learning in PaddlePaddle
Python
480
star
38

VIMER

视觉预训练基础模型仓库
Python
479
star
39

PaddleTS

Awesome Easy-to-Use Deep Time Series Modeling based on PaddlePaddle, including comprehensive functionality modules like TSDataset, Analysis, Transform, Models, AutoTS, and Ensemble, etc., supporting versatile tasks like time series forecasting, representation learning, and anomaly detection, etc., featured with quick tracking of SOTA deep models.
Python
444
star
40

PaddleFleetX

飞桨大模型开发套件,提供大语言模型、跨模态大模型、生物计算大模型等领域的全流程开发工具链。
Python
417
star
41

PaddleRS

Awesome Remote Sensing Toolkit based on PaddlePaddle.
Python
330
star
42

PaddleSpatial

PaddleSpatial is an open-source spatial-temporal computing tool based on PaddlePaddle.
GLSL
316
star
43

PaddleCloud

PaddlePaddle Docker images and K8s operators for PaddleOCR/Detection developers to use on public/private cloud.
Go
279
star
44

ERNIE-SDK

ERNIE Bot Agent is a Large Language Model (LLM) Agent Framework, powered by the advanced capabilities of ERNIE Bot and the platform resources of Baidu AI Studio.
Jupyter Notebook
274
star
45

MetaGym

Collection of Reinforcement Learning / Meta Reinforcement Learning Environments.
Python
267
star
46

PASSL

PASSL包含 SimCLR,MoCo v1/v2,BYOL,CLIP,PixPro,simsiam, SwAV, BEiT,MAE 等图像自监督算法以及 Vision Transformer,DEiT,Swin Transformer,CvT,T2T-ViT,MLP-Mixer,XCiT,ConvNeXt,PVTv2 等基础视觉算法
Python
257
star
47

PaddleScience

PaddleScience is SDK and library for developing AI-driven scientific computing applications based on PaddlePaddle.
Python
234
star
48

docs

Documentations for PaddlePaddle
Python
230
star
49

InterpretDL

InterpretDL: Interpretation of Deep Learning Models,基于『飞桨』的模型可解释性算法库。
Python
226
star
50

Paddle-Inference-Demo

C++
223
star
51

PaddleRobotics

PaddleRobotics is an open-source algorithm library for robots based on Paddle, including open-source parts such as human-robot interaction, complex motion control, environment perception, SLAM positioning, and navigation.
Python
210
star
52

PaddleMIX

Paddle Multimodal Integration and eXploration, supporting mainstream multi-modal tasks, including end-to-end large-scale multi-modal pretrain models and diffusion model toolbox. Equipped with high performance and flexibility.
Python
207
star
53

TrustAI

飞桨可信AI
Python
179
star
54

ElasticCTR

ElasticCTR,即飞桨弹性计算推荐系统,是基于Kubernetes的企业级推荐系统开源解决方案。该方案融合了百度业务场景下持续打磨的高精度CTR模型、飞桨开源框架的大规模分布式训练能力、工业级稀疏参数弹性调度服务,帮助用户在Kubernetes环境中一键完成推荐系统部署,具备高性能、工业级部署、端到端体验的特点,并且作为开源套件,满足二次深度开发的需求。
Python
176
star
55

PALM

a Fast, Flexible, Extensible and Easy-to-use NLP Large-scale Pretraining and Multi-task Learning Framework.
Python
174
star
56

AutoDL

Python
158
star
57

PLSC

Paddle Large Scale Classification Tools,supports ArcFace, CosFace, PartialFC, Data Parallel + Model Parallel. Model includes ResNet, ViT, Swin, DeiT, CaiT, FaceViT, MoCo, MAE, ConvMAE, CAE.
Python
142
star
58

CINN

Compiler Infrastructure for Neural Networks
C++
139
star
59

LiteKit

Off-The-Shelf AI Development Kit for APP Developers based on Paddle Lite (『飞桨』移动端开箱即用AI套件, 包含Java & Objective C接口支持)
Objective-C
131
star
60

PaddleFlow

Go
104
star
61

PaddleDTX

Paddle with Decentralized Trust based on Xuperchain
Go
87
star
62

PaddleSports

Python
86
star
63

XWorld

A C++/Python simulator package for reinforcement learning
C++
84
star
64

hapi

hapi is a High-level API that supports both static and dynamic execution modes
Jupyter Notebook
76
star
65

benchmark

Python
74
star
66

PaddleSleeve

PaddleSleeve
Python
70
star
67

Mobile

Embedded and Mobile Deployment
Python
70
star
68

community

PaddlePaddle Developer Community
Jupyter Notebook
66
star
69

PaConvert

Code Convert to PaddlePaddle Toolkit
Python
66
star
70

PaddleDepth

Python
58
star
71

PaddleCustomDevice

PaddlePaddle custom device implementaion. (『飞桨』自定义硬件接入实现)
C++
49
star
72

PaddlePaddle.org

PaddlePaddle.org is the repository for the website of the PaddlePaddle open source project.
CSS
48
star
73

PaddleTest

PaddlePaddle TestSuite
Python
43
star
74

PaDiff

Paddle Automatically Diff Precision Toolkits.
Python
42
star
75

EasyData

Python
35
star
76

epep

Easy & Effective Application Framework for PaddlePaddle
Python
34
star
77

paddle-ce-latest-kpis

Paddle Continuous Evaluation, keep updating.
Python
26
star
78

VisionTools

Python
22
star
79

Contrib

contribution works with PaddlePaddle from the third party developers
Python
20
star
80

PaddleCraft

Take neural networks as APIs for human-like AI.
Python
20
star
81

PaddleTransfer

飞桨迁移学习算法库
Python
19
star
82

recordio

An implementation of the RecordIO file format.
Go
19
star
83

continuous_evaluation

Macro Continuous Evaluation Platform for Paddle.
Python
19
star
84

Perf

SOTA benchmark
Python
17
star
85

Paddle-bot

Python
17
star
86

examples

Python
17
star
87

continuous_integration

Python
16
star
88

tape

C++
14
star
89

PaddleSOT

A Bytecode level Implementation of Symbolic OpCode Translator For PaddlePaddle
Python
14
star
90

paddle_upgrade_tool

upgrade paddle-1.x to paddle-2.0
Python
12
star
91

talks

Shell
6
star
92

CLA

5
star
93

any

Legacy Repo only for PaddlePaddle with version <= 1.3
C++
5
star