Learn how to write a custom training loop for a simple, fully connected model on the MNIST dataset.
cstorch
as the alias for cerebras.pytorch
ClusterConfig
object, then use that to construct a backend
object:
ClusterConfig
to view all configurable options.
cerebras.pytorch.compile
, for example:
cstorch.compile
doesn’t actually compile the model. Similar to torch.compile
it only prepares the model for compilation. Compilation only happens after the first iteration, once the input shapes are known.cerebras.pytorch.utils.data.DataLoader
.
For example:
cerebras.pytorch.trace
.
For example:
cerebras.pytorch.utils.data.DataExecutor
.
For example:
step_closure
. This is required to retrieve the loss value from the cluster before it can be used. See the page on step closures for more details.checkpoint_closure
. This is required to retrieve the model weights and optimizer state back from the cluster before it can be saved. Please see the page on saving checkpoints.