{"id":14907363,"url":"https://github.com/keras-team/keras-hub","last_synced_at":"2026-04-03T01:09:40.752Z","repository":{"id":37013599,"uuid":"267715375","full_name":"keras-team/keras-hub","owner":"keras-team","description":"Pretrained model hub for Keras 3.","archived":false,"fork":false,"pushed_at":"2026-01-12T18:57:15.000Z","size":9551,"stargazers_count":953,"open_issues_count":234,"forks_count":316,"subscribers_count":29,"default_branch":"master","last_synced_at":"2026-01-13T00:11:50.780Z","etag":null,"topics":["cv","deep-learning","jax","keras","llm","machine-learning","natural-language-processing","nlp","python","pytorch","tensorflow"],"latest_commit_sha":null,"homepage":"https://keras.io/keras_hub/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keras-team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-05-28T23:03:54.000Z","updated_at":"2026-01-12T23:07:26.000Z","dependencies_parsed_at":"2025-12-05T13:07:29.351Z","dependency_job_id":null,"html_url":"https://github.com/keras-team/keras-hub","commit_stats":{"total_commits":783,"total_committers":69,"mean_commits":"11.347826086956522","dds":0.6066411238825031,"last_synced_commit":"a4088f2a50007820ea0bca9cbc37129fad086f56"},"previous_names":["keras-team/keras-hub","keras-team/keras-nlp"],"tags_count":116,"template":false,"template_full_name":null,"purl":"pkg:github/keras-team/keras-hub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-team%2Fkeras-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-team%2Fkeras-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-team%2Fkeras-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-team%2Fkeras-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keras-team","download_url":"https://codeload.github.com/keras-team/keras-hub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-team%2Fkeras-hub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28491392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cv","deep-learning","jax","keras","llm","machine-learning","natural-language-processing","nlp","python","pytorch","tensorflow"],"created_at":"2024-09-22T16:01:29.863Z","updated_at":"2026-04-03T01:09:40.740Z","avatar_url":"https://github.com/keras-team.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# KerasHub: Multi-framework Pretrained Models\n[![](https://github.com/keras-team/keras-hub/workflows/Tests/badge.svg?branch=master)](https://github.com/keras-team/keras-hub/actions?query=workflow%3ATests+branch%3Amaster)\n![Python](https://img.shields.io/badge/python-v3.11.0+-success.svg)\n[![Kaggle Models](https://img.shields.io/badge/Kaggle-Models-brightgreen?colorA=0099ff)](https://www.kaggle.com/organizations/keras/models)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/keras-team/keras-hub/issues)\n\n\u003e [!IMPORTANT]\n\u003e 📢 KerasNLP is now KerasHub! 📢 Read\n\u003e [the announcement](https://github.com/keras-team/keras-hub/issues/1831).\n\n**KerasHub** is a pretrained modeling library that aims to be simple, flexible,\nand fast. The library provides [Keras 3](https://keras.io/keras_3/)\nimplementations of popular model architectures, paired with a collection of\npretrained checkpoints available on [Kaggle Models](https://www.kaggle.com/organizations/keras/models).\nModels can be used with text, image, and audio data for generation, classification,\nand many other built in tasks.\n\nKerasHub is an extension of the core Keras API; KerasHub components are provided\nas `Layer` and `Model` implementations. If you are  familiar with Keras,\ncongratulations! You already understand most of KerasHub.\n\nAll models support JAX, TensorFlow, and PyTorch from a single model\ndefinition and can be fine-tuned on GPUs and TPUs out of the box. Models can\nbe trained on individual accelerators with built-in PEFT techniques, or\nfine-tuned at scale with model and data parallel training. See our\n[Getting Started guide](https://keras.io/guides/keras_hub/getting_started)\nto start learning our API.\n\n## Quick Links\n\n### For everyone\n\n- [Home page](https://keras.io/keras_hub)\n- [Getting started](https://keras.io/keras_hub/getting_started)\n- [Guides](https://keras.io/keras_hub/guides)\n- [API documentation](https://keras.io/keras_hub/api)\n- [Pre-trained models](https://keras.io/keras_hub/presets/)\n\n### For contributors\n\n- [Call for Contributions](https://github.com/keras-team/keras-hub/issues/1835)\n- [Roadmap](https://github.com/keras-team/keras-hub/issues/1836)\n- [Contributing Guide](CONTRIBUTING.md)\n- [Style Guide](STYLE_GUIDE.md)\n- [API Design Guide](API_DESIGN_GUIDE.md)\n\n## Quickstart\n\nChoose a backend:\n\n```python\nimport os\nos.environ[\"KERAS_BACKEND\"] = \"jax\"  # Or \"tensorflow\" or \"torch\"!\n```\n\nImport KerasHub and other libraries:\n\n```python\nimport keras\nimport keras_hub\nimport numpy as np\nimport tensorflow_datasets as tfds\n```\n\nLoad a resnet model and use it to predict a label for an image:\n\n```python\nclassifier = keras_hub.models.ImageClassifier.from_preset(\n    \"resnet_50_imagenet\",\n    activation=\"softmax\",\n)\nurl = \"https://upload.wikimedia.org/wikipedia/commons/a/aa/California_quail.jpg\"\npath = keras.utils.get_file(origin=url)\nimage = keras.utils.load_img(path)\npreds = classifier.predict(np.array([image]))\nprint(keras_hub.utils.decode_imagenet_predictions(preds))\n```\n\nLoad a Bert model and fine-tune it on IMDb movie reviews:\n\n```python\nclassifier = keras_hub.models.TextClassifier.from_preset(\n    \"bert_base_en_uncased\",\n    activation=\"softmax\",\n    num_classes=2,\n)\nimdb_train, imdb_test = tfds.load(\n    \"imdb_reviews\",\n    split=[\"train\", \"test\"],\n    as_supervised=True,\n    batch_size=16,\n)\nclassifier.fit(imdb_train, validation_data=imdb_test)\npreds = classifier.predict([\"What an amazing movie!\", \"A total waste of time.\"])\nprint(preds)\n```\n\n## Installation\n\nTo install the latest KerasHub release with Keras 3, simply run:\n\n```\npip install --upgrade keras-hub\n```\n\nTo install the latest nightly changes for both KerasHub and Keras, you can use\nour nightly package.\n\n```\npip install --upgrade keras-hub-nightly\n```\n\nCurrently, installing KerasHub will always pull in TensorFlow for use of the\n`tf.data` API for preprocessing. When pre-processing with `tf.data`, training\ncan still happen on any backend.\n\nVisit the [core Keras getting started page](https://keras.io/getting_started/)\nfor more information on installing Keras 3, accelerator support, and\ncompatibility with different frameworks.\n\n## Configuring your backend\n\nIf you have Keras 3 installed in your environment (see installation above),\nyou can use KerasHub with any of JAX, TensorFlow and PyTorch. To do so, set the\n`KERAS_BACKEND` environment variable. For example:\n\n```shell\nexport KERAS_BACKEND=jax\n```\n\nOr in Colab, with:\n\n```python\nimport os\nos.environ[\"KERAS_BACKEND\"] = \"jax\"\n\nimport keras_hub\n```\n\n\u003e [!IMPORTANT]\n\u003e Make sure to set the `KERAS_BACKEND` **before** importing any Keras libraries;\n\u003e it will be used to set up Keras when it is first imported.\n\n## Compatibility\n\nWe follow [Semantic Versioning](https://semver.org/), and plan to\nprovide backwards compatibility guarantees both for code and saved models built\nwith our components. While we continue with pre-release `0.y.z` development, we\nmay break compatibility at any time and APIs should not be considered stable.\n\n## Disclaimer\n\nKerasHub provides access to pre-trained models via the `keras_hub.models` API.\nThese pre-trained models are provided on an \"as is\" basis, without warranties\nor conditions of any kind. The following underlying models are provided by third\nparties, and subject to separate licenses:\nBART, BLOOM, DeBERTa, DistilBERT, GPT-2, Llama, Mistral, OPT, RoBERTa, Whisper,\nand XLM-RoBERTa.\n\n## Citing KerasHub\n\nIf KerasHub helps your research, we appreciate your citations.\nHere is the BibTeX entry:\n\n```bibtex\n@misc{kerashub2024,\n  title={KerasHub},\n  author={Watson, Matthew, and  Chollet, Fran\\c{c}ois and Sreepathihalli,\n  Divyashree, and Saadat, Samaneh and Sampath, Ramesh, and Rasskin, Gabriel and\n  and Zhu, Scott and Singh, Varun and Wood, Luke and Tan, Zhenyu and Stenbit,\n  Ian and Qian, Chen, and Bischof, Jonathan and others},\n  year={2024},\n  howpublished={\\url{https://github.com/keras-team/keras-hub}},\n}\n```\n\n## Acknowledgements\n\nThank you to all of our wonderful contributors!\n\n\u003ca href=\"https://github.com/keras-team/keras-hub/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=keras-team/keras-hub\" /\u003e\n\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeras-team%2Fkeras-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeras-team%2Fkeras-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeras-team%2Fkeras-hub/lists"}