Toto
chronax.models.Toto · inherits torch.nn.Module, ModelHubMixin
PyTorch module for Toto (Timeseries-Optimized Transformer for Observability).
__init__(self, patch_size, stride, embed_dim, num_layers, num_heads, mlp_hidden_dim, dropout, spacewise_every_n_layers, scaler_cls, output_distribution_classes, spacewise_first=True, output_distribution_kwargs=None, use_memory_efficient_attention=True, stabilize_with_global=True, scale_factor_exponent=10.0, **model_kwargs)
| Parameter | Type | Default | Description |
|---|---|---|---|
patch_size |
int |
- | (undocumented) |
stride |
int |
- | (undocumented) |
embed_dim |
int |
- | (undocumented) |
num_layers |
int |
- | (undocumented) |
num_heads |
int |
- | (undocumented) |
mlp_hidden_dim |
int |
- | (undocumented) |
dropout |
float |
- | (undocumented) |
spacewise_every_n_layers |
int |
- | (undocumented) |
scaler_cls |
str |
- | (undocumented) |
output_distribution_classes |
list[str] |
- | (undocumented) |
spacewise_first |
bool |
True |
(undocumented) |
output_distribution_kwargs |
dict \| None |
None |
(undocumented) |
use_memory_efficient_attention |
bool |
True |
(undocumented) |
stabilize_with_global |
bool |
True |
(undocumented) |
scale_factor_exponent |
float |
10.0 |
(undocumented) |
**model_kwargs |
- | Additional keyword arguments to pass to the TotoModule constructor. |
load_from_checkpoint(cls, checkpoint_path, map_location='cpu', strict=True, **model_kwargs)
Custom checkpoint loading. Used to load a local safetensors checkpoint with an optional config.json file.
| Parameter | Type | Default | Description |
|---|---|---|---|
checkpoint_path |
- | - | (undocumented) |
map_location |
str |
"cpu" |
(undocumented) |
strict |
- | True |
(undocumented) |
**model_kwargs |
- | (undocumented) |
device
Returns the device of the model parameters.