JohnSnowLabs / spark-nlp

State of the Art Natural Language Processing
https://sparknlp.org/
Apache License 2.0
3.83k stars 710 forks source link

Integrating OpenVINO Runtime in Spark NLP #14200

Closed rajatkrishna closed 4 months ago

rajatkrishna commented 7 months ago

This PR introduces OpenVINO Runtime support in Spark NLP

Description

This PR enables Spark NLP to leverage the OpenVINO Runtime API for Java to load and run models in various formats including ONNX, PaddlePaddle, Tensorflow, Tensorflow Lite and OpenVINO IR format. OpenVINO also enables performance improvements when running on supported intel hardware, with upto 40% improvement vs Tensorflow on benchmarks with no further tuning. You can also take advantage of the full optimization and quantization capabilities offered by the OpenVINO toolkit when exporting/converting the model to the OpenVINO format using the Model Conversion API.

The following annotators have been enabled to work with OpenVINO:

Note: To take advantage of this feature, see these instructions to build OpenVINO jar (Linux), and these to build Spark NLP. OpenVINO is cross-platform. Refer here for Windows build instructions, and here for other platforms.

Motivation and Context

Screenshots (if appropriate):

Types of changes

Checklist: