transformer¶
Classes¶
Implementation of a Transformer model. |
Module Contents¶
- class transformer.Transformer(config)¶
Bases:
torch.nn.ModuleImplementation of a Transformer model.
- Parameters:
BaseModel – Base model class that contains the utilities for all models we use in this tutorial.
config (emmi.schemas.models.TransformerConfig) – Configuration of the Transformer model.
- blocks¶
- forward(x, attn_kwargs)¶
Forward pass of the Transformer model.