What is the context window and what tricks extend it?
medium- The context window is the maximum number of tokens (prompt + response) the model can attend to.
- Extending it: RoPE scaling (position interpolation, YaRN), sparse/linear attention, sliding-window attention, retrieval-augmented long-context, and KV-cache tricks.
- Longer context helps but is not free — attention is quadratic in sequence length, and quality often degrades far from the beginning ('lost in the middle').