← All questions
LLM FoundationsMedium· Position Encodings· Context Length

What breaks when you deploy a model trained with absolu...

When a model encounters positions beyond its training length (L-1), it attempts to access embedding rows that were never trained. This causes the model to produce incoherent output, typically manifesting as NaN values or near-uniform probability distributions. Fixing this requires continued training with an extended position table, rather than just architectural changes.

Code playground (Python)