Scaling Granite Code Models to 128K Context
Not on the map. Why?
Abstract (arXiv)
This paper introduces long-context Granite code models that support effective context windows of up to 128K tokens. Our solution for scaling context length of Granite 3B/8B code models from 2K/4K to 128K consists of a light-weight continual pretraining by gradually increasing its RoPE base frequency with repository-level file packing and length-upsampled long-context data. Additionally, we also release instruction-tuned models with long-context support which are derived by further finetuning the long context base models on a mix of permissively licensed short and long-context instruction-response pairs. While comparing to the original short-context Granite code models, our long-context models achieve significant improvements on long-context tasks without any noticeable performance degradation on regular code completion benchmarks (e.g., HumanEval). We release all our long-context Granite code models under an Apache 2.0 license for both research and commercial use.
Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Builds on 18 of its 21 references that are in the map. First posted on arXiv 18 Jul 2024.
Builds on
18 of 21 references.
References · 18
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2023MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Modelscited by 735
- 2023MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuningcited by 487
- 2023Ring Attention with Blockwise Transformers for Near-Infinite Contextcited by 457
- 2023How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resourcescited by 408
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
- 2023Effective Long-Context Scaling of Foundation Modelscited by 303
- 2024Data Engineering for Scaling Language Models to 128K Contextcited by 186
- 2023Platypus: Quick, Cheap, and Powerful Refinement of LLMscited by 150
- 2024CodeGemma: Open Code Models Based on Gemmacited by 150
6 more
- 2021Sequence Parallelism: Long Sequence Training from System Perspectivecited by 126
- 2024Granite Code Models: A Family of Open Foundation Models for Code Intelligencecited by 117
- 2023LongCoder: A Long-Range Pre-trained Language Model for Code Completioncited by 112
- 2024API-BLEND: A Comprehensive Corpora for Training and Benchmarking API LLMscited by 39
- 2024RepoQA: Evaluating Long Context Code Understandingcited by 35
- 2024Stable Code Technical Reportcited by 16
Built on by
Citing papers per year: 2024: 3; 2025: 5; 2026: 3.
11 papers.
- 2025Context Length Alone Hurts LLM Performance Despite Perfect Retrievalcited by 127
- 2025Token Weighting for Long-Range Language Modelingcited by 14
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolationcited by 10
- 2024VisualCoder: Guiding Large Language Models in Code Execution with Fine-grained Multimodal Chain-of-Thought Reasoningcited by 3
- 2024Data-Prep-Kit: getting your data ready for LLM application developmentcited by 2
- 2025Classifier-Augmented Generation for Structured Workflow Predictioncited by 1
- 2025MATCH: Task-Driven Code Evaluation through Contrastive Learningcited by 1
- 2025Modality Agnostic Efficient Long Range Encodercited by 0
- 2026DynamicMCPBench: A Trace-Grounded, Effect-Scored Benchmark for LLM Agents over Live MCP Serverscited by 0
- 2026E8 Lattice Key Quantization for Low-Bit KV-Cache Compressioncited by 0
- 2026BELT : BEhavior-Aligned Low-Rank KV Cache Compression with Learned Top-k Rank Allocationcited by 0
- 2026BELT : BEhavior-Aligned Low-Rank KV Cache Compression with Learned Top-k Rank Allocation13 Oct 2026
- 2026E8 Lattice Key Quantization for Low-Bit KV-Cache Compression11 Oct 2026
- 2026DynamicMCPBench: A Trace-Grounded, Effect-Scored Benchmark for LLM Agents over Live MCP Servers10 Jul 2026
- 2025MATCH: Task-Driven Code Evaluation through Contrastive Learning27 Oct 2025
- 2025Classifier-Augmented Generation for Structured Workflow Prediction10 Oct 2025
- 2025Context Length Alone Hurts LLM Performance Despite Perfect Retrieval6 Oct 2025
- 2025Modality Agnostic Efficient Long Range Encoder25 Jul 2025
- 2025Token Weighting for Long-Range Language Modeling12 Mar 2025
- 2024VisualCoder: Guiding Large Language Models in Code Execution with Fine-grained Multimodal Chain-of-Thought Reasoning30 Oct 2024
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolation7 Oct 2024
- 2024Data-Prep-Kit: getting your data ready for LLM application development26 Sep 2024