--- language: - en - zh license: apache-2.0 size_categories: - n>100B task_categories: - text-generation pretty_name: UltraData-Code tags: - llm - code - code-pretraining - algorithmic-code - synthetic-data configs: - config_name: UltraData-Code-L2 data_files: - split: cpp path: "data/UltraData-Code-L2/cpp/*.parquet" - split: cs path: "data/UltraData-Code-L2/cs/*.parquet" - split: go path: "data/UltraData-Code-L2/go/*.parquet" - split: java path: "data/UltraData-Code-L2/java/*.parquet" - split: js path: "data/UltraData-Code-L2/js/*.parquet" - split: php path: "data/UltraData-Code-L2/php/*.parquet" - split: py path: "data/UltraData-Code-L2/py/*.parquet" - split: r path: "data/UltraData-Code-L2/r/*.parquet" - split: rb path: "data/UltraData-Code-L2/rb/*.parquet" - split: rust path: "data/UltraData-Code-L2/rust/*.parquet" - split: sh path: "data/UltraData-Code-L2/sh/*.parquet" - config_name: UltraData-Code-L3 data_files: - split: cpp path: "data/UltraData-Code-L3/cpp/*.parquet" - split: cs path: "data/UltraData-Code-L3/cs/*.parquet" - split: go path: "data/UltraData-Code-L3/go/*.parquet" - split: java path: "data/UltraData-Code-L3/java/*.parquet" - split: js path: "data/UltraData-Code-L3/js/*.parquet" - split: php path: "data/UltraData-Code-L3/php/*.parquet" - split: py path: "data/UltraData-Code-L3/py/*.parquet" - split: r path: "data/UltraData-Code-L3/r/*.parquet" - split: rb path: "data/UltraData-Code-L3/rb/*.parquet" - split: rust path: "data/UltraData-Code-L3/rs/*.parquet" - split: sh path: "data/UltraData-Code-L3/sh/*.parquet" default_config_name: UltraData-Code-L2 --- # UltraData-Code
π¦ UltraData Collection | π UltraData | π€ MiniCPM5 Series | π Tech Report (Coming Soon)
English | δΈζ
## π Introduction UltraData-Code is a complete implementation of the [UltraData](https://ultradata.openbmb.cn/) [L0-L4 tiered data management framework](https://arxiv.org/pdf/2602.09003). It covers four code data states from L0 through L3, with each level corresponding to a distinct construction stage. The pipeline starts from approximately **192 million** public GitHub repositories at L0. This release provides **UltraData-Code-L2** (~**400B tokens**) and **UltraData-Code-L3** (~**150B tokens**) across **11 programming languages**. **L0: Repository archival.** We preserve the latest revision on the default branch of approximately 192 million public [GitHub](https://github.com/) repositories, together with code, directory structure, file relationships, and provenance metadata. This archive provides complete raw data and traceability for subsequent processing. **L1: Standardized natural code.** Starting from L0, we perform large-scale filtering, cleaning, format normalization, and near-duplicate deduplication. General rules remove oversized files, invalid paths, unsupported text, and obvious anomalies. Checks tailored to each language and file type then normalize and clean the remaining content. For deduplication, files are partitioned by extension. MinHash signatures are generated and LSH retrieves near-duplicate candidates. Similarity edges define connected components. For groups containing multiple near-duplicates, the highest ranked 50% are retained. Files with no detected near duplicate are all kept. The result is a standardized natural code corpus. **L2: Algorithmically relevant code.** Across 11 programming languages, we select algorithmically relevant code (**ALGO**) from L1. Each file receives a semantic embedding. File-role annotations and language-specific heuristics provide dual-cue supervision. An MLP relevance classifier learns a continuous relevance score. File-role predictions and a code-quality threshold complete the final selection. The selector covers core algorithm and data structure implementations as well as computational and problem-solving logic in DATA, WEB, TOOL, and TEST files. L2 contains approximately **400B tokens** and retains about 12.23% of L1 files. Under the same 1B base model and 10B-token continual pre-training budget, L2 improves over L1 by 7.80 and 5.13 points on EvalPlus and MultiPL-E, and over Stack-Edu by 4.37 and 3.05 points. **L3: Task-oriented synthesis.** Using ALGO data from L2 as seeds, we construct a standalone task description, solution analysis, reference implementation, and test code. The task is independent of the original code snippet. The analysis explains the algorithm, edge cases, and complexity. The reference implementation provides executable code that runs independently. The tests target the required behavior. Each real implementation is transformed into a structured training sample aligning task, reasoning, code, and verification. L3 covers the same 11 programming languages and contains approximately **150B tokens**. Under the same 1B base model and 10B-token continual pre-training budget, replacing half of the L2 training tokens with L3 further improves EvalPlus and MultiPL-E by 8.42 and 8.07 points over L2-only training. With the same 1:1 token mix, L2-L3 mixed training improves over the L2 + CodeAlchemy-code-qa mix by 5.57 and 7.80 points on EvalPlus and MultiPL-E. ## π’ What's New - **[2026.09.07]** The [***UltraData-Code***](https://huggingface.co/datasets/openbmb/UltraData-Code) dataset is released! The complete implementation of the [UltraData](https://ultradata.openbmb.cn/) [L0-L4 tiered data management framework](https://arxiv.org/pdf/2602.09003). It covers four code data states from L0 through L3, with each level corresponding to a distinct construction stage. This release currently open-sources **L2** (~400B tokens) and **L3** (~150B tokens) across 11 programming languages. πππ - **[2026.09.07]** ***[MiniCPM5-2B](https://huggingface.co/openbmb/MiniCPM5-2B) is released!***, the second model in the MiniCPM5 series after MiniCPM5-1B. It is a dense 2B Transformer that scales up the same training recipe, built for on-device, local deployment, and resource-constrained scenarios. It reaches **2B-class open-source SOTA**, remains competitive with 4B-class models, and shows particular advantages in coding, mathematics, long-context understanding, tool use, and agentic tasks. UltraData-RL-2609 serves as the core RL dataset for MiniCPM5-2B. πππ - **[2026.02.08]** The [***UltraData***](https://ultradata.openbmb.cn/) platform is now live, introducing the [L0-L4 tiered data management framework](https://arxiv.org/pdf/2602.09003). πππ ## π‘ Highlights > **Abstract:** Code generation is a core capability of large language models, and code data is central to the pretraining process that develops it. As code corpora grow, their scale, diversity, and quality increasingly shape the capabilities learned during pretraining. Following a tiered data management perspective, we present **UltraData-Code** as a family of four connected data states: repository archival at L0, standardized natural code at L1, algorithmic selection at L2, and task-oriented synthesis at L3. L0 archives the latest revision on the default branch of each public GitHub repository with its file structure, relationships, and provenance. L1 applies scalable filtering, normalization, and near deduplication to obtain standardized natural code. L2 selects algorithmically relevant files from L1 using language-adaptive signals from file roles and heuristics, together with code-quality constraints, yielding approximately 400B tokens across 11 programming languages. L3 applies task-oriented synthesis to algorithmic files from L2, turning each implementation into a structured programming exercise with aligned task, analysis, solution, and test fields, and generating approximately 150B tokens in the same 11 languages. Under controlled 10B-token continual pretraining of a 1B model, training on L2 instead of L1 raises pass@1 on EvalPlus by **7.80 points** and on MultiPL-E by **5.13 points**, while exceeding Stack-Edu by 4.37 and 3.05 points, respectively. Replacing half of the L2 training tokens with L3 yields a further gain of **8.42 points** on EvalPlus and **8.07 points** on MultiPL-E over training on L2 alone, while exceeding the strongest synthetic data baseline by 5.57 and 7.80 points, respectively. - **A connected code data construction pipeline:** UltraData-Code links repository archival and standardized natural code with fine-grained selection and structured synthesis, yielding approximately 400B tokens at L2 and 150B tokens at L3 across 11 programming languages. - **Fine-grained curation of algorithmically relevant code:** We introduce file-level algorithmic relevance as a selection objective and combine file-role cues with language-specific heuristic evidence to identify computational content beyond files explicitly labeled as algorithm implementations. - **Task-oriented synthesis grounded in implementations:** Each selected implementation serves as the common source for a task, analysis, solution, and test record, preserving computational intent while adding task semantics and structured supervision.