UltraData-Code
收藏资源简介:
UltraData-Code 是 UltraData L0-L4 分层数据管理框架的完整实现,专注于代码预训练数据。该数据集涵盖了从原始仓库归档到面向任务合成的四个阶段:L0 阶段归档了约1.92亿个公开GitHub仓库的最新快照;L1 阶段通过大规模过滤、清洗和去重获得标准化自然代码;L2 阶段利用语言自适应选择框架从L1中筛选出约400B tokens的算法相关代码,覆盖11种编程语言(C++、C#、Go、Java、JavaScript、PHP、Python、R、Ruby、Rust、Shell);L3 阶段将L2中的每个算法实现转化为结构化的编程练习,生成约150B tokens的面向任务合成数据。L2数据包含字段:uuid、repo_name、relative_path、content、category(文件角色)、algo_rel_score(算法相关性分数)、quality_score(质量分数)。L3数据包含字段:uuid、content、content_format、raw_content、task、analysis、solution、test、full_content、full_content_format。该数据集适用于大规模语言模型的代码预训练、持续预训练以及代码生成任务。在1B模型10B token的持续预训练实验中,使用L2相比L1在EvalPlus上提升7.80分,在MultiPL-E上提升5.13分;将L2一半token替换为L3后进一步分别提升8.42分和8.07分。
UltraData-Code is a complete implementation of the UltraData L0-L4 hierarchical data management framework, focusing on code pre-training data. The dataset covers four stages from raw repository archiving to task-oriented synthesis: L0 archives the latest snapshots of approximately 192 million public GitHub repositories; L1 obtains standardized natural code through large-scale filtering, cleaning, and deduplication; L2 uses a language-adaptive selection framework to filter about 400B tokens of algorithm-related code from L1, covering 11 programming languages (C++, C#, Go, Java, JavaScript, PHP, Python, R, Ruby, Rust, Shell); L3 transforms each algorithm implementation in L2 into structured programming exercises, generating approximately 150B tokens of task-oriented synthetic data. L2 data fields include: uuid, repo_name, relative_path, content, category, algo_rel_score, quality_score. L3 data fields include: uuid, content, content_format, raw_content, task, analysis, solution, test, full_content, full_content_format. The dataset is suitable for code pre-training, continual pre-training, and code generation tasks of large language models. In a 1B model 10B token continual pre-training experiment, using L2 improved EvalPlus by 7.80 points and MultiPL-E by 5.13 points compared to L1; replacing half of L2 tokens with L3 further improved by 8.42 and 8.07 points respectively.
UltraData-Code 数据集
基本信息
- 数据集名称: UltraData-Code
- 发布机构: openbmb
- 语言: 英语(en)、中文(zh)
- 许可证: Apache 2.0
- 数据集规模: 100M < n < 1B
- 任务类型: 文本生成(text-generation)
- 标签: llm、code、code-pretraining、algorithmic-code、synthetic-data
数据集简介
UltraData-Code是对UltraData L0-L4分级数据管理框架的完整实现,涵盖从L0到L3四个代码数据阶段。该数据集从约1.92亿个公共GitHub仓库出发,本次开源发布UltraData-Code-L2(约400B tokens)和UltraData-Code-L3(约150B tokens),覆盖11种编程语言。
数据分级构建流程
| 层级 | 阶段名称 | 说明 |
|---|---|---|
| L0 | 仓库归档 | 保留约1.92亿个公共GitHub仓库默认分支的最新版本,包含代码、目录结构、文件关系和来源元数据 |
| L1 | 标准化自然代码 | 进行大规模过滤、清洗、格式规范化和近似去重,生成标准化的自然代码语料 |
| L2 | 算法相关代码 | 跨11种编程语言从L1中筛选约400B tokens的算法相关代码 |
| L3 | 面向任务的合成 | 将L2选中的算法实现转化为编程练习题,同时生成独立任务、分析、解决方案和候选测试,约含150B tokens |
数据集配置
该数据集包含两个配置:
UltraData-Code-L2(默认配置):包含cpp、cs、go、java、js、php、py、r、rb、rust、sh共11种编程语言的数据分割。
UltraData-Code-L3:包含cpp、cs、go、java、js、php、py、r、rb、rust、sh共11种编程语言的数据分割。
数据格式
UltraData-Code-L2
每一行代表一个被选中的源文件,字段包括:
- uuid: 唯一文件标识符
- repo_name: 源仓库名称
- relative_path: 相对于仓库的文件路径
- content: 源代码文本
- category: 预测的文件角色(如ALGO、WEB、TOOL、DATA、TEST、CONFIG)
- algo_rel_score: 算法相关性评分,范围[0, 1]
- quality_score: 代码质量评分,范围[0, 10]
UltraData-Code-L3
每一行代表一个基于真实实现生成的编程练习,字段包括:
- uuid: 唯一文件标识符
- content: 包含任务和解决方案的序列化内容
- content_format: content的序列化格式
- raw_content: 序列化前的原始生成记录
- task: 生成的独立问题陈述
- analysis: 算法、边界情况和复杂度讨论
- solution: 生成的独立参考实现
- test: 生成的测试候选
- full_content: 包含所有生成字段的序列化内容
- full_content_format: full_content的序列化格式
评估结果亮点
Python评测
- 相比L1,L2在EvalPlus pass@1平均分上提升17.91分;相比Stack-Edu提升8.46分
- L2与L3等量混合训练达到46.43的平均pass@1,比单独使用L2高出3.30分
多语言评测
- L2在EvalPlus上超过L1达7.80分,在MultiPL-E上超过5.13分
- L2与L3混合训练相比仅使用L2,在EvalPlus和MultiPL-E上分别提升8.42分和8.07分
- 在100B tokens训练预算下,L2-L3混合在EvalPlus上达57.06分,在MultiPL-E上达39.54分
使用与许可须知
- 数据集基于Apache 2.0许可证发布
- 用户须同时遵守每个原始源仓库的许可证条款
- 未经原作者或本机构书面许可,禁止任何机构或第三方平台直接转发、镜像、重新托管或对项目内容进行商业性重新包装和发布
- 数据集不应包含明文密钥或未经授权的个人数据;如发现敏感内容可联系页面渠道进行删除请求




