mlsanityData to 7 Oct 2026

Evaluation of LLMs on Syntax-Aware Code Fill-in-the-Middle Tasks

arXiv 2403.04814 ↗First posted 7 Mar 2024cs.CL cs.AI cs.LGcited by 24

Not on the map. Why?

Abstract (arXiv)

We introduce Syntax-Aware Fill-In-the-Middle (SAFIM), a new benchmark for evaluating Large Language Models (LLMs) on the code Fill-in-the-Middle (FIM) task. This benchmark focuses on syntax-aware completions of program structures such as code blocks and conditional expressions, and includes 17,720 examples from multiple programming languages, sourced from recent code submissions after April 2022 to minimize data contamination. SAFIM provides a robust framework with various prompt designs and novel syntax-aware post-processing techniques, facilitating accurate and fair comparisons across LLMs. Our comprehensive evaluation of 15 LLMs shows that FIM pretraining not only enhances FIM proficiency but also improves Left-to-Right (L2R) inference using LLMs. Our findings challenge conventional beliefs and suggest that pretraining methods and data quality have more impact than model size. SAFIM thus serves as a foundational platform for future research in effective pretraining strategies for code LLMs. The evaluation toolkit and dataset are available at https://github.com/gonglinyuan/safim, and the leaderboard is available at https://safimbenchmark.com.

Key facts. Cited by 24 papers in the map (data through 7 Oct 2026). Builds on 39 of its 48 references that are in the map. First posted on arXiv 7 Mar 2024.

Builds on

39 of 48 references.

References · 39

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Training language models to follow instructions with human feedbackcited by 15,712
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2021Program Synthesis with Large Language Modelscited by 3,509
  6. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  7. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  8. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  9. 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
  10. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  11. 2021GLM: General Language Model Pretraining with Autoregressive Blank Infillingcited by 1,026
  12. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
27 more
  1. 2021Measuring Coding Challenge Competence With APPScited by 879
  2. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  3. 2023Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingcited by 778
  4. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
  5. 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 612
  6. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  7. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
  8. 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
  9. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  10. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  11. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
  12. 2022The Stack: 3 TB of permissively licensed source codecited by 354
  13. 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 346
  14. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
  15. 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
  16. 2022Efficient Training of Language Models to Fill in the Middlecited by 248
  17. 2023Rethinking Benchmark and Contamination for Language Models with Rephrased Samplescited by 192
  18. 2022Multi-lingual Evaluation of Code Generation Modelscited by 158
  19. 2022MultiPL-E: A Scalable and Extensible Approach to Benchmarking Neural Code Generationcited by 132
  20. 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
  21. 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
  22. 2022Execution-Based Evaluation for Open-Domain Code Generationcited by 89
  23. 2022Natural Language to Code Generation in Interactive Data Science Notebookscited by 86
  24. 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
  25. 2019JuICe: A Large Scale Distantly Supervised Dataset for Open Domain Context-based Code Generationcited by 49
  26. 2023ToolCoder: Teach Code Generation Models to use API search toolscited by 37
  27. 2024AST-T5: Structure-Aware Pretraining for Code Generation and Understandingcited by 32

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 4; 2025: 13; 2026: 7.

24 papers.

Sort:

By area:

  1. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  2. 2025A Survey of Test-Time Compute: From Intuitive Inference to Deliberate Reasoningcited by 40
  3. 2025AutoP2C: An LLM-Based Agent Framework for Code Repository Generation from Multimodal Content in Academic Paperscited by 18
  4. 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic Systemcited by 15
  5. 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
  6. 2024Beyond Correctness: Benchmarking Multi-dimensional Code Generation for Large Language Modelscited by 9
  7. 2024Watson: A Cognitive Observability Framework for the Reasoning of LLM-Powered Agentscited by 8
  8. 2025Locus: Agentic Predicate Synthesis for Directed Fuzzingcited by 8
  9. 2025CopySpec: Accelerating LLMs with Speculative Copy-and-Paste Without Compromising Qualitycited by 6
  10. 2026From Completion to Editing: Unlocking Context-Aware Code Infilling via Search-and-Replace Instruction Tuningcited by 5
  11. 2025Comparative Analysis of Large Language Models for Context-Aware Code Completion using SAFIM Frameworkcited by 3
  12. 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 3
12 more
  1. 2025Structure-Aware Fill-in-the-Middle Pretraining for Codecited by 3
  2. 2025Code2Bench: Scaling Source and Rigor for Dynamic Benchmark Constructioncited by 3
  3. 2025VocabTailor: Dynamic Vocabulary Selection for Downstream Tasks in Small Language Modelscited by 2
  4. 2025Mellum: Production-Grade in-IDE Contextual Code Completion with Multi-File Project Understandingcited by 2
  5. 2025From Output to Evaluation: Does Raw Instruction-Tuned Code LLMs Output Suffice for Fill-in-the-Middle Code Generation?cited by 1
  6. 2026Evaluating and Achieving Controllable Code Completion in Code LLMcited by 1
  7. 2026Delulu: A Verified Multi-Lingual Benchmark for Code Hallucination Detection in Fill-in-the-Middle Taskscited by 1
  8. 2024In-Context Code-Text Learning for Bimodal Software Engineeringcited by 0
  9. 2026Playing Psychic: Using Thought Trees to Predict Reasoning Models Accuracy on Coding Taskscited by 0
  10. 2026Hide to Guide: Learning via Semantic Maskingcited by 0
  11. 2026Lost in the Flow with Code Talkers: Unveiling the Instruction-Tuning Tax of Large Language Models in Code Taskscited by 0
  12. 2026ER-JEPA: Experience Replay Improves Joint-Embedding Predictive Learning in Language Modelscited by 0