composer.models
Models provided to Trainer must use the basic
interface specified by BaseMosaicModel.
Additionally, for convience we provide a number of extensions of BaseMosaicModel
as detailed below.
Base Models
The minimal interface needed to use a model with |
|
Implements the base logic that all classifiers can build on top of. |
|
Implements the base logic that all Transformers can build on top of. |
Image Models
A ResNet-56 model extending |
|
A simple convolutional neural network. |
|
An EfficientNet-b0 model extending |
|
A ResNet-18 model extending |
|
A ResNet-50 model extending |
|
A ResNet-101 model extending |
|
A U-Net model extending |
Language Models
Implements a GPT-2 wrapper around a MosaicTransformer. |
Metrics and Loss Functions
Evaluation metrics for common tasks are
in torchmetrics
and are directly compatible with BaseMosaicModel.
Additionally, we provide implementations of the following metrics and loss functions.
The Dice Coefficient for evaluating image segmentation. |
|
Torchmetric cross entropy loss implementation. |
|
Drop-in replacement for |
|
Hugging Face compatible cross entropy loss. |
|
Subclasses |