Neural networks#
Layers, blocks, inference sessions, trainers, optimizers and schedules.
Adagrad optimizer, as |
|
Adam optimizer, as |
|
Adamax optimizer, as |
|
AdamW optimizer, as |
|
Clip gradients by their global L2 norm, as |
|
Cross-entropy loss over class indices, as |
|
Embedding table with a reproducible gather and dense gradient, as |
|
Embedding lookup tables with a reproducible backward pass. |
|
Exponential learning-rate schedule: multiply by |
|
GRU sequence classifier: recurrent layers under a linear head. |
|
GRU sequence regressor: recurrent layers under a linear head. |
|
Gradients of |
|
Layer normalization over the trailing dimensions, as |
|
Layer normalization layer, as |
|
Lion optimizer (Chen et al., 2023, "Symbolic Discovery of Optimization Algorithms"). |
|
LSTM sequence classifier: recurrent layers under a linear head. |
|
LSTM sequence regressor: recurrent layers under a linear head. |
|
Mamba-1, Mamba-2 and Mamba-3 blocks in float32. |
|
One Mamba-1 block: RMSNorm, selective-scan mixer and residual. |
|
Forward-only |
|
Recurrent state of a |
|
One Mamba-2 (SSD) block: RMSNorm, mixer and residual. |
|
Forward-only |
|
Recurrent state of a |
|
One Mamba-3 (SISO) block: RMSNorm, mixer and residual. |
|
Forward-only |
|
Recurrent state of a |
|
Multi-layer perceptron classifier, as scikit-learn's |
|
Forward-only |
|
Multi-layer perceptron regressor, as scikit-learn's |
|
Sparse mixture-of-experts feed-forward block, as Mixtral's |
|
NAdam optimizer, as |
|
Small neural-network trainers with complete, resumable state. |
|
One-cycle learning-rate schedule, as torch's |
|
RMSprop optimizer, as |
|
Elman RNN sequence classifier: recurrent layers under a linear head. |
|
Elman RNN sequence regressor: recurrent layers under a linear head. |
|
Shape of a |
|
Forward-only |
|
A Samba-style language model with its own training loop. |
|
Stochastic gradient descent, as |
|
Trainer for a fixed 8-16-3 ReLU network with mean cross-entropy and AdamW. |
|
Step-decay learning-rate schedule: multiply by |
|
Optimizers, schedules, losses and training primitives over float32 arrays. |
|
Llama-style transformer decoder block. |
|
One Llama-shaped transformer decoder block, float32. |
|
Forward-only |
|
KV cache of a |