BigDong commited on
Commit
85182d8
·
1 Parent(s): 55bb75a

update README

Browse files
Files changed (2) hide show
  1. README.md +16 -16
  2. README_ZH.md +16 -16
README.md CHANGED
@@ -4,7 +4,7 @@ language:
4
  - zh
5
  license: apache-2.0
6
  size_categories:
7
- - n>100B
8
  task_categories:
9
  - text-generation
10
  pretty_name: UltraData-Code
@@ -94,31 +94,31 @@ UltraData-Code is a complete implementation of the [UltraData](https://ultradata
94
 
95
  **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.
96
 
97
- **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.
98
 
99
- **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.
100
 
101
  ## 📢 What's New
102
 
103
- - **[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. 🚀🚀🚀
104
  - **[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. 🚀🚀🚀
105
  - **[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). 🔍🔍🔍
106
 
107
  ## 💡 Highlights
108
 
109
- > **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.
110
 
111
- - **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.
112
- - **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.
113
- - **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.
114
 
115
  ## 📈 Evaluation Results
116
 
117
- The 10B-token comparisons use the same 1B base model, architecture, optimization settings, preprocessing, decontamination, and evaluation protocol.
118
 
119
  ### Python Results
120
 
121
- - **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. Ultra-Stack-v3-py reaches the second-highest natural code average, while UltraData-Code-L2-py records the strongest average overall among the natural code settings.
122
  - **Structured synthesis improves the matched mixture.** The equal-token UltraData-Code-L2-py + UltraData-Code-L3-py mixture reaches a **46.43** average pass@1, **3.30 points** above training on L2 alone and **4.46 points** above the matched L2 + SwallowCode-v2 mixture.
123
 
124
  <div align="center">
@@ -133,7 +133,7 @@ The 10B-token comparisons use the same 1B base model, architecture, optimization
133
 
134
  - **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.
135
  - **L3 synthesis provides a further gain.** Replacing half of the L2 training tokens with L3 yields **8.42** and **8.07 points** over training on L2 alone on EvalPlus and MultiPL-E. Under the same 1:1 token mix, UltraData-Code-L2-L3 exceeds the strongest reported synthetic baseline by **5.57** and **7.80 points**, respectively.
136
- - **The advantage persists during scaling.** At 100B tokens, the L2-L3 mixture reaches 57.06 on EvalPlus and 39.54 on MultiPL-E, exceeding training on L2 alone by 10.11 and 12.39 points and the matched CodeAlchemy-code-qa mixture by 10.86 and 9.60 points.
137
 
138
  <div align="center">
139
  <img src="assets/multilingual-training-dynamics.png" alt="Multilingual training dynamics" width="760"/>
@@ -153,7 +153,7 @@ Each row represents one selected source file. The fields are:
153
  - `repo_name`: source repository name.
154
  - `relative_path`: file path relative to the repository.
155
  - `content`: source code text.
156
- - `category`: predicted file role, such as `ALGO`, `WEB`, `TOOL`, `DATA`, `TEST`, `CONFIG`, or `EXCLUDE`.
157
  - `algo_rel_score`: algorithmic relevance score in `[0, 1]`.
158
  - `quality_score`: code quality score in `[0, 10]`.
159
 
@@ -162,12 +162,12 @@ Each row represents one selected source file. The fields are:
162
  Each row is a programming exercise grounded in a real implementation:
163
 
164
  - `uuid`: unique file identifier.
165
- - `content`: serialized training content.
166
  - `content_format`: serialization format for `content`.
167
  - `raw_content`: original generated record before serialization.
168
- - `task`: standalone problem statement.
169
  - `analysis`: algorithm, edge cases, and complexity discussion.
170
- - `solution`: reference implementation that runs independently.
171
  - `test`: generated test candidates.
172
  - `full_content`: serialization containing all generated fields.
173
  - `full_content_format`: serialization format for `full_content`.
@@ -200,4 +200,4 @@ If you find **UltraData-Code** useful in your research, please consider citing:
200
  publisher = {Hugging Face},
201
  howpublished = {\url{https://huggingface.co/datasets/openbmb/UltraData-Code}}
202
  }
203
- ```
 
4
  - zh
5
  license: apache-2.0
6
  size_categories:
7
+ - 100M<n<1B
8
  task_categories:
9
  - text-generation
10
  pretty_name: UltraData-Code
 
94
 
95
  **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.
96
 
97
+ **L2: Algorithmically relevant code.** Across 11 programming languages, we select approximately **400B tokens** of algorithmically relevant code from L1. We develop a language-adaptive selection framework that combines file role supervision with language-specific heuristic cues to learn algorithmic relevance beyond explicit ALGO files. The framework reuses precomputed semantic embeddings across role, relevance, and quality models, and applies role and quality constraints during selection. Under controlled 10B-token continual pre-training of a 1B model, 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.
98
 
99
+ **L3: Task-oriented synthesis.** We introduce a structured synthesis protocol that converts each algorithmically relevant implementation selected by L2 into a programming exercise, jointly generating a standalone task, analysis, solution, and test candidates from the same source implementation. This transformation preserves the source code's computational intent while adding explicit task and solution supervision for code generation. L3 covers the same 11 programming languages and contains approximately **150B tokens**. Under controlled 10B-token continual pre-training of a 1B model, 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.
100
 
101
  ## 📢 What's New
102
 
103
+ - **[2026.09.07]** The [***UltraData-Code***](https://huggingface.co/datasets/openbmb/UltraData-Code) dataset is released! It 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. This release currently open-sources **L2** (\~400B tokens) and **L3** (\~150B tokens) across 11 programming languages. 🚀🚀🚀
104
  - **[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. 🚀🚀🚀
105
  - **[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). 🔍🔍🔍
106
 
107
  ## 💡 Highlights
108
 
109
+ > **Abstract:** Code generation has become a core capability of large language models, and code data is a central part of the pre-training process that develops it. As code corpora continue to grow, their scale, diversity, and quality increasingly shape the capabilities learned during pre-training. Following a tiered data management perspective, we present **UltraData-Code** as a family of four connected data states, from repository archival at L0 through 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 then selects algorithmically relevant files from L1 using language-adaptive signals from file roles and heuristics, together with code quality constraints, yielding approximately 400B tokens of **UltraData-Code-L2**, spanning 11 programming languages. L3 applies task-oriented synthesis to algorithmic files from L2, turning each implementation into a structured programming exercise, generating approximately 150B tokens of **UltraData-Code-L3** in the same 11 languages. Under controlled 10B-token continual pre-training 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 L2-only training, while exceeding the strongest synthetic data baseline by 5.57 and 7.80 points, respectively. When the training budget increases to 100B tokens, gains from L2 selection and L3 synthesis further widen on both benchmarks.
110
 
111
+ - **A connected code data construction pipeline.** UltraData-Code links repository archival and standardized natural code with selection and structured synthesis, yielding approximately 400B tokens at L2 and 150B tokens at L3 across 11 programming languages.
112
+ - **Fine-grained curation of algorithmically relevant code.** We develop a language-adaptive selection framework that combines file role supervision with language-specific heuristic cues to learn algorithmic relevance beyond explicit ALGO files. The framework reuses precomputed semantic embeddings across role, relevance, and quality models, and applies role and quality constraints during selection.
113
+ - **Implementation-grounded, task-oriented synthesis.** We introduce a structured synthesis protocol that converts each algorithmically relevant implementation selected by L2 into a programming exercise, jointly generating a standalone task, analysis, solution, and test candidates from the same source implementation. This transformation preserves the source code's computational intent while adding explicit task and solution supervision for code generation.
114
 
115
  ## 📈 Evaluation Results
116
 
117
+ The 10B-token comparisons use the same 1B foundation model, training settings, decontamination, and evaluation protocol.
118
 
119
  ### Python Results
120
 
121
+ - **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.
122
  - **Structured synthesis improves the matched mixture.** The equal-token UltraData-Code-L2-py + UltraData-Code-L3-py mixture reaches a **46.43** average pass@1, **3.30 points** above training on L2 alone and **4.46 points** above the matched L2 + SwallowCode-v2 mixture.
123
 
124
  <div align="center">
 
133
 
134
  - **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.
135
  - **L3 synthesis provides a further gain.** Replacing half of the L2 training tokens with L3 yields **8.42** and **8.07 points** over training on L2 alone on EvalPlus and MultiPL-E. Under the same 1:1 token mix, UltraData-Code-L2-L3 exceeds the strongest reported synthetic baseline by **5.57** and **7.80 points**, respectively.
136
+ - **The advantage persists during scaling.** At 100B tokens, the L2-L3 mixture reaches 57.06 on EvalPlus and 39.54 on MultiPL-E, exceeding training on L2 alone by 10.11 and 12.39 points.
137
 
138
  <div align="center">
139
  <img src="assets/multilingual-training-dynamics.png" alt="Multilingual training dynamics" width="760"/>
 
153
  - `repo_name`: source repository name.
154
  - `relative_path`: file path relative to the repository.
155
  - `content`: source code text.
156
+ - `category`: predicted file role, such as `ALGO`, `WEB`, `TOOL`, `DATA`, `TEST`, `CONFIG`.
157
  - `algo_rel_score`: algorithmic relevance score in `[0, 1]`.
158
  - `quality_score`: code quality score in `[0, 10]`.
159
 
 
162
  Each row is a programming exercise grounded in a real implementation:
163
 
164
  - `uuid`: unique file identifier.
165
+ - `content`: serialization containing task and solution.
166
  - `content_format`: serialization format for `content`.
167
  - `raw_content`: original generated record before serialization.
168
+ - `task`: generated standalone problem statement.
169
  - `analysis`: algorithm, edge cases, and complexity discussion.
170
+ - `solution`: generated self-contained reference implementation.
171
  - `test`: generated test candidates.
172
  - `full_content`: serialization containing all generated fields.
173
  - `full_content_format`: serialization format for `full_content`.
 
200
  publisher = {Hugging Face},
201
  howpublished = {\url{https://huggingface.co/datasets/openbmb/UltraData-Code}}
202
  }
203
+ ```
README_ZH.md CHANGED
@@ -26,9 +26,9 @@ UltraData-Code 是基于 [UltraData](https://ultradata.openbmb.cn/) [L0-L4 分
26
 
27
  **L1:规范化自然代码层。** 在 L0 基础上进行规模化过滤清洗、格式规范化和近重复去重。通用规则排除过大文件、无效路径、不支持的文本和明显异常内容。随后根据语言和文件类型执行针对性的质量检查、归一化与内容清理。去重阶段按文件扩展名划分数据分区,使用 MinHash 生成签名并通过 LSH 检索候选近重复文件。相似度边用于构建连通分量。对于包含多个近重复文件的文件组,保留排名靠前的 50%。未发现近重复项的文件全部保留,最终形成标准化的自然代码语料。
28
 
29
- **L2:算法相关代码精层。** 面向 11 种编程语言,从 L1 中筛选算法相关代码(**ALGO**)系统为每个文件预计算义 embedding。文件角色标注与语言相关启发式规则共同构成双重监督信号。基于 MLP 的算法相关性分类器学习连续相关性分数,再结合文件角色分类和代码质量阈值完成最终选择。该方法不仅覆盖主要实现算法和数据构的 ALGO 文件,也能识别 DATA、WEB、TOOL 和 TEST 等其他文件角色中的计算过程问题求解逻辑。L2 规模为 **400B tokens**,保留 L1 中约 12.23% 的文件。在相同的 1B 基座模型和 10B-token 持续预训练预算下,L2 相比 L1 在 EvalPlus 和 MultiPL-E 上分别提升 7.80 和 5.13 个百分点,相比 Stack-Edu 分别提升 4.37 和 3.05 个百分点。
30
 
31
- **L3:任务导向合成层。** 以 L2 中 ALGO 类别数据为子,进行任务导向的结构化合成,构造独立任务描述解题分析、参考实现和测试代码生成的任务脱离原始代码片段独立成立。分析部分解释法、边界情况和复杂度。参考实现提供自包含可执行代码。测试代码验证任务所要求行为。每个真实实现由此转化为任务、推理、代码和验证相互对齐的结构化训练样本。L3 覆盖 11 种编程语言,规模约为 **150B tokens**。在相同的 1B 基座模型和 10B-token 持续预训练预算下,将一半 L2 训练 token 替换为 L3 后,模型在 EvalPlus 和 MultiPL-E 上较仅使用 L2 的训练分别进一步提升 8.42 和 8.07 个百分点。在相同的 1:1 等 token 配比下,L2-L3 混合训练模型相比 L2 与 CodeAlchemy-code-qa 的混合训练模型,在 EvalPlus 和 MultiPL-E 上分别提升 5.57 和 7.80 个百分点。
32
 
33
  ## 📢 最新动态
34
 
@@ -38,19 +38,19 @@ UltraData-Code 是基于 [UltraData](https://ultradata.openbmb.cn/) [L0-L4 分
38
 
39
  ## 💡 亮点
40
 
41
- > **摘要:** 代码生成大语言模型的核心能力,代码数据是培养能力的预训练过程的重要组成部分。随着代码语料规模不断增长,其规模、多样性质量日益决定模型在预训练中学的能力。遵循分级数据治理视角,我们 **UltraData-Code** 构建为四个相互接的数据状态:L0 仓库归档L1 规范化自然代码、L2 算法相关性精 L3 面向任务合成。L0 保留每个公开 GitHub 仓库默认分支的最新版本其文件结构、文件关系来源信息。L1 通过规模化过滤、规范化近重复去重得标准化自然代码。L2 基于文件角色语言自适应启发式信号代码质量约束,从 L1 中筛选算法相关文件,覆盖 11 种编程语言、约 400B tokens。L3 L2 中的算法相关文件为基础,将每个实现转任务、分析、解答和测试字段对齐的结构化编程练习,覆盖相同 11 种语言、约 150B tokens。在相同的 1B 模型和 10B-token 持续预训练设置下,使用 L2 替代 L1 ,EvalPlus 的 pass@1 提 **7.80 个百分点**,MultiPL-E 提升 **5.13 个百分点**,相比 Stack-Edu 分别提升 4.37 和 3.05 个百分点。将一半 L2 训练 token 替换为 L3 后,相仅使用 L2 训练,EvalPlus 进一步提升 **8.42 个百分点**,MultiPL-E 进一步提升 **8.07 个百分点**,相比最强的合成数据基线分别提升 5.57 和 7.80 个百分点。
42
 
43
- - **完整的代码数据构建流水线:** 将仓库归档和规范化自然代码与细粒度精、结构化合成连接起来,在 11 种编程语言上分别形成约 400B tokens 的 L2 和约 150B tokens 的 L3。
44
- - **细粒度算法相关代码精:** 将文件级算法相关性定义为择目标结合文件角色线索与语言特定启发式证据识别显式算法实现标签范围的计算内容
45
- - **面向任务且以实现为基础的合成:** 每个精选实现为任务、分析、解答测试记录的共同来源,在保留计算意图的同时补充任务语义和结构化监督。
46
 
47
  ## 📈 评测结果
48
 
49
- 10B-token 对比均使用相同的 1B 基座模型、模型架构、优化设置、预处理、去污流程和评测协议。
50
 
51
  ### Python 结果
52
 
53
- - **算法相关性精带来最强的自然代码结果。** UltraData-Code-L2-py 的 EvalPlus 平均 pass@1 比 UltraData-Code-L1-py 提升 **17.91 个百分点**,比 Stack-Edu-py 提升 **8.46 个百分点**。Ultra-Stack-v3-py 在自然代码设置中取得第二高的平均分,而 UltraData-Code-L2-py 在自然代码设置中取得最高平均分。
54
  - **结构化合成提升等 token 混合训练效果。** UltraData-Code-L2-py 与 UltraData-Code-L3-py 的等 token 混合训练平均 pass@1 达到 **46.43**,比仅使用 L2 高 **3.30 个百分点**,比对应的 L2 + SwallowCode-v2 混合训练高 **4.46 个百分点**。
55
 
56
  <div align="center">
@@ -63,9 +63,9 @@ UltraData-Code 是基于 [UltraData](https://ultradata.openbmb.cn/) [L0-L4 分
63
 
64
  ### 多语言结果
65
 
66
- - **L2 精优于自然代码基线。** UltraData-Code-L2 相比 UltraData-Code-L1 在 EvalPlus 和 MultiPL-E 上分别提升 **7.80** 和 **5.13 个百分点**,相比 Stack-Edu 分别提升 **4.37** 和 **3.05 个百分点**。
67
- - **L3 合成带来进一步提升。** 将一半 L2 训练 token 替换为 L3 后,相比仅使用 L2 的训练,EvalPlus 和 MultiPL-E 分别提升 **8.42** 和 **8.07 个百分点**。在相同的 1:1 token 配比下,UltraData-Code-L2-L3 混合训练相比最强的已报告合成数据基线,两个基准分别提升 **5.57** 和 **7.80 个百分点**。
68
- - **优势在规模扩展中持续存在。** 在 100B tokens 训练规模下,L2-L3 混合训练在 EvalPlus 和 MultiPL-E 上分别达到 57.06 和 39.54,相比仅使用 L2 的训练分别高 10.11 和 12.39 个百分点,相比对应的 CodeAlchemy-code-qa 混合训练分别高 10.86 和 9.60 个百分点
69
 
70
  <div align="center">
71
  <img src="assets/multilingual-training-dynamics.png" alt="多语言训练动态" width="760"/>
@@ -79,13 +79,13 @@ UltraData-Code 是基于 [UltraData](https://ultradata.openbmb.cn/) [L0-L4 分
79
 
80
  ### UltraData-Code-L2
81
 
82
- 每行对应一个精源代码文件,字段包括:
83
 
84
  - `uuid`:文件唯一标识。
85
  - `repo_name`:来源仓库名称。
86
  - `relative_path`:相对仓库根目录的文件路径。
87
  - `content`:代码文本。
88
- - `category`:预测的文件角色,如 `ALGO`、`WEB`、`TOOL`、`DATA`、`TEST`、`CONFIG` 或 `EXCLUDE`
89
  - `algo_rel_score`:算法相关性分数,范围为 `[0, 1]`。
90
  - `quality_score`:代码质量分数,范围为 `[0, 10]`。
91
 
@@ -94,12 +94,12 @@ UltraData-Code 是基于 [UltraData](https://ultradata.openbmb.cn/) [L0-L4 分
94
  每行是一个基于真实实现构建的编程练习,字段包括:
95
 
96
  - `uuid`:文件唯一标识。
97
- - `content`:序列化后的训练文本。
98
  - `content_format`:`content` 的序列化格式。
99
  - `raw_content`:序列化前的原始生成记录。
100
- - `task`:独立任务描述。
101
  - `analysis`:算法、边界情况与复杂度分析。
102
- - `solution`:自包含参考实现。
103
  - `test`:生成的测试候选。
104
  - `full_content`:包含全部生成字段的序列化文本。
105
  - `full_content_format`:`full_content` 的序列化格式。
 
26
 
27
  **L1:规范化自然代码层。** 在 L0 基础上进行规模化过滤清洗、格式规范化和近重复去重。通用规则排除过大文件、无效路径、不支持的文本和明显异常内容。随后根据语言和文件类型执行针对性的质量检查、归一化与内容清理。去重阶段按文件扩展名划分数据分区,使用 MinHash 生成签名并通过 LSH 检索候选近重复文件。相似度边用于构建连通分量。对于包含多个近重复文件的文件组,保留排名靠前的 50%。未发现近重复项的文件全部保留,最终形成标准化的自然代码语料。
28
 
29
+ **L2:算法相关代码精层。** 面向 11 种编程语言,从 L1 中筛选约为 **400B tokens** 的算法相关代码。我们提出一种言自适应筛选框架,将文件角色监督与语言特定启发式线索结合,学习超越显式 ALGO 文件的算法相关性。该框架在文件角色、算法相关性和代码质量模型之间复用预计算语义表征,最终结角色与质量束完成筛选。在相同的 1B 基座模型和 10B-token 持续预训练预算下,L2 相比 L1 在 EvalPlus 和 MultiPL-E 上分别提升 7.80 和 5.13 个百分点,相比 Stack-Edu 分别提升 4.37 和 3.05 个百分点。
30
 
31
+ **L3:任务导向合成层。** 我们提出了一种结构化合成协议将 L2 选定的每个算法相关实现转换为编程练习,从而从同一源实现中共同生成独立任务、分析、解决方案和测试用例该变换在保留源代码意图同时,为代码生成添加了明确的任务与解决方案监督。L3 覆盖相同的 11 种编程语言,规模约为 **150B tokens**。在相同的 1B 基座模型和 10B-token 持续预训练预算下,将一半 L2 训练 token 替换为 L3 后,模型在 EvalPlus 和 MultiPL-E 上较仅使用 L2 的训练分别进一步提升 8.42 和 8.07 个百分点。
32
 
33
  ## 📢 最新动态
34
 
 
38
 
39
  ## 💡 亮点
40
 
41
+ > **摘要:** 代码生成逐渐成为大语言模型的核心能力,代码数据是培养这一能力的预训练过程关键组成部分。随着代码语料规模不断增长,其规模、多样性质量日益影响模型在预训练阶段的能力。遵循分级数据治理视角,我们提出 **UltraData-Code**,将其构建为四个相互接的数据状态组成的数据家族L0 的代码仓库归档,到 L1 的标准化自然代码、L2 算法导向筛,再到 L3 任务导向合成。L0 归档每个公开 GitHub 仓库默认分支的最新版本,并保留其文件结构、关联关来源信息。L1 通过可扩展的过滤、规范化近重复去重,获得标准化自然代码。随后,L2 基于文件角色与启发式规则构成的语言自适应信号,并结合代码质量约束,从 L1 中筛选算法相关文件,最终得到覆盖 11 种编程语言、规模 400B tokens 的 **UltraData-Code-L2**。L3 L2 中的算法文件实施任务导向合成,将每个实现转为结构化编程练习,生成覆盖相同 11 种语言、规模 150B tokens 的 **UltraData-Code-L3**。在相同的 10B-token 持续预训练设置下,对一个 1B 模型使用 L2 而非 L1 进行训练可使其在 EvalPlus 和 MultiPL-E 上的 pass@1 分别 **7.80 个百分点** **5.13 个百分点**,同时分别超过 Stack-Edu 4.37 个百分点和 3.05 个百分点。将一半 L2 训练 tokens 替换为 L3 后,相较于仅使用 L2 训练,模型在 EvalPlus 和 MultiPL-E 上可进一步提升 **8.42 个百分点** **8.07 个百分点**,同时分别超过最强的合成数据基线 5.57 个百分点和 7.80 个百分点。当训练预算增加至 100B tokens 时,L2 筛选与 L3 合成在两个基准上的增益均进一步扩大。
42
 
43
+ - **完整的代码数据构建流水线:** 将仓库归档和规范化自然代码与细粒度精、结构化合成连接起来,在 11 种编程语言上分别形成约 400B tokens 的 L2 和约 150B tokens 的 L3。
44
+ - **细粒度算法相关代码精:** 我们提出一种语言自适应筛框架文件角色监督与语言特定启发式线索结合学习显式 ALGO 文件的算法相关性。该框架在文件角色、算法相关性和代码质量模型之间复用预计算语义表征,最终结合角色与质量约束完成筛选
45
+ - **任务导向合成:** 我们提出一种结构化合成方案,将 L2 筛选出的每个算法相关实现转化一道编程练习,并基于同一源实现联合生成独立完整的任务、分析、解答与候选测试用例。该转换既保留了源代码的计算意图,又为代码生成引入了显式的任务监督与解答监督
46
 
47
  ## 📈 评测结果
48
 
49
+ 10B-token 对比均使用相同的 1B 基座模型、训练设置、去污流程和评测协议。
50
 
51
  ### Python 结果
52
 
53
+ - **算法相关性精带来最强的自然代码结果。** UltraData-Code-L2-py 的 EvalPlus 平均 pass@1 比 UltraData-Code-L1-py 提升 **17.91 个百分点**,比 Stack-Edu-py 提升 **8.46 个百分点**。
54
  - **结构化合成提升等 token 混合训练效果。** UltraData-Code-L2-py 与 UltraData-Code-L3-py 的等 token 混合训练平均 pass@1 达到 **46.43**,比仅使用 L2 高 **3.30 个百分点**,比对应的 L2 + SwallowCode-v2 混合训练高 **4.46 个百分点**。
55
 
56
  <div align="center">
 
63
 
64
  ### 多语言结果
65
 
66
+ - **L2 精优于自然代码基线。** UltraData-Code-L2 相比 UltraData-Code-L1 在 EvalPlus 和 MultiPL-E 上分别提升 **7.80** 和 **5.13 个百分点**,相比 Stack-Edu 分别提升 **4.37** 和 **3.05 个百分点**。
67
+ - **L3 合成带来进一步提升。** 将一半 L2 训练 token 替换为 L3 后,相比仅使用 L2 的训练,EvalPlus 和 MultiPL-E 分别提升 **8.42** 和 **8.07 个百分点**。在相同的 1:1 token 配比下,UltraData-Code-L2-L3 混合训练相比最强的合成数据基线,两个基准分别提升 **5.57** 和 **7.80 个百分点**。
68
+ - **优势在规模扩展中持续存在。** 在 100B tokens 训练规模下,L2-L3 混合训练在 EvalPlus 和 MultiPL-E 上分别达到 57.06 和 39.54,相比仅使用 L2 的训练分别高 10.11 和 12.39 个百分点。
69
 
70
  <div align="center">
71
  <img src="assets/multilingual-training-dynamics.png" alt="多语言训练动态" width="760"/>
 
79
 
80
  ### UltraData-Code-L2
81
 
82
+ 每行对应一个精源代码文件,字段包括:
83
 
84
  - `uuid`:文件唯一标识。
85
  - `repo_name`:来源仓库名称。
86
  - `relative_path`:相对仓库根目录的文件路径。
87
  - `content`:代码文本。
88
+ - `category`:预测的文件角色,如 `ALGO`、`WEB`、`TOOL`、`DATA`、`TEST`、`CONFIG`。
89
  - `algo_rel_score`:算法相关性分数,范围为 `[0, 1]`。
90
  - `quality_score`:代码质量分数,范围为 `[0, 10]`。
91
 
 
94
  每行是一个基于真实实现构建的编程练习,字段包括:
95
 
96
  - `uuid`:文件唯一标识。
97
+ - `content`:包含 task 和 solution 字段的序列化文本。
98
  - `content_format`:`content` 的序列化格式。
99
  - `raw_content`:序列化前的原始生成记录。
100
+ - `task`:生成的独立任务描述。
101
  - `analysis`:算法、边界情况与复杂度分析。
102
+ - `solution`:生成的自包含参考实现。
103
  - `test`:生成的测试候选。
104
  - `full_content`:包含全部生成字段的序列化文本。
105
  - `full_content_format`:`full_content` 的序列化格式。