中文

LLM 模块:通过增强的跨注意力机制将知识从大型模型转移到小型模型

计算与语言 2025-02-13 v1 机器学习

摘要

本文提出一种 LLM 模块架构,使知识能够从大型预训练模型转移到小型模型,采用增强的跨注意力机制。在所提出的方案中,冻结的 Qwen2-1.5B 模型的表示通过 specially 设计的注意力层传递给在有限计算资源上进行训练的 GPT-Neo-125M 模型。在 Bespoke-Stratos-17k 数据集上的实验结果表明,经过 15 个 epoch 的训练后,组合模型生成的响应质量相当于蒸馏获得的响应质量。我们讨论了模块化方法的优势,提供了输入查询示例和比较分析,并概述了该方法进一步扩展的前景。

关键词

引用

@article{arxiv.2502.08213,
  title  = {LLM Modules: Knowledge Transfer from a Large to a Small Model using Enhanced Cross-Attention},
  author = {Konstantin Kolomeitsev},
  journal= {arXiv preprint arXiv:2502.08213},
  year   = {2025}
}

备注

Code and pre-trained weights available at https://huggingface.co/kkolomeitsev/llm-modules