← 返回 2026-05-05

重复优于多样:高信号数据过滤实现德语语言模型的样本高效训练 Repetition over Diversity: High-Signal Data Filtering for Sample-Efficient German Language Modeling

Ansar Aynetdinov, Patrick Haller, Alan Akbik 📅 2026-04-30 👍 20 2026-07-13 08:36
多轮训练 小模型 德语LLM 数据过滤 样本效率 预训练

针对德语语料受限场景,证明在严格质量过滤后的小规模高密度子集上多轮训练,明显优于在大规模低过滤语料上的单轮训练。

前置知识

FineWeb-2 多语言数据流水线

FineWeb-2(FW2)是 Hugging Face 团队提出的多语言网页语料处理框架,针对每种语言独立完成 URL 去重、语言识别、启发式清洗和质量打分等流程,并按语言输出对应子集。德语子集 FW2-DE 是本文的唯一数据起点,包含约 5 亿份文档,提供了基础的去重和粗粒度过滤。

本文所有过滤、子集划分与对比都建立在 FineWeb-2 之上,读者需要先理解 FineWeb-2 已经做过哪些预处理,才能看清本文额外施加的三层语义过滤到底增加了什么价值。

数据约束下的扩展律(Scaling Laws under Data Constraint)

Muennighoff 等人 2023 年提出的设定:当唯一 token 数量不足以支撑单轮训练时,研究者应如何在「追加唯一数据」和「复用现有数据」之间取舍,并提出 4 epoch 是回报拐点的经验法则。

本文的核心问题就是非英语场景下这一拐点是否仍然成立;读者只有先掌握「数据约束扩展律」才能理解作者为什么把多 epoch 实验当成主要验证手段。

分层质量分类器(Hierarchical Quality Classifier)

用 LLM 对文档逐条打分,再用轻量级回归头(如 Arctic Embed)训练成可批量打分模型,从而把教师模型的判断投影到亿级文档上的做法。本文的三层分别是连贯性、信息量、教育质量。

这是本文数据流水线的中枢——先由 Llama-3.3-70B 打标,再由雪球 Arctic Embed 回归拟合,最后才在 5 亿文档上跑批。理解这条链路是理解方法创新点的关键。

Tokenizer Fertility(分词器膨胀率)

指同一段文本在目标分词器下产生的 token 数与原文长度的比值,数值越高说明分词器对语料的切分效率越低,常被用作「该语料是否符合分词器训练分布」的代理指标。

Table 1 反复出现 Fertility 列,且随过滤变严而下降;理解这一指标才能看懂作者为什么主张要按子集训练专属 BPE,而不是直接用现成词表。

研究动机

英语 LLM 已经能用十亿至万亿级 token 单轮训练,并通过在「教科书式」高质量子集上训练 Phi 系列等模型证明激进过滤可以显著提升样本效率。但德语、法语、日语等高资源非英语语种情况不同:FineWeb-2 全量德语去重后只有约 5 亿份网页文档,可用的总 token 量在百亿级别,距离英语万亿 token 的规模差了 1–2 个数量级。在这个「数据受限但并非极端匮乏」的中间地带,实践者面临一个尴尬的战略抉择:是弱过滤保多样性单轮训完百亿 token,还是强过滤、缩小到几十 B token 然后反复多 epoch?Muennighoff 等人 2023 年的研究说 4 epoch 后重复收益骤降,但 Fang 等 2026 又把上限推到 10 epoch,而这两项结论都来自英语场景,几乎没有针对德语等非英语的严格实验。

本文的目标是本文以德语为代表性案例,系统量化「多样性的广度」与「语义密度」之间的取舍。作者用三层语义过滤(连贯性、信息量、教育质量)从 5 亿份德语网页中提炼出一个 28B token 的 DENSE-CORE 核心,并在固定的 100B、200B token 预算下,对比「随机单轮训完」与「高质量多轮反复训」两种策略。核心问题是:在德语这种百亿级数据规模下,重复是否真的优于多样性?Muennighoff 等人 2023 年的研究主张 4 epoch 是收益拐点,Fang 等 2026 年又把上限推到 10 epoch,但这两项结论都来自英语场景,作者希望通过 350M 至 1B 模型的对照实验,在非英语上验证 Multi-epoch 拐点是否仍然存在,并给出数据过滤与训练预算的最佳配比。

与已有工作不同的是,既有工作在数据过滤层面大多仿照 FineWeb-Edu 用单一教育质量分数,或者像 FW2-MKC 用嵌入相似度对齐指令集,却忽略了「连贯性—信息量—教育性」三层过滤各自的边际贡献。同时,英语场景下的多 epoch 研究是否能在德语上复现也完全没有验证。本文正是沿着这两个缺口切入:先解构三层过滤各自的价值,再用德语从 350M 一直扩到 1B 来验证 Muennighoff-Fang 结论在非英语上是否成立。

核心方法

直觉上,作者主张把有限的德语语料「浓缩」为高质量核心,反复让模型浸入高信号文本——就好比让一个学生反复精读一本好书,而不是泛读一百本平庸教材。技术路线上分两步:第一步是数据侧,把 FineWeb-2 德语子集按「连贯性-信息量-教育质量」三个递进维度用 LLM 打标、再训练轻量回归头,最后在 5 亿文档上做整库打分,取三层交集得到 28B token 的 DENSE-CORE;第二步是训练侧,使用 Llama 风格的 Dense Transformer,固定 100B 或 200B token 总预算,用专属 BPE 分词器做多 epoch 训练。

核心创新点是「分层语义过滤 × 多 epoch 预算对等」的实验设计:先用三层过滤把语料压到 5.1%,再让模型在固定 token 预算下反复训练这个核心。它与 FineWeb-Edu 等工作的本质区别不在过滤本身,而在把「过滤比例」与「epoch 次数」做了显式的算术对齐——别人训练 100B 单遍都在大集上,本文的 100B 预算在 DENSE-CORE 上等价于 3.6 遍,由此让「重复」和「多样」可以直接 A/B 对比,而不是比较两个完全不同的算力配置。

方法步骤详情

数据侧:(1) 取 FineWeb-2 德语子集 FW2-DE 约 5 亿文档起点;(2) 用 Llama-3.3-70B-Instruct 对 50 万样本按 prompt 打 Coherence(1–3)、Info Value(1–4)、Edu Quality(1–5)三类分;(3) 用 snowflake-arctic-embed-m-v2.0 在带标签样本上回归三个打分头,对 5 亿文档整库打分;(4) 取三层交集得 DENSE-CORE(24.5M 文档、28B token,保留率 5.1%),并为每子集单独训 vocab=32k BPE。训练侧:(1) 350M 24 层 hidden=1024 FFN=4096,1B 16 层 hidden=2048 FFN=8192 Llama 风格;(2) AdamW(β1=0.9, β2=0.95, weight decay=0.1),cosine + 1% warmup,峰值 lr=5e-4 衰减到 1%,batch=0.5M,grad clip=1.0;(3) 上下文 2048、bf16、8×A100;(4) 固定 100B/200B 预算,DENSE-CORE 对应 3.6/7.2 epoch;(5) SFT 用 SMOLTALK2 德语子集 lr=5e-5,最终 Llama-3.3-70B 做 LLM-as-a-judge。

技术新颖性

技术新颖性体现在三方面:第一,分层标签的设计把「教育质量」这一单一维度拆成「能否读懂—是否含事实—是否教科书式」三阶,从而第一次在德语上量化了每一层的边际收益;第二,作者把每条子集都训了专属 32k BPE,使 tokenizer fertility 从 RANDOM 子集的 1.49 降到 DENSE-CORE 的 1.32,证实了「分词器—语料」联合优化在非英语小语种上的额外收益;第三,他们发布了 5 张 A100 × 8 可复现的实验配方,并把评测基准中德语翻译缺陷系统性修复,使后续研究有干净的可比基线。

Distribution of Coherence, Information Value, and Educational Quality scores in FW2-DE yielded by Llama-3.3-70B-Instruct annotation. We add the Education Quality score distribution from the original English Fineweb-Edu for reference.
Figure 5: Distribution of Coherence, Information Value, and Educational Quality scores in FW2-DE yielded by Llama-3.3-70B-Instruct annotation. We add the Education Quality score distribution from the original English Fineweb-Edu for reference.

实验结果

Table 3:350M、100B 预算下 DENSE-CORE(28B × 3.6 epoch)获 39.24 均值,比 RANDOM 34.35 高 4.89 分,亦超 Coherence(36.48)、Info Value(38.04)、Edu Quality(38.62)单层过滤。AA HIGH(21B × 4.8 epoch)仅 33.14 反低于 RANDOM,印证「多 epoch 只对真正高质量数据有效」。Table 5/8:1B 模型差距扩到 5.14 分(41.97 vs 36.83);1B 在 200B、7.2 epoch 下达 44.05,超 EuroLLM-1.7B(4T token,42.94)。Table 4:密度优势传导到 SFT——350M DENSE-CORE 1000 提示得 253 binary 正确(比 RANDOM 178 多 75);1B Likert 6.13 vs 5.87 同步上升。Table 7 反驳 4 epoch 拐点:3.6 epoch(39.24)→ 7.2 epoch(40.16)仍 +0.92;RANDOM 100B → 200B 仅 +0.4。

Dataset statistics for the German split of FineWeb-2 (FW2-DE) and derived subsets.
Table 1: Dataset statistics for the German split of FineWeb-2 (FW2-DE) and derived subsets.
Statistics for our German evaluation suite. All benchmarks except Global MMLU were re-translated from their original English version. Removed items indicate instances where translation itself failed or broke the task integrity.
Table 2: Statistics for our German evaluation suite. All benchmarks except Global MMLU were re-translated from their original English version. Removed items indicate instances where translation itself failed or broke the task integrity.
Benchmark results for 350M models. Tokens refers to unique tokens in the subset, while the bracketed value indicates the number of epochs to reach the 100B budget.
Table 3: Benchmark results for 350M models. Tokens refers to unique tokens in the subset, while the bracketed value indicates the number of epochs to reach the 100B budget.
LLM-as-a-Judge (Llama-3.3-70B) results. Tokens indicates the repetition factor over the unique subset. Score is the 1–10 Likert average; Correct is the binary accuracy count out of 1,000 prompts.
Table 4: LLM-as-a-Judge (Llama-3.3-70B) results. Tokens indicates the repetition factor over the unique subset. Score is the 1–10 Likert average; Correct is the binary accuracy count out of 1,000 prompts.
Benchmark results of BOLDT models compared to other pre-trained models of the similar size, as well as larger reference models.
Table 5: Benchmark results of BOLDT models compared to other pre-trained models of the similar size, as well as larger reference models.
IT-LLM Annotator Evaluation.
Table 6: IT-LLM Annotator Evaluation.
Benchmark results of 350M models trained on 200B tokens of different FW2-DE subsets compared to models trained on 100B tokens of (conceptually) the same subsets.
Table 7: Benchmark results of 350M models trained on 200B tokens of different FW2-DE subsets compared to models trained on 100B tokens of (conceptually) the same subsets.
Benchmark results of 1B models trained on 100B and 200B tokens of the DENSE-CORE subset compared to other similar-sized pre-trained models.
Table 8: Benchmark results of 1B models trained on 100B and 200B tokens of the DENSE-CORE subset compared to other similar-sized pre-trained models.
Zero-shot evaluation of 350M models trained on 100B tokens of different FW2-DE subsets over pre-training checkpoints.
Figure 2: Zero-shot evaluation of 350M models trained on 100B tokens of different FW2-DE subsets over pre-training checkpoints.
Performance gain when scaling the model size from 350M to 1B parameters. Table 8 breaks down the performance of the models depicted in the graph on each benchmark.
Figure 3: Performance gain when scaling the model size from 350M to 1B parameters. Table 8 breaks down the performance of the models depicted in the graph on each benchmark.
Performance of 350M models trained on 100B and 200B tokens of Random and Edu High subsets. Table 7 breaks down the performance of each model's final checkpoint on each benchmark.
Figure 4: Performance of 350M models trained on 100B and 200B tokens of Random and Edu High subsets. Table 7 breaks down the performance of each model's final checkpoint on each benchmark.
查看结构化数据
任务指标本文基线提升
Global MMLU (DE) - 57 学科事实知识 Acc. 31.42 (BOLDT-1B) 29.26 (LLäMmlein-1B, 1T tokens) +2.16 / 约 5× 少 token
ARC-Challenge (DE) Acc. 35.99 (BOLDT-DC-1B, 200B × 7.2ep) 29.90 (Llama-3.2-1B, 9T tokens) +6.09 且用 ~45× 少 token
ARC-Easy (DE) Acc. 57.30 (BOLDT-DC-1B) 47.89 (Gemma-3-1B, 2T tokens) +9.41
HellaSwag (DE) Acc. 48.77 (BOLDT-1B, 230B) 44.80 (LLäMmlein-1B, 1T tokens) +3.97
LAMBADA (DE) Acc. 44.70 (BOLDT-1B) 41.71 (Gemma-3-1B) +2.99
OpenBookQA (DE) Acc. 52.32 (BOLDT-1B) 45.05 (Gemma-3-1B) +7.27
SFT 1000-prompt LLM-as-a-judge (1B) Likert 1–10 6.13 (DENSE-CORE 1B, 3.6ep) 5.87 (RANDOM 1B, 1.0ep) +0.26
SFT 1000-prompt LLM-as-a-judge (1B) Binary Correct 338/1000 293/1000 (RANDOM 1B) +45 (相对 +15.4%)
350M Random vs DENSE-CORE 均值 (100B budget) Avg. of 6 benchmarks 39.24 34.35 +4.89 (+14.2%)

局限与改进

作者明确声明的局限性:本文只测了德语一种语言,对汉语、日语等字符差异更大或语料更小的语言是否一致尚不清楚;模型规模上限 1B、token 上限 200B,远未触及工业级千亿 token、万卡预算,因此该结论在工业级是否存在收益拐点尚需验证;只研究了 Dense Transformer,未涉及 MoE 等替代架构;没有评估有害内容、人口统计偏见和 prompt 注入安全性——这一点尤其关键,因为多 epoch 重复有可能放大而不是缓解偏见。除此之外,评测采用单一 LLM-as-a-judge(Llama-3.3-70B),没有与人工评分或多评判模型取平均做敏感性分析;DENSE-CORE 只有 28B token,单调地加 7 epoch 后是否终将崩溃亦不明确。

独立分析的弱点

独立审视本文有以下值得改进之处。其一,三层过滤的标注均依赖 Llama-3.3-70B-Instruct,但论文 Table 6 显示其全球平均只有 71.12 分,意味着打标本身就带噪声——可以加入 RLHF 或多模型集成(gpt-4 + claude)以提高标签信噪比。其二,BPE 是每个子集单独训的,但这隐含了「测试时也用同一 tokenizer」——若改用统一词表,需要重新测 fertility,否则跨子集评测不公平;建议作者公开 vocabulary 与合并规则文件。其三,实验仅对比 RANDOM/COHERENCE/MKC/AA HIGH,未与 self-instruct 或 deduplication-by-embedding 等强基线比较,且没有 ablation「去掉任意一层过滤」对最终分数的独立贡献。其四,多 epoch 训练虽在 7 epoch 仍上升,但未做学习率 / dropout / 梯度裁剪随 epoch 衰减的鲁棒性测试,仍有过度依赖超参设置的嫌疑。

未来方向

作者明确把跨语言验证(法语、日语、汉语)列为下一步,同时呼吁对毒性、偏见进行系统性审计。基于成果我认为还有几条可延伸的方向:(1)把 DENSE-CORE 思路与 MoE 架构结合——专家路由天生偏好「不同数据」是否与高质量小集冲突,是有趣的实证问题;(2)把三层过滤改造成可学习的 RL 策略,让模型在训练过程中动态分配预算给「见过的 epoch 数 vs 新样本概率」,而不是固定先验 epoch;(3)将 DENSE-CORE 28B token 做 embedding 检索当成持续预训练语料,结合 instruction 后训练看是否能进一步压低算力到 10×10^6 FLOPs 量级;(4)探索把多 epoch 「重复」与 knowledge distillation / speculative decoding 联合,是否能在推理侧得到二阶收益。

复现评估

复现评估总体良好:作者承诺在 HuggingFace「Boldt」组织下开源 BOLDT-DC-350M、BOLDT-DC-1B、BOLDT-1B 与指令微调预览版,以及人工修复过的 6 张德语评测基准(Table 2)。预处理流水线明确给出标签 prompt(Figure 6–8)和超参(Appendix B),预训练在 8×A100 bf16 上单次训练以 200B token 约耗费数十到数百 GPU·天,是中小实验室力所能及的范围。仍存在复现难点:单次完整 200B 7-epoch DENSE-CORE 训练对显存、IO 要求很高,需分布式 checkpoint;评测依赖特定版本的 Eleuther Harness、lm-eval 与 vLLM,主版本漂移可能引入 ±0.5 分噪声;最后,LLM-as-a-judge 的随机种子和 prompt 在公开仓库中需要严格审查,避免误用 German 评分时仍触发默认英文 prompt 而导致分数虚高。