Unembedding Produces One Logit per Vocabulary Token

Unembedding maps each width-four final record to eight vocabulary logits. Calculate the complete tied row, distinguish logits from probabilities, and apply softmax across the vocabulary axis.

Unembedding maps each final model-width record to one score for every vocabulary token. With H:(B,T,dmodel)H:(B,T,d_{model}) and WU:(dmodel,V)W_U:(d_{model},V),

Z=HWU:(B,T,V).Z=HW_U:(B,T,V).

The values in ZZ are logits. They are not probabilities and do not need to sum to 1.

Calculate One Tied Logit Row

Under weight tying, WU=EW_U=E^\top. Use

h[0.426401,0.852803,0.426401,1.705606].h\approx[-0.426401,-0.852803,-0.426401,1.705606].

The logit for token C is the dot product with its embedding row EC=[0,0,0,1]E_C=[0,0,0,1]:

zC=hEC=1.705606.z_C=h\cdot E_C=1.705606.

The A logit is 0.852803-0.852803. The <eos> embedding is [1,0,0,1][1,0,0,1], so

zeos=0.426401+1.705606=1.279205.z_{eos}=-0.426401+1.705606=1.279205.

Calculating every token gives approximately

[0.4264,0.8528,0.4264,1.7056,1.2792,1.2792,1.2792,1.2792].[-0.4264,-0.8528,-0.4264,1.7056,-1.2792,-1.2792,1.2792,1.2792].

C has the largest logit in this illustrative row. These sparse untrained weights provide arithmetic, not a claim about learned language behavior.

Softmax Uses the Vocabulary Axis

For each (b,t)(b,t) row, softmax normalizes across V=8V=8. Normalizing across time would make positions compete with one another and would not define a next-token distribution. Stable implementations subtract the row maximum before exponentiation.

Top-logit selection can be performed without materializing probabilities, but probabilities or log-probabilities are required for calibrated sampling and cross-entropy calculations.

Q1. Calculate a tied token logit

For the row hh above and token Y embedding [0,0,1,1][0,0,1,1], what is the tied logit, rounded to six decimal places?

Compute it first, then check your number.

Hint
Use 0.426401+1.705606-0.426401+1.705606.
Solution
The logit is approximately 1.2792051.279205.
Not attempted
Review

Not marked done.

Pause and reflect

In your own words, note what you understood, what remains unclear, or what you want to revisit. The note stays with this lesson.

0 of 1 exercises marked done

Review

Not marked done.

LLM PrimerUnembedding Produces One Logit per Vocabulary Tokenhttps://llmprimer.com/transformers/decoder-only-language-models/unembedding-produces-one-logit-per-vocabulary-token© 2026 LLM Primer