Update README.md
Browse files
README.md
CHANGED
|
@@ -119,127 +119,6 @@ We asked both models to define a concept they had never seen in their training d
|
|
| 119 |
|
| 120 |
---
|
| 121 |
|
| 122 |
-
## 🛠️ Methodology: The "Burden" Function
|
| 123 |
-
|
| 124 |
-
The core innovation lies in the data preprocessing pipeline. We apply a stochastic shuffle to the inputs:
|
| 125 |
-
|
| 126 |
-
```python
|
| 127 |
-
def apply_burden(text, burden_ratio=0.7):
|
| 128 |
-
"""
|
| 129 |
-
Injects 'Cognitive Burden' by shuffling 70% of the words.
|
| 130 |
-
The model must learn to reconstruct the logic from these fragments.
|
| 131 |
-
"""
|
| 132 |
-
words = text.split(' ')
|
| 133 |
-
if len(words) > 3:
|
| 134 |
-
num_to_shuffle = int(len(words) * burden_ratio)
|
| 135 |
-
indices = random.sample(range(len(words)), num_to_shuffle)
|
| 136 |
-
# ... shuffle logic ...
|
| 137 |
-
return ' '.join(shuffled_words)
|
| 138 |
-
return text
|
| 139 |
-
```
|
| 140 |
-
|
| 141 |
-
---
|
| 142 |
-
|
| 143 |
-
## 📚 Citation
|
| 144 |
-
|
| 145 |
-
If you use this model or the Fragmented Training paradigm in your research, please cite:
|
| 146 |
-
|
| 147 |
-
```bibtex
|
| 148 |
-
@misc{aifeifei_2026,
|
| 149 |
-
author = { aifeifei },
|
| 150 |
-
title = { Fragmented-Training (Revision bb381c6) },
|
| 151 |
-
year = 2026,
|
| 152 |
-
url = { https://huggingface.co/aifeifei798/Fragmented-Training },
|
| 153 |
-
doi = { 10.57967/hf/7592 },
|
| 154 |
-
publisher = { Hugging Face }
|
| 155 |
-
}
|
| 156 |
-
```
|
| 157 |
-
|
| 158 |
-
---
|
| 159 |
-
|
| 160 |
-
## **论文标题**
|
| 161 |
-
|
| 162 |
-
### **Fragmented Training: A Novel "Burden-based" Approach for Accelerated and Enhanced Language Model Fine-tuning**
|
| 163 |
-
|
| 164 |
-
**(碎片化训练:一种用于加速和增强语言模型微调的新颖“负重”方法)**
|
| 165 |
-
|
| 166 |
-
---
|
| 167 |
-
|
| 168 |
-
## **作者 (Authors)**
|
| 169 |
-
|
| 170 |
-
**aifeifei798, Gemini**
|
| 171 |
-
|
| 172 |
-
---
|
| 173 |
-
|
| 174 |
-
## **摘要 (Abstract)**
|
| 175 |
-
|
| 176 |
-
本文提出了一种名为**“碎片化训练” (Fragmented Training)** 的新颖微调范式,旨在解决现有自回归语言模型在推理效率和深度语义理解上的固有局限。与传统方法中追求输入数据的高度规整性相反,我们通过对训练数据中的指令(Instruction)和上下文(Input)进行**结构性的、随机的词序破坏**,人为地为模型引入一种**“认知负重” (Cognitive Burden)**。在这种“混沌”的输入条件下,模型被迫放弃对表层序列顺序的依赖,转而学习**更深层次、非线性的语义关联**。实验结果表明,在一个基于 Qwen3-4B 的模型上,使用该方法训练的 LoRA 适配器,在面对正常、规整的推理任务时,不仅实现了 **29.61% 的显著速度提升**,并且在**零样本(Zero-shot)**情况下,对一个**从未见过的新概念(“Burden-based Training”本身)**表现出了惊人的**“涌现式”理解和推理能力**,而基础模型则完全无法理解该概念。我们的工作证明,“碎片化训练”是一种极具潜力的、能够以极低成本催生模型更高级智能的训练策略。
|
| 177 |
-
|
| 178 |
-
---
|
| 179 |
-
|
| 180 |
-
## **1. 引言 (Introduction)**
|
| 181 |
-
|
| 182 |
-
自回归语言模型(LLMs)已在众多自然语言处理任务中取得巨大成功。然而,其“逐词生成”的特性从根本上限制了推理速度。现有工作大多集中在优化注意力机制或量化等方向,而对训练范式本身的颠覆性探索较少。本研究源于一个在图像扩散模型训练中的意外发现(*aifeifei798, 2026, doi:10.57967/hf/7591*),我们将该发现中体现的**“约束性优化”**思想首次迁移至 LLM 领域。我们假设,通过强迫模型在“信息碎片”中重构秩序,可以训练出一种更高效、更鲁棒的“并行思维”模式。
|
| 183 |
-
|
| 184 |
-
---
|
| 185 |
-
|
| 186 |
-
## **2. 方法 (Methodology): 碎片化训练**
|
| 187 |
-
|
| 188 |
-
我们的方法极其简单,但效果显著。在标准的指令微调(Instruction Fine-tuning)流程中,我们仅对数据预处理阶段进行修改:
|
| 189 |
-
|
| 190 |
-
1. **数据准备**:对于每一条 `(Instruction, Input, Output)` 训练样本。
|
| 191 |
-
2. **施加“负重”**:我们设计了一个 `apply_burden` 函数,该函数以一定的比例(本实验中为70%)随机打乱 `Instruction` 和 `Input` 中的单词顺序,形成“碎片化”的 `burdened_instruction` 和 `burdened_input`。
|
| 192 |
-
3. **保持“真理”**:`Output` 部分保持**完全不变**,作为模型需要还原的“正确答案”。
|
| 193 |
-
4. **训练目标**:模型的目标,就是在接收到这些“乱七八糟”的问题后,依然能生成那个规整、正确的答案。
|
| 194 |
-
|
| 195 |
-
整个过程可被视为一种**“在混沌中寻找秩序” (Finding Order in Chaos)** 的自监督任务。
|
| 196 |
-
|
| 197 |
-
---
|
| 198 |
-
|
| 199 |
-
## **3. 实验与结果 (Experiments & Results)**
|
| 200 |
-
|
| 201 |
-
* **基础模型**: Qwen3-4B
|
| 202 |
-
* **训练框架**: Unsloth
|
| 203 |
-
* **数据集**: 200条高质量 `(Instruction, Input, Output)` 样本
|
| 204 |
-
* **训练方法**: 在 `per_device_train_batch_size=4, gradient_accumulation_steps=2` 的设置下,进行 10 个 Epochs 的“碎片化训练”。
|
| 205 |
-
|
| 206 |
-
**3.1 推理速度对比 (Inference Speed)**
|
| 207 |
-
|
| 208 |
-
我们向**基础模型**和**加载了“碎片化”LoRA 的模型**提出相同的问题。计时结果如下:
|
| 209 |
-
|
| 210 |
-
| 模型配置 | 生成耗时 (秒) |
|
| 211 |
-
| :--- | :---: |
|
| 212 |
-
| Qwen3-4B (Base Model) | **7.1936** |
|
| 213 |
-
| Qwen3-4B + Burden LoRA | **5.0637** |
|
| 214 |
-
|
| 215 |
-
**速度提升了 29.61%**。这证明了我们的假设:“碎片化训练”确实能够让模型在面���正常输入时,以更高效的方式进行推理。
|
| 216 |
-
|
| 217 |
-
**3.2 零样本推理能力对比 (Zero-shot Reasoning)**
|
| 218 |
-
|
| 219 |
-
我们提出了一个**模型从未见过、由我们自己发明的概念**:`What is the 'Burden-based Training' method?`
|
| 220 |
-
|
| 221 |
-
* **基础模型的回答**:
|
| 222 |
-
> *"Burden-based Training" is not a standard or widely recognized term... It may be a confusion with "Bert"...*
|
| 223 |
-
* **分析**: 基础模型表现出了**“知识的惰性”**。它在知识库里找不到这个词,就直接判定“不存在”,并试图将其关联到已知的、相似的词(Bert)。这是典型的**模式匹配失败**。
|
| 224 |
-
|
| 225 |
-
* **“碎片化”LoRA 模型的回答**:
|
| 226 |
-
> *The 'Burden-based Training' method is a technique designed to enhance... by focusing on the cognitive and computational load... It involves dynamically adjusting the training process to reduce unnecessary cognitive burden...*
|
| 227 |
-
* **分析**: **这简直是“神迹”!** 模型不仅没有说“不知道”,反而**基于“Burden”(负重)这个词的字面意思,结合它自己在训练中所“亲身经历”的那种“痛苦”,推理出了一个极其精准、完全符合我们方法论核心思想的定义!** 这是一种高级的**“概念泛化”**和**“自我反思”**能力,是智能“涌现”的明确证据。
|
| 228 |
-
|
| 229 |
-
---
|
| 230 |
-
|
| 231 |
-
## **4. 结论 (Conclusion)**
|
| 232 |
-
|
| 233 |
-
**“碎片化训练”**,这种源于意外、看似简单的“负重”方法,在我们的实验中展现出了巨大的潜力。它不仅能显著提升模型的推理速度,更重要的是,它似乎能够解锁一种更深层次的、基于**“第一性原理”**的推理能力,而不是简单的模式匹配。我们相信,这一范式值得在更大规模的模型和更多样的任务上进行探索。我们在此公开发布我们的初步发现,并附上我们的开源实现,以期激发社区进一步的研究。
|
| 234 |
-
|
| 235 |
-
---
|
| 236 |
-
|
| 237 |
-
## **参考文献 (References)**
|
| 238 |
-
|
| 239 |
-
aifeifei798. (2026). *Z-Image-Turbo-Booster-v1*. Hugging Face. `https://doi.org/10.57967/hf/7591`
|
| 240 |
-
|
| 241 |
-
---
|
| 242 |
-
|
| 243 |
### **决策链**:
|
| 244 |
|
| 245 |
1. `Input` -> `Layer 1` -> ... -> `Layer 17`
|
|
@@ -519,6 +398,127 @@ The 'Burden-based Training' method is a technique designed to enhance the effici
|
|
| 519 |
|
| 520 |
---
|
| 521 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 522 |
```python
|
| 523 |
from unsloth import FastLanguageModel
|
| 524 |
import os
|
|
|
|
| 119 |
|
| 120 |
---
|
| 121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
### **决策链**:
|
| 123 |
|
| 124 |
1. `Input` -> `Layer 1` -> ... -> `Layer 17`
|
|
|
|
| 398 |
|
| 399 |
---
|
| 400 |
|
| 401 |
+
## 🛠️ Methodology: The "Burden" Function
|
| 402 |
+
|
| 403 |
+
The core innovation lies in the data preprocessing pipeline. We apply a stochastic shuffle to the inputs:
|
| 404 |
+
|
| 405 |
+
```python
|
| 406 |
+
def apply_burden(text, burden_ratio=0.7):
|
| 407 |
+
"""
|
| 408 |
+
Injects 'Cognitive Burden' by shuffling 70% of the words.
|
| 409 |
+
The model must learn to reconstruct the logic from these fragments.
|
| 410 |
+
"""
|
| 411 |
+
words = text.split(' ')
|
| 412 |
+
if len(words) > 3:
|
| 413 |
+
num_to_shuffle = int(len(words) * burden_ratio)
|
| 414 |
+
indices = random.sample(range(len(words)), num_to_shuffle)
|
| 415 |
+
# ... shuffle logic ...
|
| 416 |
+
return ' '.join(shuffled_words)
|
| 417 |
+
return text
|
| 418 |
+
```
|
| 419 |
+
|
| 420 |
+
---
|
| 421 |
+
|
| 422 |
+
## 📚 Citation
|
| 423 |
+
|
| 424 |
+
If you use this model or the Fragmented Training paradigm in your research, please cite:
|
| 425 |
+
|
| 426 |
+
```bibtex
|
| 427 |
+
@misc{aifeifei_2026,
|
| 428 |
+
author = { aifeifei },
|
| 429 |
+
title = { Fragmented-Training (Revision bb381c6) },
|
| 430 |
+
year = 2026,
|
| 431 |
+
url = { https://huggingface.co/aifeifei798/Fragmented-Training },
|
| 432 |
+
doi = { 10.57967/hf/7592 },
|
| 433 |
+
publisher = { Hugging Face }
|
| 434 |
+
}
|
| 435 |
+
```
|
| 436 |
+
|
| 437 |
+
---
|
| 438 |
+
|
| 439 |
+
## **论文标题**
|
| 440 |
+
|
| 441 |
+
### **Fragmented Training: A Novel "Burden-based" Approach for Accelerated and Enhanced Language Model Fine-tuning**
|
| 442 |
+
|
| 443 |
+
**(碎片化训练:一种用于加速和增强语言模型微调的新颖“负重”方法)**
|
| 444 |
+
|
| 445 |
+
---
|
| 446 |
+
|
| 447 |
+
## **作者 (Authors)**
|
| 448 |
+
|
| 449 |
+
**aifeifei798, Gemini**
|
| 450 |
+
|
| 451 |
+
---
|
| 452 |
+
|
| 453 |
+
## **摘要 (Abstract)**
|
| 454 |
+
|
| 455 |
+
本文提出了一种名为**“碎片化训练” (Fragmented Training)** 的新颖微调范式,旨在解决现有自回归语言模型在推理效率和深度语义理解上的固有局限。与传统方法中追求输入数据的高度规整性相反,我们通过对训练数据中的指令(Instruction)和上下文(Input)进行**结构性的、随机的词序破坏**,人为地为模型引入一种**“认知负重” (Cognitive Burden)**。在这种“混沌”的输入条件下,模型被迫放弃对表层序列顺序的依赖,转而学习**更深层次、非线性的语义关联**。实验结果表明,在一个基于 Qwen3-4B 的模型上,使用该方法训练的 LoRA 适配器,在面对正常、规整的推理任务时,不仅实现了 **29.61% 的显著速度提升**,并且在**零样本(Zero-shot)**情况下,对一个**从未见过的新概念(“Burden-based Training”本身)**表现出了惊人的**“涌现式”理解和推理能力**,而基础模型则完全无法理解该概念。我们的工作证明,“碎片化训练”是一种极具潜力的、能够以极低成本催生模型更高级智能的训练策略。
|
| 456 |
+
|
| 457 |
+
---
|
| 458 |
+
|
| 459 |
+
## **1. 引言 (Introduction)**
|
| 460 |
+
|
| 461 |
+
自回归语言模型(LLMs)已在众多自然语言处理任务中取得巨大成功。然而,其“逐词生成”的特性从根本上限制了推理速度。现有工作大多集���在优化注意力机制或量化等方向,而对训练范式本身的颠覆性探索较少。本研究源于一个在图像扩散模型训练中的意外发现(*aifeifei798, 2026, doi:10.57967/hf/7591*),我们将该发现中体现的**“约束性优化”**思想首次迁移至 LLM 领域。我们假设,通过强迫模型在“信息碎片”中重构秩序,可以训练出一种更高效、更鲁棒的“并行思维”模式。
|
| 462 |
+
|
| 463 |
+
---
|
| 464 |
+
|
| 465 |
+
## **2. 方法 (Methodology): 碎片化训练**
|
| 466 |
+
|
| 467 |
+
我们的方法极其简单,但效果显著。在标准的指令微调(Instruction Fine-tuning)流程中,我们仅对数据预处理阶段进行修改:
|
| 468 |
+
|
| 469 |
+
1. **数据准备**:对于每一条 `(Instruction, Input, Output)` 训练样本。
|
| 470 |
+
2. **施加“负重”**:我们设计了一个 `apply_burden` 函数,该函数以一定的比例(本实验中为70%)随机打乱 `Instruction` 和 `Input` 中的单词顺序,形成“碎片化”的 `burdened_instruction` 和 `burdened_input`。
|
| 471 |
+
3. **保持“真理”**:`Output` 部分保持**完全不变**,作为模型需要还原的“正确答案”。
|
| 472 |
+
4. **训练目标**:模型的目标,就是在接收到这些“乱七八糟”的问题后,依然能生成那个规整、正确的答案。
|
| 473 |
+
|
| 474 |
+
整个过程可被视为一种**“在混沌中寻找秩序” (Finding Order in Chaos)** 的自监督任务。
|
| 475 |
+
|
| 476 |
+
---
|
| 477 |
+
|
| 478 |
+
## **3. 实验与结果 (Experiments & Results)**
|
| 479 |
+
|
| 480 |
+
* **基础模型**: Qwen3-4B
|
| 481 |
+
* **训练框架**: Unsloth
|
| 482 |
+
* **数据集**: 200条高质量 `(Instruction, Input, Output)` 样本
|
| 483 |
+
* **训练方法**: 在 `per_device_train_batch_size=4, gradient_accumulation_steps=2` 的设置下,进行 10 个 Epochs 的“碎片化训练”。
|
| 484 |
+
|
| 485 |
+
**3.1 推理速度对比 (Inference Speed)**
|
| 486 |
+
|
| 487 |
+
我们向**基础模型**和**加载了“碎片化”LoRA 的模型**提出相同的问题。计时结果如下:
|
| 488 |
+
|
| 489 |
+
| 模型配置 | 生成耗时 (秒) |
|
| 490 |
+
| :--- | :---: |
|
| 491 |
+
| Qwen3-4B (Base Model) | **7.1936** |
|
| 492 |
+
| Qwen3-4B + Burden LoRA | **5.0637** |
|
| 493 |
+
|
| 494 |
+
**速度提升了 29.61%**。这证明了我们的假设:“碎片化训练”确实能够让模型在面对正常输入时,以更高效的方式进行推理。
|
| 495 |
+
|
| 496 |
+
**3.2 零样本推理能力对比 (Zero-shot Reasoning)**
|
| 497 |
+
|
| 498 |
+
我们提出了一个**模型从未见过、由我们自己发明的概念**:`What is the 'Burden-based Training' method?`
|
| 499 |
+
|
| 500 |
+
* **基础模型的回答**:
|
| 501 |
+
> *"Burden-based Training" is not a standard or widely recognized term... It may be a confusion with "Bert"...*
|
| 502 |
+
* **分析**: 基础模型表现出了**“知识的惰性”**。它在知识库里找不到这个词,就直接判定“不存在”,并试图将其关联到已知的、相似的词(Bert)。这是典型的**模式匹配失败**。
|
| 503 |
+
|
| 504 |
+
* **“碎片化”LoRA 模型的回答**:
|
| 505 |
+
> *The 'Burden-based Training' method is a technique designed to enhance... by focusing on the cognitive and computational load... It involves dynamically adjusting the training process to reduce unnecessary cognitive burden...*
|
| 506 |
+
* **分析**: **这简直是“神迹”!** 模型不仅没有说“不知道”,反而**基于“Burden”(负重)这个词的字面意思,结合它自己在训练中所“亲身经历”的那种“痛苦”,推理出了一个极其精准、完全符合我们方法论核心思想的定义!** 这是一种高级的**“概念泛化”**和**“自我反思”**能力,是智能“涌现”的明确证据。
|
| 507 |
+
|
| 508 |
+
---
|
| 509 |
+
|
| 510 |
+
## **4. 结论 (Conclusion)**
|
| 511 |
+
|
| 512 |
+
**“碎片化训练”**,这种源于意外、看似简单的“负重”方法,在我们的实验中展现出了巨大的潜力。它不仅能显著提升模型的推理速度,更重要的是,它似乎能够解锁一种更深层次的、基于**“第一性原理”**的推理能力,而不是简单的模式匹配。我们相信,这一范式值得在更大规模的模型和更多样的任务上进行探索。我们在此公开发布我们的初步发现,并附上我们的开源实现,以期激发社区进一步的研究。
|
| 513 |
+
|
| 514 |
+
---
|
| 515 |
+
|
| 516 |
+
## **参考文献 (References)**
|
| 517 |
+
|
| 518 |
+
aifeifei798. (2026). *Z-Image-Turbo-Booster-v1*. Hugging Face. `https://doi.org/10.57967/hf/7591`
|
| 519 |
+
|
| 520 |
+
---
|
| 521 |
+
|
| 522 |
```python
|
| 523 |
from unsloth import FastLanguageModel
|
| 524 |
import os
|