Repolode
keras-team

keras-team/keras-hub

A pretrained model library for Keras 3 offering text, image, and audio models that run on JAX, TensorFlow, or PyTorch.

Stars
996
Forks
377
Open issues
273
Last commit
2 days ago

What is it?

KerasHub is a pretrained modeling library built as an extension of the core Keras API. It provides Keras 3 implementations of popular model architectures, along with pretrained checkpoints hosted on Kaggle Models. Its Layer and Model components cover tasks such as generation, classification, and other built-in workflows across text, image, and audio data.

A single model definition works with JAX, TensorFlow, and PyTorch, selected through the KERAS_BACKEND environment variable. Models can be fine-tuned on GPUs and TPUs, use built-in PEFT techniques on individual accelerators, or be trained at scale with model and data parallelism.

Developers already familiar with Keras can start quickly, since loading a preset with from_preset and calling fit or predict follows the usual Keras workflow. The project is under active pre-release 0.y.z development, so APIs may change.

Key features

  • 01Keras 3 implementations of popular text, image, and audio model architectures.
  • 02Pretrained checkpoints loadable by name via from_preset.
  • 03One model definition runs on JAX, TensorFlow, or PyTorch.
  • 04Built-in PEFT techniques for training on a single accelerator.
  • 05Supports model and data parallel training for larger scale fine-tuning.

Use cases

  • Fine-tuning a pretrained BERT-style classifier on a custom text dataset.
  • Running image classification with a pretrained ResNet checkpoint.
  • Adapting large language models with parameter-efficient fine-tuning on limited GPU memory.
  • Moving a Keras training pipeline between JAX, TensorFlow, and PyTorch backends.

Quick start

  1. 1

    Install KerasHub from PyPI

    pip install --upgrade keras-hub
  2. 2

    Choose a backend by setting the environment variable before importing

    export KERAS_BACKEND=jax
  3. 3

    Import KerasHub and load a pretrained model from a preset

Things to know

  • Installing KerasHub always pulls in TensorFlow for tf.data preprocessing.
  • The API is pre-1.0 and may break compatibility at any time.
  • Some bundled pretrained models are provided by third parties under separate licenses.

In collections

Topics

FAQ

What is keras-hub?
A pretrained model library for Keras 3 offering text, image, and audio models that run on JAX, TensorFlow, or PyTorch. KerasHub is a pretrained modeling library built as an extension of the core Keras API. It provides Keras 3 implementations of popular model architectures, along with pretrained checkpoints hosted on Kaggle Models. Its Layer and Model components cover tasks such as generation, classification, and other built-in workflows across text, image, and audio data.
Is keras-hub free to use? What license does it have?
keras-hub is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is keras-hub still maintained?
Actively maintained. The last commit to keras-hub was on Nov 4, 2026.
What can I use keras-hub for?
Fine-tuning a pretrained BERT-style classifier on a custom text dataset. Running image classification with a pretrained ResNet checkpoint. Adapting large language models with parameter-efficient fine-tuning on limited GPU memory. Moving a Keras training pipeline between JAX, TensorFlow, and PyTorch backends.
How do I install keras-hub?
Install KerasHub from PyPI: pip install --upgrade keras-hub Choose a backend by setting the environment variable before importing: export KERAS_BACKEND=jax Import KerasHub and load a pretrained model from a preset
Where can I get keras-hub?
The source code and installation instructions are on GitHub: https://github.com/keras-team/keras-hub

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects