--- id: keras-hub version: "0.31.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # keras-hub — Pretrained models for Keras. License: permissive · Maintenance: active · Downloads: 629.1K/mo ## 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 above — verify before relying. KerasHub provides Keras 3 implementations of pretrained model architectures for text, image, and audio tasks, with checkpoints available on Kaggle Models and support for JAX, TensorFlow, and PyTorch backends. 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 pip install keras-hub uv add keras-hub poetry add keras-hub ## Installing keras-hub 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. 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])) Requires Python 3.11+. KERAS_BACKEND environment variable must be set before importing any Keras libraries. TensorFlow is always installed for tf.data preprocessing. 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_current - Install friction: low - Maintenance: active - Downloads: 629.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pretrained models keras, multi-framework neural networks, text image audio classification, fine-tune transformer models, keras 3 model zoo, jax tensorflow pytorch models, transfer learning library, transfer-learning, multi-backend, pretrained-models [View on SkillFed](https://skillfed.io/packages/keras-hub) · [View on PyPI](https://pypi.org/project/keras-hub/)