The model zoo, organized by what they do
KerasHub ships dozens of pretrained presets, but they sort cleanly into three architectural families. The table below is the cheat sheet — read the Type column first, because architecture decides what a model is good for far more than its brand name does.
| Model | Type | Use Case |
|---|---|---|
| BERT | Encoder | Classification, NER, embeddings |
| GPT-2 | Causal LM | Text generation |
| Gemma (1/2/3/4) | Causal LM | Google's open model family |
| Llama 2/3 | Causal LM | Meta's open models |
| Mistral | Causal LM | Efficient open model |
| T5 | Encoder-Decoder | Translation, summarization |
| Whisper | Audio | Speech recognition |
One loader, every model
Notice what the Code section shows: a classifier and a generator load with the same from_preset() call — only the class name and preset string change. That uniformity is the payoff of the hub. You don't relearn an API per model; you pick a class for your task, hand it a preset name, and KerasHub fetches the weights and the matching tokenizer in one shot. num_classes on the classifier is the only task-specific knob — it reshapes the output head while leaving the pretrained backbone untouched.