Dataset Viewer
The dataset viewer is not available for this dataset.
Unexpected token '<', "<html> <h"... is not valid JSON

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

YAML Metadata Warning:The task_categories "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other

Real-FIM-Eval Benchmark

Real-FIM-Eval is a benchmark to evaluate Fill-in-the-Middle (FIM) capabilities of code LLMs in scenarios that reflect real-world code completion. Real-FIM-Eval is built using data from GitHub commits between Jan. 2025 and Feb. 2025. These commits originate from 228 permissively licensed GitHub repositories with 10,000+ stars, spanning the top 12 widely-used programming languages.

We process git commits using diff_match_patch (https://github.com/google/diff-match-patch) to identify line-level changes. The commits are then categorized into two splits: Add and Edit.

Construction of Fill-in-the-Middle (FIM) examples for the proposed Real-FIM-Eval benchmark splits, derived from real-world git commits.

  • Add (17,879 examples): This split uses git commits where a developer added a new segment of code into an existing file. To create the FIM prompt, we treat the added code segment as the "middle" part that the language model needs to predict. The code surrounding the addition forms the prefix (code before) and the suffix (code after).

  • Edit (13,922 examples): This split uses git commits where a developer modified existing code by removing a segment and replacing it with a new one. We present this task to LLMs in a conflict-merge format. The prompt includes the code context (prefix and suffix) and marks the original code segment (to be removed). The model is asked to infill the updated code segment.

Evaluation Metric

The evaluation metric is character-level perplexity (lower = better), calculated as:

exp(1n_chars(mid)imidlogpi) \exp\left(-\frac{1}{\mathrm{n\_chars}(\mathrm{mid})} \sum_{i\in\mathrm{mid}} \log p_{i}\right)

In this formula, p_i represents the probability the model assigns to the i-th token of the ground truth (only the "middle" part that the model is tasked to infill), and n_char(mid) is the total number of characters in that ground truth middle segment.

Statistics of Programming Languages

Language Num Examples
Python 6,271
Rust 4,727
Java 3,716
C++ 3,265
TypeScript 3,182
Go 2,587
Ruby 1,686
C# 1,563
JavaScript 1,502
Kotlin 1,440
PHP 1,396
Scala 466

Copyright Information

The dataset is a verbatim snapshot of source‑code files from public GitHub repositories. Each data example retains the exact license chosen by its original author(s). The repository of origin for every file is recorded in that data example’s repo field. To reuse or redistribute any code sample, you must comply with the license found in the upstream repository (see the LICENSE file in that repo for full terms). The dataset organization and the README.md file are licensed under Creative Commons Attribution 4.0 International (CC‑BY‑4.0).

Downloads last month
80

Paper for gonglinyuan/real_fim_eval