📦 UltraData Collection | 🌐 UltraData | 🤗 MiniCPM5 Series | 📖 Tech Report | 🤗 UltraData-Code Dataset
English | 中文
UltraData-Code-L2-Classifier is a suite of language-specific, file-level scorers designed for the 11 programming languages represented in UltraData-Code-L1.
For each language, we train and apply a dedicated L2 scorer to the corresponding files in UltraData-Code-L1. The selected files form UltraData-Code-L2, a corpus designed to concentrate interpretable computation and problem-solving logic. The resulting L2 corpus contains approximately 400B tokens and retains approximately 12.23% of L1 files overall.
Abstract: Code generation has become a core capability of large language models (LLMs), and code data is central to the pre-training process that develops it. As obtaining public code of sufficient quality becomes more difficult, further progress cannot rely on corpus expansion alone. Tiered data management instead applies increasingly targeted processing to smaller data pools, producing data states suited to different training objectives. Following this perspective, we present UltraData-Code as four connected data states spanning repository archival at L0, standardized natural code at L1, algorithmic selection at L2, and task-oriented synthesis at L3. L0 preserves repository data and provenance for reprocessing, while L1 applies scalable filtering, normalization, and near-deduplication for broad pre-training. L2 selects high-quality algorithmically relevant files using language-adaptive relevance signals and quality constraints, yielding approximately 400B tokens of UltraData-Code-L2 across 11 programming languages for focused continual pre-training. L3 converts selected implementations into structured programming exercises, yielding approximately 150B tokens of UltraData-Code-L3 across the same 11 languages for task-oriented mid-training or supervised fine-tuning (SFT). Under controlled 10B-token continual pre-training of a 1B model, L2 improves pass@1 over L1 by 7.80 percentage points (pp) on EvalPlus and 5.13pp on MultiPL-E. Replacing half of the L2 training tokens with L3 yields a further gain of 8.42pp and 8.07pp on the two benchmarks, respectively. Both gains increase when the training budget scales to 100B tokens. We have released our datasets and classifiers to support further research on LLMs.
The L2 framework is applied independently to each of the 11 languages in UltraData-Code-L1:
ALGO, WEB, TOOL, DATA, TEST, CONFIG, or EXCLUDE.algo_rel_score; the quality model outputs quality_score.EXCLUDE.
The 10B-token comparisons use the same 1B foundation model, training settings, decontamination, and evaluation protocol.
Python results: Algorithmic selection yields the strongest natural code result. UltraData-Code-L2-py improves the average EvalPlus pass@1 by 17.91 points over UltraData-Code-L1-py and by 8.46 points over Stack-Edu-py.
Multilingual results: L2 selection improves over L1 baselines. UltraData-Code-L2 exceeds UltraData-Code-L1 by 7.80 points on EvalPlus and 5.13 points on MultiPL-E, and exceeds Stack-Edu by 4.37 and 3.05 points, respectively.
Install the runtime dependencies:
pip install numpy torch pyarrowimport sys
sys.path.insert(0, "scripts")
from scorers import LanguageScorers
scorers = LanguageScorers.load("classifiers/cpp")
# float32 [N, 1024]; paths are repository-relative and aligned with embeddings
out = scorers.score(embeddings, paths)Use the matching language directory for each input language. Real repository-relative paths are required by the relevance model.
scripts/score_parquet.py accepts one Parquet file or recursively walks a directory. Inputs must contain an embedding column and either relative_path or meta.file_path.
SCORERS=classifiers/cpp
DATA_PATH=data/input
SAVE_PATH=data/output
python scripts/score_parquet.py \
--scorers ${SCORERS} \
--input ${DATA_PATH} \
--output-root ${SAVE_PATH} \
--batch-size 1024 \
--device cpu \
--apply-policyThe output mirrors the input directory structure and preserves all existing columns. Use --describe to inspect a scorer set, --limit N to process at most N Parquet files, or --algo-rel-min, --quality-min, and --exclude-categories to override policy values.
The classifier appends the following results to each input file:
category: {Predicted file role}
cls_confidence: {File role confidence}
algo_rel_score: {Algorithmic-relevance score}
quality_score: {Code quality score}
selected: {Whether the file passes the selection policy}category is one of ALGO, WEB, TOOL, DATA, TEST, CONFIG, or EXCLUDE.cls_confidence and algo_rel_score range from 0 to 1; quality_score ranges from 0 to 10.selected is added only when --apply-policy is enabled. It marks rows that pass the relevance threshold, the EXCLUDE veto, and the quality threshold; rows are not deleted.config.json provides defaults. Command-line options can override these defaults.This release builds on Qwen3-Embedding-0.6B, PyTorch, PyArrow. Thanks for their awesome work! Open-source contributions make UltraData-Code possible! 🙌
This project is released under the Apache 2.0 license.
If you find UltraData-Code or this classifier useful, please consider citing:
@article{tu2026ultradata,
title={{UltraData-Code}: From Raw Repositories to Algorithmically Dense and Task-Oriented Code Data},
author={Tu, Chengying and Zhao, Hengyu and Xue, Shuaikang and Qu, Zhongming and Zhou, Jihao and Lin, Xinle and Guo, Junshao and Fu, Zixuan and Ma, Qiang and Zhou, Jie and others},
journal={arXiv preprint arXiv:2610.23960},
year={2026}
}