keras-hub
Pretrained models for Keras.
Decision gist · record as of 2026-08-14
Yes, if you need pretrained models across multiple backends. KerasHub is actively maintained, has low install friction, and Apache-2.0 licensing is permissive. However, the library is in pre-release (0.31.0) with no backwards compatibility guarantees, so APIs may break. The mandatory TensorFlow dependency for tf.data preprocessing adds overhead even when training on JAX or PyTorch. Best suited for research and experimentation; production use should account for API instability.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11+.
- KERAS_BACKEND environment variable must be set before importing any Keras libraries.
- TensorFlow is always installed for tf.data preprocessing.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with attribution. Third-party pretrained models (BART, BLOOM, DeBERTa, DistilBERT, GPT-2, Llama, Mistral, OPT, RoBERTa, Whisper, XLM-RoBERTa) are subject to separate licenses.
last release 2026-08-08 (6 days) · last repo commit 2026-08-14 · 64,228 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 629,106 downloads/mo, #5,669 on PyPI
Alternatives
Verify before relying
import os
os.environ["KERAS_BACKEND"] = "jax" # or "tensorflow" or "torch"
import keras_hub
import numpy as np
classifier = keras_hub.models.ImageClassifier.from_preset("resnet_50_imagenet")
image = keras.utils.load_img("path/to/image.jpg")
preds = classifier.predict(np.array([image]))- Whether fine-tuning with PEFT techniques and distributed training (model/data parallel) work equally well across all three backends (JAX, TensorFlow, PyTorch).
- Performance characteristics and memory overhead of the 11 runtime dependencies in typical deployment scenarios.
- Stability guarantees for APIs given the pre-release 0.y.z development status and stated lack of backwards compatibility guarantees.
What it is and what it does
KerasHub is a library of pretrained neural network models built on Keras 3, designed to work seamlessly across JAX, TensorFlow, and PyTorch from a single model definition. It provides ready-to-use implementations of popular architectures (ResNet, BERT, and others) paired with pretrained checkpoints hosted on Kaggle Models, enabling developers to quickly load and fine-tune models for text, image, and audio tasks without rewriting code for different backends.
The library extends the core Keras API through Layer and Model implementations, so if you know Keras you can use KerasHub immediately. Models support fine-tuning on GPUs and TPUs out of the box, with built-in PEFT techniques for single-accelerator training and support for model and data parallel training at scale. Installation always includes TensorFlow for the tf.data preprocessing API, though training itself can happen on any configured backend.
Use it for
- Load a pretrained ResNet or similar image classifier and fine-tune it on a custom dataset without rewriting for different backends.
- Fine-tune a BERT or other text model on domain-specific tasks like sentiment analysis or named entity recognition.
- Experiment with the same model architecture across JAX, TensorFlow, and PyTorch to compare performance and training efficiency.
- Build production inference pipelines using pretrained audio models (e.g., Whisper) for speech recognition or classification.
- Apply transfer learning and PEFT techniques to train large models on limited GPU memory.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need pretrained models across multiple backends.
KerasHub is actively maintained, has low install friction, and Apache-2.0 licensing is permissive. However, the library is in pre-release (0.31.0) with no backwards compatibility guarantees, so APIs may break. The mandatory TensorFlow dependency for tf.data preprocessing adds overhead even when training on JAX or PyTorch. Best suited for research and experimentation; production use should account for API instability.
Install
keras-hub on PyPI
Before you install
Low install friction with a pure-Python wheel. Active maintenance with a release 6 days old and last commit on 2026-08-14. Requires 11 runtime dependencies including keras, tensorflow-text, and tokenizers; TensorFlow is always pulled in for tf.data preprocessing even when training on other backends.
Requires Python 3.11+. KERAS_BACKEND environment variable must be set before importing any Keras libraries. TensorFlow is always installed for tf.data preprocessing.
License in practice
Apache-2.0 permissive license allows commercial and private use with attribution. Third-party pretrained models (BART, BLOOM, DeBERTa, DistilBERT, GPT-2, Llama, Mistral, OPT, RoBERTa, Whisper, XLM-RoBERTa) are subject to separate licenses.
Quickstart
import os
os.environ["KERAS_BACKEND"] = "jax" # or "tensorflow" or "torch"
import keras_hub
import numpy as np
classifier = keras_hub.models.ImageClassifier.from_preset("resnet_50_imagenet")
image = keras.utils.load_img("path/to/image.jpg")
preds = classifier.predict(np.array([image]))
Verify before relying
- Whether fine-tuning with PEFT techniques and distributed training (model/data parallel) work equally well across all three backends (JAX, TensorFlow, PyTorch).
- Performance characteristics and memory overhead of the 11 runtime dependencies in typical deployment scenarios.
- Stability guarantees for APIs given the pre-release 0.y.z development status and stated lack of backwards compatibility guarantees.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 11 packageskerasabsl-pynumpypackagingregexrichkagglehubkagglesdksentencepiecetokenizerstensorflow-text |
| Maintenance | Actively maintained 6 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 629,106 / month, #5,669 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: Science/ResearchOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: UnixProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Topic :: Scientific/EngineeringTopic :: Software Development |
Evidence: keras_hub-0.31.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “text image audio classification”
- keras-hubKerasHub provides Keras 3 implementations of pretrained model…
- clip-anytorchLoads and runs OpenAI's CLIP model to encode images and text into a…
- laion-clapExtracts learned audio and text embeddings using contrastive…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also keras · keras-nlp · tensorflow-hub · keras-nightly · Keras-Applications · Keras-Preprocessing · scikeras · tf-keras · keras-tuner · tf-keras-nightly