What is a Switch Transformer and how does it scale?
masterA Switch Transformer is a sparsely activated Transformer model designed to maximize parameter count while keeping floating point operations (FLOPs) per example constant.
Unlike dense Transformers, Switch Transformers replace the standard dense feed-forward network (FFN) layer with a sparse Switch FFN layer. This layer routes each token independently to a single expert (a specific FFN) based on a router's decision. This allows the model to increase its total parameter count (by adding more experts) without increasing the computational cost per token, as each token only interacts with one expert per layer.