Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARKNLP-1037] Adding addFile changes to to replace broadcast in all ONNX based annotators #14236

Conversation

danilojsl
Copy link
Contributor

Description

This PR introduces enhancements to the Spark NLP library, focusing on the efficient distribution of ONNX model files across Spark executors. Leveraging Spark's built-in file distribution capabilities, this update aims to optimize the performance and scalability of LLMs within distributed cloud environments.

Motivation and Context

The primary motivation behind this update is to address the challenges associated with deploying and scaling LLMs in cloud-based Spark environments. By utilizing Spark's native support for distributing files across executors, we can significantly enhance the scalability and efficiency of LLM annotators. This is particularly crucial for models like Llama-2 and M2M100, which require access to large ONNX files to function correctly.

This improvement ensures that ONNX models are effectively shared across all nodes in a Spark cluster, reducing the overhead associated with model loading and facilitating faster, more scalable annotations. As a result, users can expect improved performance and a smoother experience when processing large datasets or working in resource-intensive cloud environments.

The integration of these changes represents a significant step forward in our ongoing efforts to optimize Spark NLP for LLM processing, reinforcing our commitment to providing robust, scalable NLP solutions for the cloud.

How Has This Been Tested?

Screenshots (if appropriate):

  • Local Tests
  • Google Colab notebooks
  • Databricks

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Code improvements with no or little impact
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING page.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@danilojsl danilojsl changed the title [SPARKNLP-1011] Adding changes to transfer ONNX files on executors [SPARKNLP-1037] Adding addFile changes to to replace broadcast in all ONNX based annotators Apr 17, 2024
@danilojsl danilojsl force-pushed the feature/SPARKNLP-1011-Implement-addFile-all-models branch from be70be8 to c9380c6 Compare April 17, 2024 01:47
@danilojsl danilojsl force-pushed the feature/SPARKNLP-1011-Implement-addFile-all-models branch from d34af15 to b105e51 Compare April 24, 2024 17:56
@maziyarpanahi maziyarpanahi changed the base branch from master to release/540-release-candidate May 21, 2024 12:33
@maziyarpanahi maziyarpanahi merged commit 4419a70 into release/540-release-candidate May 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants