BigDL: a Distributed Deep Learning Library on Spark Zhichao Li

Big Data Technology Team, Software and Service Group, Intel

Intel® Confidential — INTERNAL USE ONLY

Outline o What’s BigDL o Why BigDL o Inside BigDL o What can BigDL do

https://github.com/intel-analytics/BigDL

2

WhAT IS BigDL?

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

3

BigDL: Deep learning on Apache Spark* BigDL open sourced on Dec 30, 2016  Apache Spark*, MKL Acceleration, High performance

Rich function  Scala/Java + Python  AlexNet, GoogleNet, VGG, Faster R-CNN, SSD, Deep Speech, Recommendation…  TensorBoard, Notebook, caffe/torch/tensorflow load/export…

Popularity  Support from Cloud: Microsoft, Amazon, Cloudera, Databricks…

https://github.com/intel-analytics/BigDL

4

Basic Component Layers Tensor:  ND-array data structure

 113+ layers (Conv, 3D Conv, Pooling, 3D Pooling, FC …)

 Generic data type

Criterion

 Rich and fast math operations (powered by Intel MKL)

 23+ criterions (DiceCoefficient, ClassNLL, CrossEntropy …) Optimization  SGD, Adagrad

 Community contribution: Adam, Adadelta, RMSprop, Adamx https://github.com/intel-analytics/BigDL

5

What is BigDL? BigDL is a distributed deep learning library for Apache Spark*

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

6

Why BigDL?

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

7

Why BigDL There’re a lot of deep learning frameworks. Only list a part of them

https://github.com/intel-analytics/BigDL

8

Why BigDL? Production ML/DL system is Complex and Distributed. Spark-based Deep Learning library is a natural fit

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

9

Why BigDL BigDL: Run deep learning on Big Data platform Outstanding features  Massively distributed  Fault tolerance  Elasticity  Dynamic resource sharing  …

https://github.com/intel-analytics/BigDL

10

FinTech: Transaction Fraud Detection • Historical data is stored on Hive • Data preprocessing with SparkSQL • Spark ML pipeline for complex feature engineering • Use multiple BigDL CNN models • Use Sample+Bagging to solve unbalance problem • Grid search for hyper parameter tuning

https://github.com/intel-analytics/BigDL

Powered by BigDL

https://software.intel.com/bigdl

11

BigDL Features • Single node Xeon performance • Benchmarked to be best on Xeon E5-26XX v3 or E5-26XX v4 • Orders of magnitude speedup vs. out-of-box open source Caffe, Torch • Scaling-out • Efficiently scales out to 10s~100s of Xeon servers on Spark

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

12

Why BigDL People use BigDL to build applications • Large internet company • Financial company • Manufactory company • Medical school

Image, Recommendation, Fraud detection, Audio, NLP

https://github.com/intel-analytics/BigDL

13

Inside BigDL

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

14

Pattern Model Parallelism Data Parallelism

Source: Dean J, Corrado G, Monga R, et al. Large scale distributed deep networks[C]//Advances in neural information processing systems. 2012: 1223-1231.

https://github.com/intel-analytics/BigDL

15

Communication Model

Driver

All to one

35

2

35

5

5

Task

Task

Task

35

Task

7

35

2

Task

14

35

4

Task

Parameter Server

10

11

Task

35 1

35

Task

Task

6

1

All reduce (tree aggregation)

https://github.com/intel-analytics/BigDL

6

Task All reduce

16

Bulk Synchronous Parallel (BSP) worker1

1 1

worker2

1

worker3

worker4

3

2

1

https://github.com/intel-analytics/BigDL

3

2 2 2

3 3

17

Asynchronous Synchronous Parallel (ASP)

1

worker1

1

worker3

worker4

2

1

worker2

1

2 3

4

3

2 2

5

3

4

Source: Dean J, Corrado G, Monga R, et al. Large scale distributed deep networks[C]//Advances in neural information processing systems. 2012: 1223-1231.

https://github.com/intel-analytics/BigDL

18

BigDL Features Distributed Deep learning applications on Apache Spark* • No changes to the existing Hadoop/Spark clusters needed

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

20

Python API Support Based on PySpark, Python API in BigDL allows use of existing Python libs: • Numpy • Scipy • Pandas • Scikit-learn

• Matplotlib • …

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

21

Jupyter Notebook support Running BigDL applications directly in Jupyter notebooks  Share and Reproduce – Notebooks can be shared with others – Easy to reproduce and track

 Rich Content – Texts, images, videos, LaTeX and JavaScript – Code can also produce rich contents

 Rich toolbox – Apache Spark, from Python, R and Scala – Pandas, scikit-learn, ggplot2, dplyr, etc

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

22

Python API RDD[raw data]

Transform (python)

https://github.com/intel-analytics/BigDL

RDD[Samle(ndarray,ndarray)]

Train(python model)

23

Visualization of optimization process - tensorboard BigDL integration with TensorBoard • TensorBoard is a suite of web applications from Google for visualizing and understanding deep learning applications

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

24

BigDL integration with spark ml Integrates with Spark-ML Pipeline:

DataFrame

• Wrapper with Spark ML Transformer • BigDL Plugs into Spark ML pipeline

Transfomer1

• Support Spark v1.5/1.6/2.0/2.1 Transfomer2

… DLClassifer

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

25

BigDL Features Tight Integrations with Spark SQL, DataFrame and Structured Streaming Kafka

File

Data Frame

(Batch/Stream)

BigDL UDF

df.select($’image’) .withColumn( “image_type”, ImgClassifier(“image”)) .filter($’image_type’ == ‘dog’)

Filtered Data Frame

(Batch/Stream) *Image classification on ImageNet(http://www.image-net.org)

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

26

Natural Language Model - RNN RNN: • Recurrent

• BiRecurrent

Cell: • SimpleRNN • LSTM • GRU

Source: http://colah.github.io/posts/2015-08-Understanding-LSTMs/

• LSTM with peepholes https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

27

BigDL: design for big data  Standard Spark Programs (Python and Scala)  Easy to deploy on top of Existing Spark or Hadoop clusters.

 Rich deep learning support, close integrate with other big data work load  Interact with other deep learning framework.  High performance powered by Intel MKL and multi-threaded programming  Efficient scale-out with an all-reduce communications on Spark

https://github.com/intel-analytics/BigDL

28

What CAN BigDL do https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

29

Object Detection on PASCAL

*(http://host.robots.ox.ac.uk/pascal/VOC/)

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

30

Visual recognition and Object Detection Faster-RCNN

https://github.com/intel-analytics/BigDL

SSD: Single Shot MultiBox Detector

https://software.intel.com/bigdl

31

Model Persistent • Model Snapshot •

Long training work checkpoint



Model deployment and sharing



Fine-tune

BigDL Model File Caffe Model File

Load

BigDL

Torch Model File Tensorflow Model File

Save

• Caffe/Torch/Tensorflow Model Support •

Model file load



Easy to migrate your caffe/torch/tensorflow

Storage

work to Spark

https://github.com/intel-analytics/BigDL

32

SSD Pipeline RDD[ByteImage] Raw Data

Preprocess

Pre-trained Model

prediction

Resize Normalize ToBatch

BigDL SSD Model

Ground Truth

https://github.com/intel-analytics/BigDL

Postprocessor

Validation

Visualizer

Boxes & scores

RDD[Tensor]

MAP 33

Deep Speech 2 on BigDL: Model conv biRNN 1 biRNN 2

...

biRNN k

9 layers biRNN: >50 Million parameters

affine softmax CTC

https://github.com/intel-analytics/BigDL

34

BigDL is an open source project • Positive feedback from community • 1.7k+ stars, • Feature request from community(3D Conv, visualization …) • PRs from community • Already see some adoptions

https://github.com/intel-analytics/BigDL

35

Documents • Start with tutorials https://github.com/intel-analytics/BigDL-Tutorials/ • BigDL provide examples to help developer play with bigdl and start with popular models. •

Vgg, Inception, AlexNet, ResNet, RNN



Text Classification, Image Classification, Load Torch/Caffe model

https://github.com/intel-analytics/BigDL/wiki/Examples • BigDL Out-of-box run scripts on AWS https://github.com/intel-analytics/BigDL/wiki/Running-on-EC2

https://github.com/intel-analytics/BigDL

36

BigDL installation on major cloud frameworks. • “Apache Spark BigDL on Databricks” https://databricks.com/blog/2017/02/09/intels-bigdl-databricks.html • “BigDL on Cloudera’s CDH Data Science Virtual Machine” http://blog.cloudera.com/blog/2017/04/bigdl-on-cdh-and-clouderadata-science-workbench/ • “How to use BigDL on Apache Spark for Azure HDInsight” https://blogs.msdn.microsoft.com/azuredatalake/2017/03/17/how-touse-bigdl-on-apache-spark-for-azure-hdinsight/ •

“BigDL on Microsoft’s Data Science Virtual Machine” Coming soon

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

37

BigDL installation on major cloud frameworks - 2. • “Apache Spark BigDL on AWS” https://github.com/intel-analytics/BigDL/wiki/Running-on-EC2 • “Apache Spark BigDL for E-MapReduce on Ali Cloud ” https://yq.aliyun.com/articles/73347

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

38

BigDL On github https://github.com/intel-analytics/BigDL

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

39

BIGDL Community Join Our Mail List [email protected]

Report Bugs And Create Feature Request https://github.com/intel-analytics/BigDL/issues https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

40

Legal Disclaimer INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. A "Mission Critical Application" is any application in which failure of the Intel Product could result, directly or indirectly, in personal injury or death. SHOULD YOU PURCHASE OR USE INTEL'S PRODUCTS FOR ANY SUCH MISSION CRITICAL APPLICATION, YOU SHALL INDEMNIFY AND HOLD INTEL AND ITS SUBSIDIARIES, SUBCONTRACTORS AND AFFILIATES, AND THE DIRECTORS, OFFICERS, AND EMPLOYEES OF EACH, HARMLESS AGAINST ALL CLAIMS COSTS, DAMAGES, AND EXPENSES AND REASONABLE ATTORNEYS' FEES ARISING OUT OF, DIRECTLY OR INDIRECTLY, ANY CLAIM OF PRODUCT LIABILITY, PERSONAL INJURY, OR DEATH ARISING IN ANY WAY OUT OF SUCH MISSION CRITICAL APPLICATION, WHETHER OR NOT INTEL OR ITS SUBCONTRACTOR WAS NEGLIGENT IN THE DESIGN, MANUFACTURE, OR WARNING OF THE INTEL PRODUCT OR ANY OF ITS PARTS. Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined". Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information. The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order. Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or go to: http://www.intel.com/design/literature.htm Intel, Quark, VTune, Xeon, Cilk, Atom, Look Inside and the Intel logo are trademarks of Intel Corporation in the United States and other countries. *Other names and brands may be claimed as the property of others. Copyright © 2015 Intel Corporation.

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

41

Risk Factors The above statements and any others in this document that refer to plans and expectations for the first quarter, the year and the future are forward-looking statements that involve a number of risks and uncertainties. Words such as “anticipates,” “expects,” “intends,” “plans,” “believes,” “seeks,” “estimates,” “may,” “will,” “should” and their variations identify forward-looking statements. Statements that refer to or are based on projections, uncertain events or assumptions also identify forward-looking statements. Many factors could affect Intel’s actual results, and variances from Intel’s current expectations regarding such factors could cause actual results to differ materially from those expressed in these forward-looking statements. Intel presently considers the following to be the important factors that could cause actual results to differ materially from the company’s expectations. Demand could be different from Intel's expectations due to factors including changes in business and economic conditions; customer acceptance of Intel’s and competitors’ products; supply constraints and other disruptions affecting customers; changes in customer order patterns including order cancellations; and changes in the level of inventory at customers. Uncertainty in global economic and financial conditions poses a risk that consumers and businesses may defer purchases in response to negative financial events, which could negatively affect product demand and other related matters. Intel operates in intensely competitive industries that are characterized by a high percentage of costs that are fixed or difficult to reduce in the short term and product demand that is highly variable and difficult to forecast. Revenue and the gross margin percentage are affected by the timing of Intel product introductions and the demand for and market acceptance of Intel's products; actions taken by Intel's competitors, including product offerings and introductions, marketing programs and pricing pressures and Intel’s response to such actions; and Intel’s ability to respond quickly to technological developments and to incorporate new features into its products. The gross margin percentage could vary significantly from expectations based on capacity utilization; variations in inventory valuation, including variations related to the timing of qualifying products for sale; changes in revenue levels; segment product mix; the timing and execution of the manufacturing ramp and associated costs; start-up costs; excess or obsolete inventory; changes in unit costs; defects or disruptions in the supply of materials or resources; product manufacturing quality/yields; and impairments of long-lived assets, including manufacturing, assembly/test and intangible assets. Intel's results could be affected by adverse economic, social, political and physical/infrastructure conditions in countries where Intel, its customers or its suppliers operate, including military conflict and other security risks, natural disasters, infrastructure disruptions, health concerns and fluctuations in currency exchange rates. Expenses, particularly certain marketing and compensation expenses, as well as restructuring and asset impairment charges, vary depending on the level of demand for Intel's products and the level of revenue and profits. Intel’s results could be affected by the timing of closing of acquisitions and divestitures. Intel's results could be affected by adverse effects associated with product defects and errata (deviations from published specifications), and by litigation or regulatory matters involving intellectual property, stockholder, consumer, antitrust, disclosure and other issues, such as the litigation and regulatory matters described in Intel's SEC reports. An unfavorable ruling could include monetary damages or an injunction prohibiting Intel from manufacturing or selling one or more products, precluding particular business practices, impacting Intel’s ability to design its products, or requiring other remedies such as compulsory licensing of intellectual property. A detailed discussion of these and other factors that could affect Intel’s results is included in Intel’s SEC filings, including the company’s most recent reports on Form 10-Q, Form 10-K and earnings release.

https://github.com/intel-analytics/BigDL

https://software.intel.com/bigdl

42

Intel® Software Template Overview - GitHub

Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or go to: http://www.intel.com/design/literature.htm. Intel, Quark, VTune, Xeon, Cilk, Atom, Look Inside and the Intel logo are trademarks of Intel Corporation in the ...

2MB Sizes 3 Downloads 89 Views

Recommend Documents

Intel® Software Template Overview - GitHub
“Table 13 shows that the DS2 system outperforms humans in 3 out of the 4 test sets and is competitive on the fourth. Given this result, we suspect that there is little room for a generic speech system to further improve on clean read speech without

Overview - GitHub
This makes it impossible to update clones. When this happens, ... versions of the Yocto kernel (from the Yocto repository, or the Intel Github repositories on ...

Overview - GitHub
Switch system is mobile Cashier backend sale system for merchants, which provides the following base features: Management of Partners, Merchants, Users, Cashiers, Cash registers, mPOS Terminals and Merchant's Product catalogues. Processing Sales with

Inside Intel Management Engine - GitHub
enable closed chassis debug through a USB3 port from Intel silicon. • Intel DCI provides access to CPU/PCH JTAG via USB3.0. • Software is available without NDA (Intel System Studio). • There are two types of DCI hosting interfaces in the platfo

Iraq Country Overview - GitHub
is widespread contamination through sophisticated explosive devices, pockets of volatility and reports of violence countrywide. (UN OCHA July. Humanitarian Bulletin). • Internal displacement continues in low numbers throughout Ninewa. Families arri

Overview Instructions - GitHub
The build produces a kernel image, a root file system, and kernel header ... git1+973494766d7ca2401e3138f28b6257a5b899cf1d-r0/linux-lsisim-standard-build.

MeerKAT Overview - GitHub
Youth Into Science – skills development and training programme. ○. African VLBI Network. MeerKAT focus today… SKA SKA Project .... KAT-7 Software ...

IARPA Overview - GitHub
May 11, 2017 - 1. Coast Guard. Central Intelligence Agency. Army. Navy. Air Force. National ... We emphasize technical excellence & technical truth ...

Overview Instruction - GitHub
IMAGE_FSTYPES += "ext2". PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-custom". Other optional settings for saving disk space and build time:.

Overview Instructions - GitHub
With U-Boot as the boot loader, the above need to be put into a format that U-Boot understands. The following describes using the FIT format (see doc/uImage.

BreedR Overview - GitHub
6 0 56. 72. 0. 55 1. 14 13. 4.775. 9 0 55. 73. 0. 22 1. 8. 13. 19.099 12 0 22. 74. 0 .... Predicted genetic values vs. ...... Plus some more specific metagene functions:.

Overview Instructions - GitHub
Just the Linux kernel. • Linux and the device tree. • Linux, the device tree, and a root file system. The simulator only supports using separate images for Linux ...

Overview Branches - GitHub
convention for a custom branch is custom-[organization domain]. For example custom- ccvonline. It is up to each of those organizations to determine how their ...

Overview Building - GitHub
Using the external or internal host, after loading the RTE,. $ ncpBootMem -a ... ACP2=> tftp 4010000 . ACP2=> ssp w 0 ...

Calendar Template - GitHub
Calendar Template is an Enhanced Studio sub-extension to create custom ... http://www.sugarforge.org/frs/download.php/6509/Generic_Extension_Install.1.2.pdf .... application which view the field must appear in, an additional word selected ...

JACoW Template v2016 - GitHub
practical examples of usage of Taurus ranging from a very small experimental setup controlled by a single. Raspberry Pi, to ... wide range of contexts, from large facilities with thousands of controllable parameters to single-instrument ... by LASER

Red Leaves implant - overview - GitHub
Mar 9, 2017 - 0x24. Enumerate users (including RDP / terminal services). 0x28 ..... 6https://www.cylance.com/en_us/blog/the-deception-project-a-new- ...

Intel ME: Two Years Later - GitHub
In first versions it was included in the network card, later moved into the chipset ... HECI/MEI driver, management services, utilities. AMT SDK, code ... ME Gen 1. ME Gen 2. SEC/TXE. ME versions. 1.x-5.x. 6.x-10.x. 1.x (Bay Trail). Core. ARCTangent-

Software Engineering - GitHub
Sep 26, 2011 - into an application used by nearly a million people to store over two million code ... “Continuous Integration is a software development practice ...

Modern Software Translation - GitHub
Translation memory. ▻ Translate Java, Android and iOS applications. ▻ LDAP integration. ▻ REST API. ▻ Find out more at http://www.jabylon.org.

Chatter REST API Developer Overview - GitHub
Building an application outside the Salesforce platform. • Pull feed and social graph out into another application. • Push notifications and activity into the feed.

Makerspace RFID Lock Management Overview - GitHub
python manage.py loaddata rfid_lock_management/fixtures/initial.json. Run the Django development server. $ python manage.py runserver ... microcontroller (Arduino) that connects to the RFID scanner and operates the locking mechanism. Simulating authe