Projects the final hidden state onto vocabulary logits. Often reusing the input embedding matrix (‘tied weights’).
Introduced inAug 2016Using the Output Embedding to Improve Language Models
The LM head is a single linear map from the model’s hidden width to one logit per vocabulary token; softmax over those logits gives next-token probabilities. Many models tie it to the input embedding matrix, saving hidden×vocab parameters (often several hundred million) at negligible quality cost. Common in small and mid-size models, less so at the largest scales.
Share of new models that have included an LM head over time.
Open any of these on hfviewer to find this block in the interactive architecture graph.
Browse all 2344 models with this in the catalog →
hfviewer renders the full architecture of 3,500+ Hugging Face models as interactive graphs. Hover any block to see what it does, with this model’s real numbers.
Browse all model graphs →