Datasets › SAFIM
SAFIM (Syntax-Aware Fill-In-the-Middle)
Syntax-Aware Fill-in-the-Middle (SAFIM) is a benchmark for evaluating Large Language Models (LLMs) on the code Fill-in-the-Middle (FIM) task. SAFIM has three subtasks: Algorithmic Block Completion, Control-Flow Expression Completion, and API Function Call Completion. SAFIM is sourced from code submitted from April 2022 to January 2023 to minimize the impact of data contamination on evaluation results.
- Authors: Linyuan Gong, Sida Wang, Mostafa Elhoushi, Alvin Cheung
- Paper: https://arxiv.org/abs/2403.04814
- Huggingface Dataset: https://huggingface.co/datasets/gonglinyuan/safim
- Leaderboard: https://safimbenchmark.com
- Code & Submission Instructions: https://github.com/gonglinyuan/safim
The SAFIM benchmark is partially derived from problem descriptions and code solutions from https://codeforces.com. According to the license of CodeForces, you may publish the texts of Codeforces problems in any open sources, but you must preserve a direct link to the site.
Benchmarks archive 2025-07-28
All 1 leaderboard whose dataset resolves to this page shown (sort by any header). "First row" is the archive's own first row at snapshot, in the archive's row order; nothing here re-ranks and metric direction is not asserted.
| First row (archive order) | Paper | Code | ||||
|---|---|---|---|---|---|---|
| Code Completion | SAFIM | deepseek-coder-33b-base Average 69.01 | Evaluation of LLMs on Syntax-Aware Code Fill-in-the-Middle Tasks | gonglinyuan/safim | 15 | Compare |
Papers archive 2025-07-28
1 shown of 1 paper with a leaderboard row on this dataset's benchmarks, newest first. The archive's own "papers using this dataset" list was never published, so this is the benchmark-backed subset; the archive's count for this dataset is 5. The Syntology column is from Syntology's graph (read 2026-09-24), stated per sample; it is not part of any archive number.
| Date | Samples run Syntology | |||
|---|---|---|---|---|
| Evaluation of LLMs on Syntax-Aware Code Fill-in-the-Middle Tasks | 1 | 15 | 7 Mar 2024 | ran 2 of 2 samples (0 unverified) |
Dataset loaders archive 2025-07-28
No loader listed in the archive.
Tasks archive 2025-07-28
License archive 2025-07-28
Modalities archive 2025-07-28
Languages archive 2025-07-28
Variants archive 2025-07-28
- SAFIM
1 variant name, as the archive lists them.
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections