keras-team/keras-hub là dự án tích hợp AI trên GitHub với 995 sao, viết chủ yếu bằng Python. Pretrained model hub for Keras 3.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
[!IMPORTANT]
📢 KerasNLP is now KerasHub! 📢 Read
the announcement.
KerasHub is a pretrained modeling library that aims to be simple, flexible,
and fast. The library provides Keras 3
implementations of popular model architectures, paired with a collection of
pretrained checkpoints available on Kaggle Models.
Models can be used with text, image, and audio data for generation, classification,
and many other built in tasks.
KerasHub is an extension of the core Keras API; KerasHub components are provided
as Layer and Model implementations. If you are familiar with Keras,
congratulations! You already understand most of KerasHub.
All models support JAX, TensorFlow, and PyTorch from a single model
definition and can be fine-tuned on GPUs and TPUs out of the box. Models can
be trained on individual accelerators with built-in PEFT techniques, or
fine-tuned at scale with model and data parallel training. See our
Getting Started guide
to start learning our API.
Quick Links
For everyone
Home page
Getting started
Guides
API documentation
Pre-trained models
For contributors
Call for Contributions
Roadmap
Contributing Guide
Style Guide
API Design Guide
Quickstart
Choose a backend:
import os
os.environ["KERAS_BACKEND"] = "jax" # Or "tensorflow" or "torch"!
Import KerasHub and other libraries:
import keras
import keras_hub
import numpy as np
import tensorflow_datasets as tfds
Load a resnet model and use it to predict a label for an image:
Load a Bert model and fine-tune it on IMDb movie reviews:
classifier = keras_hub.models.TextClassifier.from_preset(
"bert_base_en_uncased",
activation="softmax",
num_classes=2,
)
imdb_train, imdb_test = tfds.load(
"imdb_reviews",
split=["train", "test"],
as_supervised=True,
batch_size=16,
)
classifier.fit(imdb_train, validation_data=imdb_test)
preds = classifier.predict(["What an amazing movie!", "A total waste of time."])
print(preds)
Installation
To install the latest KerasHub release with Keras 3, simply run:
pip install --upgrade keras-hub
To install the latest nightly changes for both KerasHub and Keras, you can use
our nightly package.
pip install --upgrade keras-hub-nightly
Currently, installing KerasHub will always pull in TensorFlow for use of the
tf.data API for preprocessing. When pre-processing with tf.data, training
can still happen on any backend.
Visit the core Keras getting started page
for more information on installing Keras 3, accelerator support, and
compatibility with different frameworks.
Configuring your backend
If you have Keras 3 installed in your environment (see installation above),
you can use KerasHub with any of JAX, TensorFlow and PyTorch. To do so, set the
KERAS_BACKEND environment variable. For example:
export KERAS_BACKEND=jax
Or in Colab, with:
import os
os.environ["KERAS_BACKEND"] = "jax"
import keras_hub
[!IMPORTANT]
Make sure to set the KERAS_BACKENDbefore importing any Keras libraries;
it will be used to set up Keras when it is first imported.
Compatibility
We follow Semantic Versioning, and plan to
provide backwards compatibility guarantees both for code and saved models built
with our components. While we continue with pre-release 0.y.z development, we
may break compatibility at any time and APIs should not be considered stable.
Disclaimer
KerasHub provides access to pre-trained models via the keras_hub.models API.
These pre-trained models are provided on an "as is" basis, without warranties
or conditions of any kind. The following underlying models are provided by third
parties, and subject to separate licenses:
BART, BLOOM, DeBERTa, DistilBERT, GPT-2, Llama, Mistral, OPT, RoBERTa, Whisper,
and XLM-RoBERTa.
Citing KerasHub
If KerasHub helps your research, we appreciate your citations.
Here is the BibTeX entry:
@misc{kerashub2024,
title={KerasHub},
author={Watson, Matthew, and Chollet, Fran\c{c}ois and Sreepathihalli,
Divyashree, and Saadat, Samaneh and Sampath, Ramesh, and Rasskin, Gabriel and
and Zhu, Scott and Singh, Varun and Wood, Luke and Tan, Zhenyu and Stenbit,
Ian and Qian, Chen, and Bischof, Jonathan and others},
year={2024},
howpublished={\url{https://github.com/keras-team/keras-hub}},
}
keras-team/keras-hub thuộc nhóm AI Tools trên TopGit, cùng 11 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về keras-team/keras-hub ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/keras-team/keras-hub là nguồn chính thức.
keras-team/keras-hub có bao nhiêu sao?
keras-team/keras-hub có 995 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/keras-team/keras-hub. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
keras-team/keras-hub có những chủ đề gì?
GitHub topics của keras-team/keras-hub: "cv", "deep-learning", "jax", "keras", "llm", "machine-learning", "natural-language-processing", "nlp", "python", "pytorch", "tensorflow". TopGit xếp repo vào nhóm AI Tools.
keras-team/keras-hub có phải mã nguồn mở không?
Có — keras-team/keras-hub phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/keras-team/keras-hub.
keras-team/keras-hub có trang demo không?
Dự án có trang chủ ở https://keras.io/keras_hub/. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
keras-team/keras-hub còn đang phát triển không?
Commit gần nhất trên keras-team/keras-hub là 6 ngày trước (theo timestamp GitHub). Repo có 371 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc đầy đủ README ở tab phía trên.
keras-hub có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về keras-hub.