- An official implementation of the paper Behind RoPE: How Does Causal Mask Encode Positional Information?
$pip install -r requirements.txt- FYI: tested with
transformers==4.52.4
- Each Jupyter notebook in the
conceptdirectory corresponds to a subsection of the paper:concept/math.ipynb: Figure 1concept/simulation.ipynb: Section 4.1concept/with_params.ipynb: Section 4.2concept/simulation_rope.ipynb: Section 5.1concept/rope_llms.ipynb: Section 5.2
- The outputs of each notebook are saved in the
figuresdirectory. - The model checkpoint is provided on huggingface.
@misc{kim2025ropedoescausalmask,
title={Behind RoPE: How Does Causal Mask Encode Positional Information?},
author={Junu Kim and Xiao Liu and Zhenghao Lin and Lei Ji and Yeyun Gong and Edward Choi},
year={2025},
eprint={2509.21042},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2509.21042},
}
