Training language models on code contexts that span multiple related files—rather than isolated snippets—dramatically improves their ability to handle long contexts and understand complex codebases, even when this data makes up a small fraction of total training.
OctoLong is a pipeline that creates long, dependency-rich code contexts by automatically retrieving related code files across repositories.