Add identity-first attention MLP sweep exploration #663
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The First MLP is Free
This pull request introduces a new experiment configuration file to explore the impact of varying the MLP size in the first transformer block when using identity attention. The configuration sets up a sweep over several first-layer MLP widths, while keeping the rest of the model parameters constant.
While still utilizing shared parameters during training of wte and lm_head, this aims to use a lookup table to replace the wte and the first MLP.
This sweep is intended to scope if adding an MLP (or any module without state) for inference.
Experiment setup and parameter sweep:
explorations/identity_first_layer_mlp_sweep.yamlto define a sweep that varies the first-layer MLP size in a 4-layer transformer, with the first block using identity attention and subsequent blocks using causal attention.512,1024,1536,2048,2560), while keeping other layers at the default size of2048.block_size,n_layer,n_head,n_embd, dataset, device, dtype, and compilation settings.