The useful part, up front

What you’ll take away

  • A vocabulary table contributes one full learned vector for every declared token identifier.
  • In the original example, halving the processing blocks removes about 18% of total parameters because the large table is unchanged.
  • True input/output weight sharing counts one parameter object even though it serves two computational roles.
  • Depth, width and vocabulary size change different terms in a parameter inventory.
  • Parameter counts alone do not establish trained quality, token lengths, runtime memory or speed.
01

A small model can have a surprisingly large vocabulary table

A small language model is often pictured as a short stack of processing layers. That picture misses another substantial component: the table that connects token identifiers with learned vectors. If that table takes a large share of the model’s parameters, removing half the processing layers will remove much less than half the model.

There is a concrete published example. Google’s August 14, 2025 announcement for Gemma 3 270M describes a rounded total of 270 million parameters, split into 170 million embedding parameters and 100 million transformer parameters [1]. Those are the publisher’s rounded figures for that named release, not a universal formula for small models or a current product recommendation.

We will build a separate, deliberately simple parameter inventory to understand the mechanism. It describes an untrained teaching architecture, not Gemma or a usable chatbot. We will count its learned numbers exactly, then change its depth, width, vocabulary and output sharing one at a time. These changes affect different parts of the inventory, which is why a single size label cannot explain what was reduced.

Count the shapes inside one declared block. Original dense block with width 256 and feed-forward width 1,024. Four full-width attention maps, two feed-forward maps and no biases are stipulated.
Original dense block with width 256 and feed-forward width 1,024. Four full-width attention maps, two feed-forward maps and no biases are stipulated. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
02

Count distinct learned numbers before counting memory or speed

A parameter count measures how many separate numerical entries the defined model contains. A table with 100 rows and 20 entries per row contains 2,000 entries. Reading the same row many times does not create more parameters. Using the same table for two jobs also does not create a second table, provided it really is the same shared object.

This count is different from the number of tokens in a prompt, the size of an intermediate result or the bytes used to store the values. It is also different from how many entries a particular training stage updates. PyTorch’s embedding documentation distinguishes the stored table from settings that freeze its updates [2]. A frozen table still exists in the model even though that training stage leaves it unchanged.

Throughout the exercise, we count all unique learned scalar entries in the declared architecture. We do not assign a storage format or estimate a device’s memory requirement. That keeps the comparison focused: did the design remove learned entries, reuse an existing table, or merely change a setting that leaves the entries present?

03

Specify the architecture that the arithmetic actually describes

Choose a vocabulary with 32,768 rows and a vector width of 256 numbers. Our model has six separate processing blocks. Each block contains four square attention matrices and two feed-forward matrices. The feed-forward path expands a 256-number vector to 1,024 numbers, applies a fixed activation and contracts it back to 256.

Each block also has two normalization operations, each with one learned scale for every vector component. A final normalization operation adds another 256 scales. There are no learned offsets, extra output heads or learned position tables. Position information is supplied through a fixed rule that adds no learned entries. The baseline reuses its vocabulary table to score output tokens.

These choices are part of the example, not a description of every transformer. A model with extra gates, differently sized attention matrices, biases or other components needs a different inventory. We have made the design small and explicit so each total can be checked. The question is how its parts scale, rather than whether this untrained arrangement would produce useful language.

04

Every vocabulary row carries the full vector width

An embedding table has one row for each token identifier and one column for each vector component. PyTorch documents those two dimensions directly [2]. With 32,768 rows and 256 components in this example, the table contains 32,768 × 256 = 8,388,608 learned entries.

That number does not depend on how many different token identifiers appear in today’s prompt. A short input may read only a few rows, but our defined model still contains the complete table. Nor does a row necessarily stand for a whole written word. Token vocabularies can include smaller pieces and special symbols; the row count is the declared set of identifiers, not the number of words a reader recognizes [4].

The multiplication explains the structural cost. Increasing vocabulary adds more complete rows. Increasing width makes every existing row longer. In this particular design, the table will turn out to be larger than all six blocks’ matrix weights combined. That conclusion comes from the declared dimensions, without requiring any assumption about whether some token is frequent, useful or easy for the model to learn.

Halving depth leaves the large vocabulary table unchanged. Original separate designs with the same width and vocabulary. Removing three blocks removes 2,360,832 parameters: about 18.01% of the complete baseline.
Original separate designs with the same width and vocabulary. Removing three blocks removes 2,360,832 parameters: about 18.01% of the complete baseline. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
05

Count the matrices inside one block before multiplying by depth

Each square attention matrix has 256 × 256 = 65,536 entries. Four such matrices contribute 262,144 entries per block. The feed-forward expansion has 1,024 × 256 = 262,144 entries, and its contraction has the same count with the dimensions reversed. Those two together contribute 524,288.

Add the attention and feed-forward parts: 262,144 plus 524,288 gives 786,432 matrix entries in one block. Six distinct blocks therefore contain 4,718,592 matrix entries. That is already less than the vocabulary table’s 8,388,608. We still need to add the small normalization vectors before calling the inventory complete.

The method is ordinary matrix accounting. A dense map’s weight count comes from its input and output dimensions, with any bias counted separately [3]. Our design deliberately has no biases. The fixed activation adds no learned entries, but it still performs a computation. A component contributing zero parameters should not be mistaken for a component that does nothing. Parameter totals describe learned numbers, not every operation required to process a token.

06

The full count exposes when the vocabulary becomes dominant

Each block contains two vectors of 256 learned normalization scales, making 512 scales. Six blocks contribute 3,072, and the final normalization contributes another 256. The scale total is therefore 3,328. Adding all parts gives 8,388,608 vocabulary entries, 4,718,592 block-matrix entries and 3,328 scales: 13,110,528 unique parameters.

The vocabulary table accounts for about 63.98 percent of that total. This is an exact inventory with a rounded percentage, not a measured memory profile. The example also makes clear why depth is only one part of model size: more than half of the entries sit outside the repeated blocks.

There is a useful boundary in this design. At the same width and six-block depth, a vocabulary larger than 18,445 rows contains more entries than all the block matrices and normalization scales combined. Our 32,768-row vocabulary lies above that boundary. The threshold belongs to the declared architecture. It would change if the blocks gained extra matrices or if another learned component were added.

07

Half as many blocks removes only about eighteen percent here

Create a separate design with three blocks instead of six. Leave its 32,768-row vocabulary and 256-number width unchanged. The embedding table still contains 8,388,608 entries. Its block matrices now contain 2,359,296 entries, and its normalization scales total 1,792 because the final scale vector remains.

The new total is 10,749,696 parameters. Compared with the original 13,110,528, that removes 2,360,832 entries, or about 18.01 percent. The repeated block part has been halved, but the large shared vocabulary table has not changed. Counting only the blocks would therefore exaggerate the reduction in the whole model.

This is an architectural comparison, not an instruction to delete half the layers from a trained model. We have not established how any retained weights should change, whether the new network can perform the intended task or how long it takes to run. The result is narrower and useful: when most parameters sit outside the part being shortened, a large change to that part can produce a modest change to the total.

Sharing one table preserves two different computational jobs. Original tied-output design. The output weight is the same parameter object as the input table, not an independent copy with equal values.
Original tied-output design. The output weight is the same parameter object as the input table, not an independent copy with equal values. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
08

One table used twice differs from two independent tables

In the baseline, the vocabulary table does two jobs. At the input, a token identifier selects a row. At the output, the same learned table helps score the vocabulary entries from the final vector. The table is reused, so its learned entries are counted once even though the two operations are different.

Now define an output table that is independent but has the same dimensions. It adds another 8,388,608 entries, increasing the total to 21,499,136. The input table, the six blocks and the normalization scales have not changed. We changed the sharing rule. Two tables with equal initial numbers would still count twice if they were independent objects that could later change separately.

Sharing does not remove the job of producing output scores. It also does not guarantee equal quality between a shared and an independent design. Our calculation concerns the number of separate learned values. When reading a real model’s size description, check whether its input and output weights are shared before adding what appear to be two vocabulary-sized components.

09

A narrower vector changes linear and quadratic terms differently

Keep six blocks and the same vocabulary, but reduce vector width from 256 to 128. Preserve the rule that feed-forward width is four times vector width, so it falls from 1,024 to 512. This is another separate architecture, with all its dimensions changed consistently.

The vocabulary table is halved to 4,194,304 entries. The block matrices shrink more: both dimensions of each relevant matrix are halved, so each matrix has one-quarter as many entries. Across six blocks they contain 1,179,648. Normalization scales are halved to 1,664. The complete total becomes 5,375,616 parameters, about 59.00 percent below the baseline.

This differs from simply making the model half as deep. Width changes the size of the vocabulary rows and several matrix dimensions at once. The arithmetic does not make width reduction the better choice for a task. It only shows why the same word smaller can describe different structural changes. Whether either design can learn or preserve the required behavior remains an evaluation question outside this untrained inventory.

Half the width quarters this design’s block matrices. Original separate architectures: vocabulary 32,768, six blocks and feed-forward width 4d. Shape changes do not establish preserved trained behavior.
Original separate architectures: vocabulary 32,768, six blocks and feed-forward width 4d. Shape changes do not establish preserved trained behavior. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
10

Fewer vocabulary rows leave the repeated block matrices alone

Return to the baseline width of 256 and six blocks, but choose only 8,192 vocabulary rows. That is one-quarter of the original row count. The embedding table now contains 8,192 × 256 = 2,097,152 entries. The blocks and normalization scales retain their original dimensions, totaling 4,721,920 entries together.

The new model total is 6,819,072 parameters. It is about 47.99 percent below the baseline, even though the vocabulary table itself became 75 percent smaller. The unchanged processing components explain the difference. This is the same accounting principle as the depth example, applied to another part of the model.

A vocabulary reduction also raises a question that the parameter count cannot answer: how will text be represented with the new set of token pieces? The tokenizer and its table must be designed together [4]. Our arithmetic specifies a possible row count. It does not specify a complete tokenizer, guarantee coverage of any language, or show that unused rows can be removed from a trained model without changing its behavior.

11

A smaller table can still produce a longer token sequence

Consider the word camera. In one invented vocabulary, it is represented by the single piece camera with identifier 3141. In another invented vocabulary, it is represented by the three pieces ca, me and ra, with identifiers 41, 72 and 105. Joining the pieces gives the same written word in both cases, but the sequence lengths are one and three.

These assignments illustrate the difference between vocabulary size and the number of tokens needed for a text. They are not outputs from a real tokenizer, and they do not prove that every smaller vocabulary makes every text longer. The documented idea of subword tokenization supplies the context: text can be composed from smaller known pieces [4]. Our particular pieces and identifiers are chosen only for the example.

The identifiers also belong to their own tables. Sending identifier 3141 to another model does not automatically mean camera there. The receiving table could assign that row another meaning. A parameter total therefore needs the associated tokenizer and mapping if someone is going to use the model. Knowing that two systems can represent the same characters does not make their token identifiers interchangeable.

12

Use the inventory to ask a better question about a small model

The five designs answer different accounting questions. Shortening the stack changes repeated blocks. Narrowing the vectors changes both table rows and matrix dimensions. Shrinking the vocabulary changes the table. Sharing the input and output weights avoids a second independent vocabulary-sized component. Each result can be explained from the part that changed.

None of those counts tells us which design gives the best answers. The examples have no learned values or task results. Even a complete parameter inventory cannot establish how much memory a particular runtime allocates, how smoothly output arrives or how well the model follows an application’s instructions. Those require the actual trained model and relevant measurements.

For a real comparison, retain the model’s identity, tensor shapes, sharing rules, tokenizer and task evidence. Google’s dated release describes its small model as intended for task-specific adaptation [1]; that intention should not replace checking the task you need. The useful outcome of the inventory is a precise explanation of what small means in the design. It prevents a depth label or one headline number from standing in for the whole architecture.

Fewer vocabulary rows and fewer input tokens are different claims. Original row counts and invented camera segmentations. These are not complete tokenizers or observed outputs; no universal token-length ratio is claimed.
Original row counts and invented camera segmentations. These are not complete tokenizers or observed outputs; no universal token-length ratio is claimed. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
Follow the evidence

Sources & further reading

Explore the references behind this guide. External pages may change after our review.

  1. Introducing Gemma 3 270M: The compact model for hyper-efficient AI - Google Developers Blog
    Google · Accessed 7 Nov 2026
  2. Embedding — PyTorch 2.15 documentation
    PyTorch · Accessed 7 Nov 2026
  3. Linear — PyTorch 2.15 documentation
    PyTorch · Accessed 7 Nov 2026
  4. Summary of the tokenizers · Hugging Face
    Hugging Face · Accessed 7 Nov 2026

Article updated 7 Nov 2026.

Found something we should revisit?

Good explanations get better with thoughtful feedback.

Suggest a correction