Spark NLP 5.4.0: Launching OpenVINO Runtime Integration, Advanced Model Support for LLMs, Enhanced Performance with New Annotators, Improved Cloud Scalability, and Comprehensive Updates Across the Board! #14337
maziyarpanahi
announced in
Announcement
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
📢 It's All About LLMs!
We're excited to share some amazing updates in the latest Spark NLP release of Spark NLP 🚀 5.4.0! This update is packed with new features and improvements that are set to transform natural language processing. One of the highlights is the integration of OpenVINO Runtime, which significantly boosts performance and efficiency across Intel hardware. You can now enjoy up to a 40% increase in performance compared to TensorFlow, with support for various model formats like ONNX, PaddlePaddle, TensorFlow, and TensorFlow Lite.
We've also added some powerful new annotators:
BertEmbeddings
,RoBertaEmbeddings
, andXlmRoBertaEmbeddings
. These are specially fine-tuned to take full advantage of the OpenVINO toolkit, offering better model accuracy and speed.Another big change is in how we distribute models. We've moved from Broadcast to
addFile
for model distribution, which makes it easier to scale and manage large language models (LLMs) in cloud environments. This is especially helpful for models with over 7 billion parameters.In addition, we've introduced the
Mistral
andPhi-2
architectures, optimized for high-efficiency quantization. There are also practical improvements to core components, like enhanced pooling for BERT-based models and updates to the OpenAIEmbeddings annotator for better performance and integration.We want to thank our community for their valuable feedback, feature requests, and contributions. Our Models Hub now contains over 37,000+ free and truly open-source models & pipelines. 🎉
Spark NLP ❤️ OpenVINO
🔥 New Features & Enhancements
NEW Integration: OpenVINO Runtime for Spark NLP 🚀: We're thrilled to announce the integration of OpenVINO Runtime, enhancing Spark NLP with high-performance inference capabilities. OpenVINO Runtime supports direct reading of models in
ONNX
,PaddlePaddle
,TensorFlow
, andTensorFlow Lite
formats, enabling out-of-the-box optimizations and superior performance on supported Intel hardware.Enhanced Model Support and Performance Gains: The integration allows Spark NLP to utilize the OpenVINO Runtime API for Java, facilitating the loading and execution of models across various formats including ONNX, PaddlePaddle, TensorFlow, TensorFlow Lite, and OpenVINO IR. Impressively, benchmarks show up to a 40% performance improvement over TensorFlow with no additional tuning required. Additionally, users can harness the full optimization and quantization capabilities of the OpenVINO toolkit via the Model Conversion API.
Enabled Annotators: This update brings OpenVINO compatibility to a range of Spark NLP annotators, including
BertEmbeddings
,RoBertaEmbeddings
,XlmRoBertaEmbeddings
,T5Transformer
,E5Embeddings
,LLAMA2
,Mistral
,Phi2
, andM2M100
.Acknowledgements: This significant enhancement was accomplished during Google Summer of Code 2023. Special thanks to Rajat Krishna (@rajatkrishna) and the entire OpenVINO team for their invaluable support and collaboration. #14200
Mistral
integration, featuring models fine-tuned on theMistralForCasualLM
architecture. This addition enhances performance and efficiency by supporting quantization in INT4 and INT8 for CPUs via OpenVINO. SparkNLP - 995 Introducing MistralAI LLMs #14318Continuing our commitment to user-friendly and scalable solutions, the integration of the Mistral architecture has been designed to be straightforward and easily adoptable, ensuring that users can leverage these enhancements without complexity:
Phi-2
, featuring models fine-tuned using thePhiForCausalLM
architecture. This update enhances OpenVINO's capabilities, enabling quantization in INT4 and INT8 for CPUs to optimize both performance and efficiency. SparkNLP - 995 Introducing MistralAI LLMs #14318Continuing our commitment to user-friendly and scalable solutions, the integration of the Phi architecture has been designed to be straightforward and easily adoptable, ensuring that users can leverage these enhancements without complexity:
addFile
for deep learning distribution across any cluster. This change addresses the challenges of handling modern LLMs—some boasting over 7 billion parameters—by improving memory management and overcoming serialization limits previously encountered with Java Bytes and Apache Spark's Broadcast method. This update significantly boosts Spark NLP's ability to process LLMs efficiently, underscoring our dedication to delivering scalable NLP solutions.[SPARKNLP-1037] Adding addFile changes to to replace broadcast in all ONNX based annotators #14236NEW: MPNetForTokenClassification Annotator: Introducing the
MPNetForTokenClassification
annotator in Spark NLP 🚀. This annotator efficiently loads MPNet models equipped with a token classification head (a linear layer atop the hidden-states output), ideal for Named-Entity Recognition (NER) tasks. It supports models trained or fine-tuned in ONNX format usingMPNetForTokenClassification
for PyTorch orTFCamembertForTokenClassification
for TensorFlow from HuggingFace 🤗. [View Pull Request](Sparknlp 1016 implement mp net for token classification #14322Enhanced Pooling for BERT, RoBERTa, and XLM-RoBERTa: We've added support for average pooling in
BertSentenceEmbeddings
,RoBertaSentenceEmbeddings
, andXLMRoBertaEmbeddings
annotators. This feature is especially useful when the [CLS] token is not fine-tuned for sentence embeddings via average pooling. View Pull RequestRefined OpenAIEmbeddings: Upgraded to support escape characters to prevent JSON content issues, changed the output annotator type from
DOCUMENT
toSENTENCE_EMBEDDINGS
(note: this affects backward compatibility), enhanced output embeddings with metadata from the document column, introduced a Python unit test class, and added a new submodule for reliable saving/loading of the annotator. View Pull RequestNew OpenVINO Notebooks: Released notebooks for exporting HuggingFace models using Optimum Intel and importing into Spark NLP. This update includes notebooks for
BertEmbeddings
,E5Embeddings
,LLAMA2Transformer
,RoBertaEmbeddings
,XlmRoBertaEmbeddings
, andT5Transformer
. View Pull Request🐛 Bug Fixes
Timeout waiting for connection from pool
error that occurred when downloading multiple models simultaneously. View Pull Requestkeras.engine
by updating the transformers version to4.34.1
. View Pull RequestUnsupported model IR version: 10, max supported IR version: 9
by setting the ONNX version toonnx==1.14.0
. View Pull Requestjava.lang.NoSuchMethodError
by ensuring compatibility with Spark 3.4 and updating documentation accordingly. View Pull RequestUAEEmbeddings
. View Pull Request🐛 Dependencies
onnxruntime
to version1.18.0
for enhanced stability and performance on both CPU and GPU.azure-identity
to1.12.2
andazure-storage-blob
to12.26.0
to improve security and integration with Azure services.💾 Models
The complete list of all 37000+ models & pipelines in 230+ languages is available on Models Hub
📓 New Notebooks
📖 Documentation
❤️ Community support
and show off how you use Spark NLP!
Installation
Python
#PyPI pip install spark-nlp==5.4.0
Spark Packages
spark-nlp on Apache Spark 3.0.x, 3.1.x, 3.2.x, 3.3.x, and 3.4.x (Scala 2.12):
GPU
Apple Silicon (M1 & M2)
AArch64
Maven
spark-nlp on Apache Spark 3.0.x, 3.1.x, 3.2.x, 3.3.x, and 3.4.x:
spark-nlp-gpu:
spark-nlp-silicon:
spark-nlp-aarch64:
FAT JARs
CPU on Apache Spark 3.x/3.1.x/3.2.x/3.3.x/3.4.x: https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/jars/spark-nlp-assembly-5.4.0.jar
GPU on Apache Spark 3.0.x/3.1.x/3.2.x/3.3.x/3.4.x: https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/jars/spark-nlp-gpu-assembly-5.4.0.jar
M1 on Apache Spark 3.0.x/3.1.x/3.2.x/3.3.x/3.4.x: https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/jars/spark-nlp-silicon-assembly-5.4.0.jar
AArch64 on Apache Spark 3.0.x/3.1.x/3.2.x/3.3.x/3.4.x: https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/jars/spark-nlp-aarch64-assembly-5.4.0.jar
Pull Requests:
What's Changed
New Contributors
Full Changelog: 5.3.3...5.4.0
This discussion was created from the release Spark NLP 5.4.0: Launching OpenVINO Runtime Integration, Advanced Model Support for LLMs, Enhanced Performance with New Annotators, Improved Cloud Scalability, and Comprehensive Updates Across the Board!.
Beta Was this translation helpful? Give feedback.
All reactions