Improving FIM Code Completions via Context & Curriculum Based Learning
Not on the map. Why?
Abstract (arXiv)
Fill-in-the-Middle (FIM) models play a vital role in code completion tasks, leveraging both prefix and suffix context to provide more accurate and contextually relevant suggestions. This paper presents approaches to improve FIM code completion while addressing the challenge of maintaining low latency for real-time coding assistance. We enhance FIM code completion by incorporating context and curriculum examples in the training process. We identify patterns where completion suggestions fail more frequently, revealing complexities that smaller language models struggle with. To address these challenges, we develop a curriculum dataset by extracting hard-to-complete patterns from code repositories and generate context examples using semantic and static analysis tools (e.g. TSC compiler). We fine-tune various sized models, including StarCoder and DeepSeek, on this enhanced dataset. Our evaluation encompasses three key dimensions: the Santa Coder FIM task, the Amazon CCEval benchmark, and a new Multi-Line Infilling evaluation benchmark derived from SWE-bench. Comprehensive ablation studies across multiple model sizes reveal that while all fine-tuned models show improvements, the performance gains are more pronounced for smaller parameter models and incorporating difficult-to-complete examples, as part of curriculum learning, improves the code completion performance. This finding is particularly significant given the latency constraints of code completion tasks. While larger models like GPT and Claude perform well in multi-line completions but are prohibitively challenging to use given high latency, and our fine-tuned models achieve a balance between performance and latency. Finally, we validate our approach through online A/B testing, demonstrating tangible improvements in Completion Acceptance Rate (CAR) and Completion Persistence Rate (CPR), with zero latency impact.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). First posted on arXiv 21 Dec 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 4; 2026: 2.
6 papers.
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 23
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic Systemcited by 15
- 2025Planner Aware Path Learning in Diffusion Language Models Trainingcited by 14
- 2025From Output to Evaluation: Does Raw Instruction-Tuned Code LLMs Output Suffice for Fill-in-the-Middle Code Generation?cited by 1
- 2026Automated Customization of LLMs for Enterprise Code Repositories Using Semantic Scopescited by 0
- 2026Improving LLM Code Generation via Requirement-Aware Curriculum Reinforcement Learningcited by 0
- 2026Improving LLM Code Generation via Requirement-Aware Curriculum Reinforcement Learning1 May 2026
- 2026Automated Customization of LLMs for Enterprise Code Repositories Using Semantic Scopes5 Feb 2026
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic System10 Oct 2025
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
- 2025Planner Aware Path Learning in Diffusion Language Models Training27 Sep 2025
- 2025From Output to Evaluation: Does Raw Instruction-Tuned Code LLMs Output Suffice for Fill-in-the-Middle Code Generation?24 May 2025