Rescales RoPE frequencies so a model trained on short contexts can operate on much longer ones.
Introduced inAug 2023YaRN: Efficient Context Window Extension of Large Language Models
YaRN and related RoPE-scaling schemes stretch the rotation frequencies of rotary embeddings so that positions beyond the training length still land in a range the model understands, usually with a temperature correction on attention. It is the standard way models advertise 128k+ contexts after being pretrained on much shorter windows.
Share of new models that have included YaRN context scaling over time.
Open any of these on hfviewer to find this block in the interactive architecture graph.
hfviewer renders the full architecture of 12,800+ Hugging Face models as interactive graphs. Hover any block to see what it does, with this model’s real numbers.
Browse all model graphs →