OctoLong: Cross-Repository Code Contexts Enhance Long-Context Modeling
A new study introduces OctoLong, a groundbreaking pipeline for context engineering that uses AST parsing, language server backends, and package managers to gather code references in a recursive manner. This method creates rich code contexts that include millions of tokens and addresses the challenge of limited long-distance dependencies in existing datasets, which mainly contain books, academic articles, and code repositories. The researchers utilized OctoLong to create OctoLong-Instruct, a series of long-context open language models based on base models with parameters between 600M and 14B. The training process involved extending the context mid-training on a mixture of about 50 billion tokens, incorporating approximately 6.2 billion tokens from OctoLong code contexts, plus around 10 billion tokens for instruction tuning. The paper is available on arXiv under the identifier 2608.05141.
Key facts
- OctoLong is a context engineering pipeline for curating dependency-rich code contexts.
- It uses AST parser, language server backend, and package manager for recursive retrieval of code references.
- OctoLong-Instruct is a suite of long-context open language models.
- Base models range from 600M to 14B parameters.
- Training included context-extension mid-training on a ~50B-token mixture.
- The mixture contains ~6.2B tokens of OctoLong code contexts.
- Instruction tuning followed with ~10B tokens.
- Paper available on arXiv:2608.05141.
Entities
Institutions
- arXiv