2608.05141v1 Aug 05, 2026 cs.AI

OctoLong: 여러 코드 저장소의 코드를 활용한 중간 단계 학습이 장문 컨텍스트 모델링 성능을 향상시킨다

OctoLong: Mid-Training On Cross-Repository Code Contexts Enhances Long-Context Modeling

Iryna Gurevych
Iryna Gurevych
Citations: 1,356
h-index: 17
Indraneil Paul
Indraneil Paul
Citations: 137
h-index: 4
F. Helm
F. Helm
Citations: 23
h-index: 2
Goran Glavas
Goran Glavas
Citations: 124
h-index: 6

언어 모델(LM)의 컨텍스트 길이는 인컨텍스트 학습, 자체 개선 및 장기적인 에이전트 기반 워크플로우에 대한 요구 사항 증가로 인해 급격히 늘어나고 있습니다. 그러나 기존의 장문 컨텍스트 데이터셋은 주로 책, 학술 논문 및 코드 저장소로 구성되어 있으며, 이는 유한한 자원이며 종종 장거리 의존성이 부족합니다. 본 연구에서는 OctoLong이라는 컨텍스트 엔지니어링 파이프라인을 소개합니다. 이 파이프라인은 AST 파서, 언어 서버 백엔드 및 패키지 관리자를 활용하여 코드 참조를 재귀적으로 검색하고, 수백만 토큰에 달하는 의존성이 풍부한 코드 컨텍스트를 구축할 수 있도록 지원합니다. 우리는 또한 OctoLong-Instruct라는 강력한 장문 컨텍스트 오픈 LM 모델을 개발했습니다. 이 모델은 6억 개에서 140억 개의 파라미터 크기를 가진 기본 모델을 기반으로 하며, 약 500억 토큰의 데이터셋(OctoLong 코드 컨텍스트가 약 62억 토큰)으로 중간 단계 학습을 진행한 후, 약 100억 토큰의 명령어 튜닝을 거쳤습니다. 우리의 실험 결과 및 18개의 최첨단 오픈 소스 장문 컨텍스트 LM과의 비교 평가에서, 기존 데이터셋의 12%만을 OctoLong 데이터로 대체하는 것만으로도 장거리 검색, 장기 상태 추적, 저장소 수준의 코드 이해 및 하위 작업 에이전트 성능에 상당한 향상을 가져올 수 있으며, 또한 단문 컨텍스트 코딩 시나리오에서 API 사용량을 향상시키는 것을 확인했습니다.

Original Abstract

Context lengths of language models (LMs) have dramatically increased, driven by the demands for in-context learning, self-improvement, and long-horizon agentic workflows. Existing long-context corpora, however, are dominated by books, academic articles, and code repositories, which are finite resources and often scarce in long-distance dependencies. In this work, we introduce OctoLong, a context engineering pipeline that instruments an AST parser, a language server backend, and a package manager to facilitate the recursive retrieval of code references, enabling the curation of dependency-rich code contexts of millions of tokens in length. We then train OctoLong-Instruct, a suite of capable long-context open LMs, derived from base models ranging in size from 600M to 14B parameters, via context-extension mid-training on a ~50B-token mixture containing ~6.2B tokens of OctoLong code contexts, followed by ~10B tokens of instruction tuning. Our training ablations and experimental evaluations against 18 state-of-the-art open-weight long-context LMs show that supplanting just 12% of traditional context-extension corpora with OctoLong data yields substantial gains in long-range retrieval, long-term state tracking, repository-level code understanding, and downstream agentic tasks, while also enhancing API usage in short-context coding scenarios.

0 Citations
0 Influential
8.5 Altmetric
42.5 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!