Skip to content

🚀OpenVINO Backend: GFIs for Further Development🚀 #20910

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

Open
rkazants opened this issue Feb 15, 2025 · 0 comments
Open

🚀OpenVINO Backend: GFIs for Further Development🚀 #20910

rkazants opened this issue Feb 15, 2025 · 0 comments
Assignees
Labels
Good first issue Issues which are good for first-time contributors. Usually easy to fix. stat:contributions welcome A pull request to fix this issue would be welcome. type:feature The user is asking for a new feature.

Comments

@rkazants
Copy link
Contributor

rkazants commented Feb 15, 2025

🚀**A great opportunity to contribute to two popular AI projects with just one PR:: Keras 3 and OpenVINO.**🚀

Keras 3 enables seamless switching between supported backends—PyTorch, TensorFlow, and JAX—for both training and inference of traditional models and LLMs/GenAI pipelines.

Since Keras 3.8.0, we've introduced a preview version of the OpenVINO backend (for inference only), allowing developers to leverage OpenVINO for model predictions directly within Keras 3 workflows. Activating the OpenVINO backend requires just one line of code to run inference on Keras 3-trained models. Here’s an example for a BERT model from Keras Hub:

import os
os.environ["KERAS_BACKEND"] = "openvino"
import numpy as np
import keras
import keras_hub

features = {
    "token_ids": np.ones(shape=(2, 12), dtype="int32"),
    "segment_ids": np.array([[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0]] * 2),
    "padding_mask": np.array([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0]] * 2),
}

classifier = keras_hub.models.BertTextClassifier.from_preset("bert_base_en_uncased", num_classes=4, preprocessor=None)
output = classifier.predict(features)

Currently, the OpenVINO backend lacks support for some operations. Our goal is to resolve this gap and to optimize it for inference on Intel devices—including CPUs, integrated GPUs, discrete GPUs, and NPUs—by supporting as many models as possible while delivering optimal performance. We aim to make the OpenVINO backend the No. 1 choice for model inference within the Keras 3 workflow.

We warmly welcome you to participate in further development of the OpenVINO backend. Here is a list of good-first-issues (it will be periodically updated with new ones):

Already done issues
@rkazants rkazants changed the title 🚀OpenVINO Backend: Good-first-issues for Further Development🚀 🚀OpenVINO Backend: GFIs for Further Development🚀 Feb 15, 2025
@mehtamansi29 mehtamansi29 added type:feature The user is asking for a new feature. keras-team-review-pending Pending review by a Keras team member. labels Feb 18, 2025
@sachinprasadhs sachinprasadhs added stat:contributions welcome A pull request to fix this issue would be welcome. Good first issue Issues which are good for first-time contributors. Usually easy to fix. and removed keras-team-review-pending Pending review by a Keras team member. labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Issues which are good for first-time contributors. Usually easy to fix. stat:contributions welcome A pull request to fix this issue would be welcome. type:feature The user is asking for a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants