By Team Edtoolkits · AI learning
Separate embeddings, attention and feed-forward weights before estimating storage.
Use the guide alongside the working tool.
Open Parameters: Counting a Model's Size →Explore the lesson
Watch the counter climb as layers stack up.
Change layers, width and vocabulary in the calculator.
Flip the memory card and answer the quick check.
A comparison to try
Choose Tiny: four layers, width 128 and vocabulary 5,000. The counts are 640,000 embedding, 262,144 attention and 524,288 feed-forward parameters: 1,426,432 total. At two bytes each, the weights occupy 2,852,864 bytes before other allocations.
Read the result
Several matrices grow with width squared, while the embedding term grows linearly with vocabulary. The breakdown explains different growth rates.
A mistake to avoid
Biases, normalization and sharing details are omitted. Weight bytes are not a full memory budget, and presets are not exact specifications of named commercial models.
Teaching model and privacy
A simplified formula: it counts the embedding, attention and feed-forward weights and ignores biases, norms and shared weights, so real counts differ. Preset sizes are invented for teaching. Nothing leaves your browser.
Ready to apply this workflow?
Try Parameters: Counting a Model's Size →Explore a related workflow
- Choose a course entry point and verify saved progress
Use prior knowledge to select a starting chapter while distinguishing local progress from an account or a qualification.
- AI Tokens: Inspect Pieces, Spaces and Stable Teaching IDs
Compare common words, rare words and numbers without using the playground as an exact provider counter.
- Inspect candidates before continuing text
Compare normalized next-word probabilities with the choices sampled from them.
- Choose complexity using held-out error
Compare training and test curves before calling a detailed fit an improvement.
Found unclear instructions or an unexpected result? Contact Team Edtoolkits.