BigDong commited on
Commit
2fa042d
·
1 Parent(s): ab49677

update readme

Browse files
Files changed (4) hide show
  1. README.md +47 -23
  2. README_ZH.md +68 -51
  3. assets/ultrax-logo.png +0 -3
  4. assets/ultrax_pipeline.png +0 -3
README.md CHANGED
@@ -10,20 +10,22 @@ tags:
10
  pipeline_tag: text-generation
11
  ---
12
 
13
- # UltraX
14
-
15
- <div align="center">
16
- <img src="assets/ultrax-logo.png" width="500"/>
17
- </div>
18
 
19
  <p align="center">
20
- <b>Refining Pre-Training Data at Scale with Adaptive Programmatic Editing</b>
 
 
 
 
 
 
21
  </p>
22
 
23
  <p align="center">
24
- <a href="">📜 Paper</a> |
25
- <a href="">💻 Code</a> |
26
- <a href="">🤗 Datasets</a> |
27
  <a href="https://huggingface.co/collections/openbmb/ultradata">📦 UltraData Collection</a>
28
  </p>
29
 
@@ -44,13 +46,24 @@ This repository provides the **UltraX refinement models**, which are trained via
44
  | **UltraX-No-Instruction** | Ablation variant: trained without system instruction |
45
  | **UltraX-Preservation-Weighted** | Ablation variant: trained with preservation-weighted sampling (60% keep_all) |
46
 
 
 
 
 
 
 
 
 
 
 
 
47
  ## 🔬 Pipeline Overview
48
 
49
  <div align="center">
50
- <img src="assets/ultrax_pipeline.png" width="800"/>
51
  </div>
52
 
53
- ## 💡 Model Details
54
 
55
  All models are trained with the following configuration:
56
 
@@ -72,6 +85,19 @@ All models are trained with the following configuration:
72
 
73
  - **UltraX-Preservation-Weighted:** Trained with preservation-weighted sampling where keep_all accounts for 60% of training data. Shows stronger performance on certain tasks (ARC-C, ARC-E, OBQA, SciQ), demonstrating the trade-off between editing aggressiveness and content preservation.
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  ## 🔧 Function Space
76
 
77
  The model predicts operations from the following function space:
@@ -95,16 +121,14 @@ replace_str(5, 'Click here to subscribe', '')
95
  remove_lines(12, 15)
96
  ```
97
 
98
- ## 📈 Evaluation Results
99
 
100
- Performance comparison on FineWeb (20B tokens, 1B MiniCPM, 10 benchmarks, zero-shot):
 
101
 
102
- | Method | ARC-C | ARC-E | CSQA | HellaS | MMLU | OBQA | PIQA | SIQA | WinoG | SciQ | **Avg** | **#Win** |
103
- |--------|-------|-------|------|--------|------|------|------|------|-------|------|---------|----------|
104
- | Raw | 25.85 | 45.66 | 35.63 | 44.89 | 28.51 | 31.60 | 70.35 | 43.24 | 51.54 | 73.50 | 45.08 | 0/10 |
105
- | UltraX-No-Instruction | 26.02 | **47.18** | 35.79 | **46.50** | 28.25 | 31.20 | 71.65 | 43.55 | 52.57 | 74.60 | 45.73 | 2/10 |
106
- | UltraX-Preservation-Weighted | **26.79** | 47.14 | 36.12 | 46.30 | 28.54 | **33.80** | 70.67 | 42.78 | 51.62 | **76.10** | 45.99 | 3/10 |
107
- | **UltraX** (default) | 26.62 | 45.96 | **37.43** | 46.29 | **28.90** | 31.80 | **71.98** | **43.71** | **52.72** | 76.00 | **46.14** | 5/10 |
108
 
109
  ## ❤️ Acknowledgements
110
 
@@ -113,7 +137,7 @@ Performance comparison on FineWeb (20B tokens, 1B MiniCPM, 10 benchmarks, zero-s
113
 
114
  Thanks for their awesome work! Open-source contributions make UltraX possible! 🙌
115
 
116
- ## 🌟 Citation
117
 
118
  If you find our work useful, please consider citing:
119
 
@@ -122,12 +146,12 @@ If you find our work useful, please consider citing:
122
  title={UltraX: Refining Pre-Training Data at Scale with Adaptive Programmatic Editing},
123
  author={Xinlong Zhao and Dongsheng Liu and Hengyu Zhao and Zixuan Fu and Zheng Wang and Jie Cai and Jie Zhou and Qiang Ma and Xuanhe Zhou and Xu Han and Yudong Wang and Zhiyuan Liu},
124
  year={2026},
125
- eprint={},
126
  archivePrefix={arXiv},
127
  primaryClass={cs.CL},
128
  }
129
  ```
130
 
131
- ## 💳 License
132
 
133
- This project is released under the [Apache 2.0](./LICENSE).
 
10
  pipeline_tag: text-generation
11
  ---
12
 
13
+ # UltraX: Refining Pre-Training Data at Scale with Adaptive Programmatic Editing
 
 
 
 
14
 
15
  <p align="center">
16
+ <a href="https://huggingface.co/collections/openbmb/ultradata">
17
+ <img src="https://raw.githubusercontent.com/OpenBMB/UltraX/main/assets/ultradata-logo.png" alt="OpenBMB UltraData" width="350"/>
18
+ </a>
19
+ <br/>
20
+ <a href="https://huggingface.co/collections/openbmb/ultradata">
21
+ <img src="https://raw.githubusercontent.com/OpenBMB/UltraX/main/assets/ultrax-logo.png" alt="UltraX Logo" width="350"/>
22
+ </a>
23
  </p>
24
 
25
  <p align="center">
26
+ <a href="https://arxiv.org/abs/2607.08646">📜 Paper</a> |
27
+ <a href="https://github.com/openbmb/UltraX">💻 Code</a> |
28
+ <a href="https://huggingface.co/datasets/openbmb/UltraX-Preview">🤗 Datasets</a> |
29
  <a href="https://huggingface.co/collections/openbmb/ultradata">📦 UltraData Collection</a>
30
  </p>
31
 
 
46
  | **UltraX-No-Instruction** | Ablation variant: trained without system instruction |
47
  | **UltraX-Preservation-Weighted** | Ablation variant: trained with preservation-weighted sampling (60% keep_all) |
48
 
49
+ ## 📢 News
50
+
51
+ - **[2026.07.13]** UltraX codebase, refinement model, and refined datasets are now available on GitHub and Hugging Face. 🚀🚀🚀
52
+ - **[2025.07.10]** UltraX technical report is available on [arXiv](https://arxiv.org/abs/2607.08646). 🔥🔥🔥
53
+
54
+ ## 💡 Highlights
55
+
56
+ - **Function-Calling Refinement:** Instead of end-to-end text rewriting, UltraX predicts structured editing operations (`keep_all`, `remove_all`, `remove_lines`, `replace_str`, `add_line`), enabling fine-grained instance-level editing with deterministic execution.
57
+ - **LAM + DCR Pipeline:** Line Alignment and Mapping (LAM) aligns original and refined text at line level, while Dynamic Context Replacement (DCR) converts character-level edits into reliable `replace_str` operations with unique context anchoring.
58
+ - **Lightweight & Efficient:** The refinement model is a standard SFT model that predicts structured function calls, significantly cheaper than end-to-end LLM rewriting while achieving superior performance.
59
+
60
  ## 🔬 Pipeline Overview
61
 
62
  <div align="center">
63
+ <img src="https://raw.githubusercontent.com/OpenBMB/UltraX/main/assets/ultrax_pipeline.png" width="800"/>
64
  </div>
65
 
66
+ ## 🔍 Model Details
67
 
68
  All models are trained with the following configuration:
69
 
 
85
 
86
  - **UltraX-Preservation-Weighted:** Trained with preservation-weighted sampling where keep_all accounts for 60% of training data. Shows stronger performance on certain tasks (ARC-C, ARC-E, OBQA, SciQ), demonstrating the trade-off between editing aggressiveness and content preservation.
87
 
88
+ ## 📈 Evaluation Results
89
+
90
+ Performance comparison on FineWeb (20B tokens, 1B MiniCPM, 10 benchmarks, zero-shot):
91
+
92
+ <div align="center">
93
+ <img src="https://raw.githubusercontent.com/OpenBMB/UltraX/main/assets/results.png" width="900"/>
94
+ </div>
95
+
96
+ <div align="center">
97
+ <img src="https://raw.githubusercontent.com/OpenBMB/UltraX/main/assets/fineweb_token_curve.png" alt="FineWeb Token Curve" width="450"/>
98
+ <p><i>Average downstream performance on FineWeb under different training token budgets.</i></p>
99
+ </div>
100
+
101
  ## 🔧 Function Space
102
 
103
  The model predicts operations from the following function space:
 
121
  remove_lines(12, 15)
122
  ```
123
 
124
+ ## 🚀 Quick Start
125
 
126
+ ```python
127
+ from transformers import AutoModelForCausalLM, AutoTokenizer
128
 
129
+ model = AutoModelForCausalLM.from_pretrained("openbmb/UltraX")
130
+ tokenizer = AutoTokenizer.from_pretrained("openbmb/UltraX")
131
+ ```
 
 
 
132
 
133
  ## ❤️ Acknowledgements
134
 
 
137
 
138
  Thanks for their awesome work! Open-source contributions make UltraX possible! 🙌
139
 
140
+ ## 📖 Citation
141
 
142
  If you find our work useful, please consider citing:
143
 
 
146
  title={UltraX: Refining Pre-Training Data at Scale with Adaptive Programmatic Editing},
147
  author={Xinlong Zhao and Dongsheng Liu and Hengyu Zhao and Zixuan Fu and Zheng Wang and Jie Cai and Jie Zhou and Qiang Ma and Xuanhe Zhou and Xu Han and Yudong Wang and Zhiyuan Liu},
148
  year={2026},
149
+ eprint={2607.08646},
150
  archivePrefix={arXiv},
151
  primaryClass={cs.CL},
152
  }
153
  ```
154
 
155
+ ## 📜 License
156
 
157
+ This project is licensed under the [Apache 2.0](./LICENSE) license.
README_ZH.md CHANGED
@@ -1,18 +1,21 @@
1
- # UltraX
2
-
3
- <div align="center">
4
- <img src="assets/ultrax-logo.png" width="500"/>
5
- </div>
6
 
7
  <p align="center">
8
- <b>基于自适应程序化编辑的大规模预训练数据精炼</b>
 
 
 
 
 
 
9
  </p>
10
 
11
  <p align="center">
12
- <a href="">📜 论文</a> |
13
- <a href="">💻 代码</a> |
14
- <a href="">🤗 数据集</a> |
15
- <a href="https://huggingface.co/collections/openbmb/ultradata">📦 UltraData 合集</a>
 
16
  </p>
17
 
18
  <p align="center">
@@ -26,35 +29,42 @@
26
 
27
  本仓库提供 **UltraX 精炼模型**,通过全参数 SFT 训练,可预测网页文本的清洗函数调用:
28
 
29
-
30
- | 模型 | 说明 |
31
- | -------------------------------- | ------------------------- |
32
- | **UltraX** | 默认模型:指令引导 + 编辑偏置采样(主实验配置) |
33
- | **UltraX-No-Instruction** | 消融变体:无系统指令训练 |
34
  | **UltraX-Preservation-Weighted** | 消融变体:保留偏置采样(60% keep_all) |
35
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  ## 🔬 流程概览
38
 
39
  <div align="center">
40
- <img src="assets/ultrax_pipeline.png" width="800"/>
41
  </div>
42
 
43
- ## 💡 模型详情
44
 
45
  所有模型使用以下配置训练:
46
 
47
-
48
- | 配置项 | 值 |
49
- | ------ | -------------------------- |
50
- | 训练框架 | ms-swift + DeepSpeed ZeRO3 |
51
- | 训练类型 | 全参数 SFT |
52
- | 最大序列长度 | 20,480 tokens |
53
- | 学习率 | 3e-5(余弦衰减,最小 lr 3e-6) |
54
- | 预热比例 | 0.03 |
55
- | 精度 | bfloat16 |
56
- | 硬件 | 8x GPU |
57
-
58
 
59
  ### 模型变体
60
 
@@ -62,19 +72,30 @@
62
  - **UltraX-No-Instruction:** 无系统指令训练。实验表明,即使没有显式任务协议,程序化精炼仍能带来明显提升(平均分:45.73 vs Raw 45.08),但指令引导可进一步提升性能(平均分:46.14)。
63
  - **UltraX-Preservation-Weighted:** 使用保留偏置采样,keep_all 占训练数据的 60%。在部分任务上(ARC-C、ARC-E、OBQA、SciQ)表现更强,展示了编辑积极性与内容保留之间的平衡。
64
 
65
- ## 🔧 函数空间
66
 
67
- 模型预测以下函数空间中的操作:
68
 
 
 
 
69
 
70
- | 函数 | 说明 |
71
- | ---------------------------------- | ------------------------- |
72
- | `keep_all()` | 文档无需修改 |
73
- | `remove_all()` | 整篇文档无价值(如错误页面、登录墙) |
74
- | `remove_lines(start, end)` | 删除从 start 到 end 的连续行(含首尾) |
75
- | `replace_str(line, old, new)` | 在指定行内替换子字符串 |
76
- | `add_line(base, sub_idx, content)` | 在指定位置附近插入新行 |
77
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
  ### 输入/输出格式
80
 
@@ -88,18 +109,14 @@ replace_str(5, 'Click here to subscribe', '')
88
  remove_lines(12, 15)
89
  ```
90
 
91
- ## 📈 评估结果
92
-
93
- 在 FineWeb 上的性能对比(20B tokens,1B MiniCPM,10 个基准,零样本):
94
-
95
 
96
- | 方法 | ARC-C | ARC-E | CSQA | HellaS | MMLU | OBQA | PIQA | SIQA | WinoG | SciQ | **平均** | **#胜** |
97
- | ---------------------------- | --------- | --------- | --------- | --------- | --------- | --------- | --------- | --------- | --------- | --------- | --------- | ------ |
98
- | Raw | 25.85 | 45.66 | 35.63 | 44.89 | 28.51 | 31.60 | 70.35 | 43.24 | 51.54 | 73.50 | 45.08 | 0/10 |
99
- | UltraX-No-Instruction | 26.02 | **47.18** | 35.79 | **46.50** | 28.25 | 31.20 | 71.65 | 43.55 | 52.57 | 74.60 | 45.73 | 2/10 |
100
- | UltraX-Preservation-Weighted | **26.79** | 47.14 | 36.12 | 46.30 | 28.54 | **33.80** | 70.67 | 42.78 | 51.62 | **76.10** | 45.99 | 3/10 |
101
- | **UltraX**(默认) | 26.62 | 45.96 | **37.43** | 46.29 | **28.90** | 31.80 | **71.98** | **43.71** | **52.72** | 76.00 | **46.14** | 5/10 |
102
 
 
 
 
103
 
104
  ## ❤️ 致谢
105
 
@@ -108,7 +125,7 @@ remove_lines(12, 15)
108
 
109
  感谢以上优秀的开源工作!🙌
110
 
111
- ## 🌟 引用
112
 
113
  如果我们的工作对您有帮助,请考虑引用:
114
 
@@ -117,12 +134,12 @@ remove_lines(12, 15)
117
  title={UltraX: Refining Pre-Training Data at Scale with Adaptive Programmatic Editing},
118
  author={Xinlong Zhao and Dongsheng Liu and Hengyu Zhao and Zixuan Fu and Zheng Wang and Jie Cai and Jie Zhou and Qiang Ma and Xuanhe Zhou and Xu Han and Yudong Wang and Zhiyuan Liu},
119
  year={2026},
120
- eprint={},
121
  archivePrefix={arXiv},
122
  primaryClass={cs.CL},
123
  }
124
  ```
125
 
126
- ## 💳 许可证
127
 
128
- 本项目基于 [Apache 2.0](./LICENSE) 协议发布。
 
1
+ # UltraX:基于自适应程序化编辑的大规模预训练数据精炼
 
 
 
 
2
 
3
  <p align="center">
4
+ <a href="https://huggingface.co/collections/openbmb/ultradata">
5
+ <img src="https://raw.githubusercontent.com/OpenBMB/UltraX/main/assets/ultradata-logo.png" alt="OpenBMB UltraData" width="350"/>
6
+ </a>
7
+ <br/>
8
+ <a href="https://huggingface.co/collections/openbmb/ultradata">
9
+ <img src="https://raw.githubusercontent.com/OpenBMB/UltraX/main/assets/ultrax-logo.png" alt="UltraX Logo" width="350"/>
10
+ </a>
11
  </p>
12
 
13
  <p align="center">
14
+ <a href="https://arxiv.org/abs/2607.08646">📜 论文</a> |
15
+ <a href="https://github.com/openbmb/UltraX">💻 代码</a> |
16
+ <a href="https://huggingface.co/datasets/openbmb/UltraX-Preview">🤗 数据集</a> |
17
+ <a href="https://huggingface.co/collections/openbmb/ultradata">📦 UltraData 合集</a> |
18
+ <a href="https://opensource.org/license/apache-2-0">📄 License: Apache 2.0</a>
19
  </p>
20
 
21
  <p align="center">
 
29
 
30
  本仓库提供 **UltraX 精炼模型**,通过全参数 SFT 训练,可预测网页文本的清洗函数调用:
31
 
32
+ | 模型 | 说明 |
33
+ |------|------|
34
+ | **UltraX** | 默认模型:指令引导 + 编辑偏置采样(主实验配置) |
35
+ | **UltraX-No-Instruction** | 消融变体:无系统指令训练 |
 
36
  | **UltraX-Preservation-Weighted** | 消融变体:保留偏置采样(60% keep_all) |
37
 
38
+ ## 📢 最新动态
39
+
40
+ - **[2026.07.13]** UltraX 代码库、精炼模型和精炼数据集现已在 GitHub 与 Hugging Face 上发布。🚀🚀🚀
41
+ - **[2025.07.10]** UltraX 技术报告已发布于 [arXiv](https://arxiv.org/abs/2607.08646)。🔥🔥🔥
42
+
43
+ ## 💡 亮点
44
+
45
+ - **函数调用式精炼:** UltraX 不进行端到端文本改写,而是预测结构化编辑操作(`keep_all`、`remove_all`、`remove_lines`、`replace_str`、`add_line`),实现细粒度实例级编辑与确定性执行。
46
+ - **LAM + DCR 流水线:** 行级对齐与映射(LAM)在行级别对齐原始文本与精炼文本,动态上下文替换(DCR)将字符级编辑转化为具有唯一上下文锚定的可靠 `replace_str` 操作。
47
+ - **轻量高效:** 精炼模型是标准 SFT 模型,预测结构化函数调用,相比端到端 LLM 改写成本显著更低,同时性能更优。
48
 
49
  ## 🔬 流程概览
50
 
51
  <div align="center">
52
+ <img src="https://raw.githubusercontent.com/OpenBMB/UltraX/main/assets/ultrax_pipeline.png" width="800"/>
53
  </div>
54
 
55
+ ## 🔍 模型详情
56
 
57
  所有模型使用以下配置训练:
58
 
59
+ | 配置项 | 值 |
60
+ |--------|------|
61
+ | 训练框架 | ms-swift + DeepSpeed ZeRO3 |
62
+ | 训练类型 | 全参数 SFT |
63
+ | 最大序列长度 | 20,480 tokens |
64
+ | 学习率 | 3e-5(余弦衰减,最小 lr 3e-6) |
65
+ | 预热比例 | 0.03 |
66
+ | 精度 | bfloat16 |
67
+ | 硬件 | 8x GPU |
 
 
68
 
69
  ### 模型变体
70
 
 
72
  - **UltraX-No-Instruction:** 无系统指令训练。实验表明,即使没有显式任务协议,程序化精炼仍能带来明显提升(平均分:45.73 vs Raw 45.08),但指令引导可进一步提升性能(平均分:46.14)。
73
  - **UltraX-Preservation-Weighted:** 使用保留偏置采样,keep_all 占训练数据的 60%。在部分任务上(ARC-C、ARC-E、OBQA、SciQ)表现更强,展示了编辑积极性与内容保留之间的平衡。
74
 
75
+ ## 📈 评估结果
76
 
77
+ 在 FineWeb 上的性能对比(20B tokens,1B MiniCPM,10 个基准,零样本):
78
 
79
+ <div align="center">
80
+ <img src="https://raw.githubusercontent.com/OpenBMB/UltraX/main/assets/results.png" width="900"/>
81
+ </div>
82
 
83
+ <div align="center">
84
+ <img src="https://raw.githubusercontent.com/OpenBMB/UltraX/main/assets/fineweb_token_curve.png" alt="FineWeb Token 曲线" width="450"/>
85
+ <p><i>FineWeb 在不同训练 token 预算下的平均下游性能。</i></p>
86
+ </div>
 
 
 
87
 
88
+ ## 🔧 函数空间
89
+
90
+ 模型预测以下函数空间中的操作:
91
+
92
+ | 函数 | 说明 |
93
+ |------|------|
94
+ | `keep_all()` | 文档无需修改 |
95
+ | `remove_all()` | 整篇文档无价值(如错误页面、登录墙) |
96
+ | `remove_lines(start, end)` | 删除从 start 到 end 的连续行(含首尾) |
97
+ | `replace_str(line, old, new)` | 在指定行内替换子字符串 |
98
+ | `add_line(base, sub_idx, content)` | 在指定位置附近插入新行 |
99
 
100
  ### 输入/输出格式
101
 
 
109
  remove_lines(12, 15)
110
  ```
111
 
112
+ ## 🚀 快速开始
 
 
 
113
 
114
+ ```python
115
+ from transformers import AutoModelForCausalLM, AutoTokenizer
 
 
 
 
116
 
117
+ model = AutoModelForCausalLM.from_pretrained("openbmb/UltraX")
118
+ tokenizer = AutoTokenizer.from_pretrained("openbmb/UltraX")
119
+ ```
120
 
121
  ## ❤️ 致谢
122
 
 
125
 
126
  感谢以上优秀的开源工作!🙌
127
 
128
+ ## 📖 引用
129
 
130
  如果我们的工作对您有帮助,请考虑引用:
131
 
 
134
  title={UltraX: Refining Pre-Training Data at Scale with Adaptive Programmatic Editing},
135
  author={Xinlong Zhao and Dongsheng Liu and Hengyu Zhao and Zixuan Fu and Zheng Wang and Jie Cai and Jie Zhou and Qiang Ma and Xuanhe Zhou and Xu Han and Yudong Wang and Zhiyuan Liu},
136
  year={2026},
137
+ eprint={2607.08646},
138
  archivePrefix={arXiv},
139
  primaryClass={cs.CL},
140
  }
141
  ```
142
 
143
+ ## 📜 许可证
144
 
145
+ 本项目基于 [Apache 2.0](./LICENSE) 许可证发布。
assets/ultrax-logo.png DELETED

Git LFS Details

  • SHA256: 8b65442a2351dda9bbcd4b361e1a921c485cbe069dcaaec36b4b52921a0a527e
  • Pointer size: 131 Bytes
  • Size of remote file: 963 kB
assets/ultrax_pipeline.png DELETED

Git LFS Details

  • SHA256: 93d3d8dab4b0f467f2f8a88a9944e08a329eb972b179118da8f41e8f37df4a00
  • Pointer size: 132 Bytes
  • Size of remote file: 1.4 MB