In this article
Tied embeddings share learned storage between two computational roles, so parameter identity and use count must be tracked separately.
The input embedding table converts token identifiers into vectors. An output layer converts hidden vectors into scores over the vocabulary. Weight tying connects these roles by reusing learned values, while their forward computations remain conceptually different operations.
A lookup and a projection consume the same table differently
At the input, a token identifier selects a table row. At the output, a hidden representation is compared through a vocabulary projection whose weights can be tied to that table when dimensions and architecture permit. One role selects a representation; the other produces candidate scores. Sharing does not mean the model has simply inverted its input lookup. The hidden representation has passed through contextual computation, and the output still needs the model’s defined scoring and probability transformation before token selection.
Shared storage changes parameter accounting
When a table is genuinely tied, counting its two appearances as independent parameter allocations overstates the distinct learned values. Conversely, two equal-shaped matrices are not tied merely because they have compatible dimensions or temporarily identical contents. An implementation needs a shared parameter relationship, not just a numerical coincidence. A proposed inspection can compare the configuration’s tying flag with the actual loaded parameters and serialization behavior. This connects the conceptual architecture to the concrete artifact rather than inferring sharing from a familiar family name.
Both roles can contribute to a training update
A shared parameter receives contributions from the computational paths in which it participates. Input-side use and output-side use can therefore influence the same learned table through the overall objective. The original output-embedding research analyses this relationship, while general autograd mechanics explain accumulation through shared dependencies. A learning exercise can use a compact vocabulary and inspect how a token’s table row is affected when it appears in an input and when it participates as an output candidate. These roles need separate interpretation even though storage is shared.
Vocabulary changes require a consistent shared contract
Adding vocabulary entries changes the row inventory required by the input and output roles. A tied configuration must preserve their intended correspondence after resizing, initialization, loading and saving. An updated tokenizer alone cannot supply meaningful learned values for new entries. For a deployment review, identify the exact vocabulary, matrix dimensions and tying relationship before comparing memory footprints or outputs. Weight tying is a concrete architectural choice with understandable accounting effects; it does not by itself establish that a model’s generated answers have better quality on an unrelated task.
Primary research and implementation references
Related engineering context
Reproducible inference stacks: preserving a GPU pilot’s result; A GPU inference benchmark you can trust.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.