arXiv:2410.17397quant-phcs.AI2024-10被引 17

用量子电路替换大模型关键层,实现性能提升且参数减少超99%。

Quantum Large Language Models via Tensor Network Disentanglers

  • 将注意力与前馈层权重转为量子电路+张量网络结构。
  • 单层参数从11万降至约36,困惑度仅增0.3%以内。
  • 在真实量子处理器上验证,适合追求高效量子增强的开发者。

我们提出一种将量子计算无缝融入预训练大语言模型的框架。核心思想是构建混合量子-经典表示,精确复现原模型,为量子资源提升性能提供合理起点。方法将自注意力和多层感知机层中的权重矩阵替换为两个与矩阵乘积算子(MPO)耦合的变分量子电路。张量网络解纠缠器将每层大部分信息转移至量子电路,使剩余张量网络可压缩至一阶键维的MPO,经典参数减少超过三个数量级(实验中由110,592降至约36),困惑度增加不足0.3%。在该表示上训练额外酉适配器后,模型性能超越原模型,困惑度最高降低1.6%。最后,我们在真实量子处理器上验证了该混合架构,展示了通往量子增强语言模型的实际路径。

原文摘要 · Abstract (English)

We introduce a framework for seamlessly integrating quantum computing into pretrained large language models (LLMs). The key idea is to construct a hybrid quantum-classical representation that exactly reproduces the original model, providing a principled starting point from which quantum resources can only improve performance. Our approach replaces the weight matrices in self-attention and multilayer perceptron layers with two variational quantum circuits coupled to a matrix product operator (MPO). Tensor network disentanglers transfer much of each layer's information into the quantum circuits, enabling the remaining tensor network to be compressed to a bond-dimension-one MPO with over three orders of magnitude fewer classical parameters (in our experiments, from 110,592 to approximately 36 for the replaced layer) and less than a 0.3\% increase in perplexity. Training an added unitary adapter on top of this representation then surpasses the original model, reducing perplexity by up to 1.6\%. Finally, we validate the hybrid architecture on a real quantum processor, demonstrating a practical route towards quantum-enhanced language models.

量子计算大模型张量网络量子增强

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。