다중 헤드 양자 신경망: 300억 매개변수 LLM 내부의 트랜스포머 블록을 NISQ 모듈로 대체하기
Multi-head Quantum Neural Networks: Replacing Transformer Blocks with NISQ Modules inside a 30-Billion-Parameter LLM
한국어 초록
우리는 다중 헤드 양자 신경망(QNN)을 소개한다. 이는 잡음이 있는 중간 규모 양자(NISQ) 장치와 호환되는 양자 모듈로, 사전 학습된 대규모 언어 모델(LLM) 내부의 트랜스포머 블록을 정확도 손실을 거의 없이, 대체되는 블록보다 훨씬 적은 매개변수로 대체할 수 있다. 모델의 $D$개 은닉 뉴런을 큐비트 레지스터에 인코딩하는 것이 걸림돌인데, 진폭 인코딩은 회로 깊이에서, 각도 인코딩은 큐비트 수에서 확장성이 나빠 어느 쪽도 실제 서비스 규모의 너비에서는 실용적이지 않다. 대신 우리는 은닉 공간을 $k$개의 서로소 헤드로 분할하고, 각각을 $n_q$ 큐비트 레지스터에 각도 인코딩하여 헤드를 병렬로 처리하며, 제약된 고전 선형 계층인 믹서를 통해 헤드들을 결합한다. Qwen3-30B-A3B-Instruct-2507에 대해 수술적 교체를 수행하여, 학습 가능한 매개변수가 $145\,281$개인 단일 다중 헤드 QNN($D=2048$, $k=32$, $n_q=8$, $L=4$)이 연속된 여덟 개의 트랜스포머 블록 구간을 대체할 수 있으며 모델 매개변수의 $16.33\%$를 대체함을 보인다. 절제 실험에 따르면, 단일 블록을 대체하는 경우 대체된 기능을 복원하는 것은 고전 믹서만이 아니라 양자 헤드(회로와 이어지는 학습된 판독)이며, 융합된 구간의 경우 믹서만으로도 퍼플렉시티에서 전체 모듈의 $1$-$3\%$ 이내에 도달한다. 이러한 이점이 학습된 얽힘 양자 회로에 특유한 것인지는 확립되지 않았다. 얽힘 게이트를 끈 통제(두 개 시드), 또는 회로를 초기 각도나 균일 무작위 각도로 고정한 통제(한 개 시드)가 홀드아웃 퍼플렉시티에서 전체 모듈을 능가했으며, 매개변수를 맞춘 고전 다층 퍼셉트론은 전체 모듈보다 몇 퍼센트 앞선 상태를 유지한다. 우리는 정확한 상태 벡터 시뮬레이션으로 고전적으로 학습한 뒤, 융합 체크포인트의 양자 헤드를 $156$큐비트 IBM Heron 프로세서에서 실행하여, NISQ 규모의 양자 모듈을 실제 서비스 규모의 LLM에 설치하고 하드웨어에서 실행할 수 있음을 보인다.
원문 초록
We introduce the multi-head quantum neural network (QNN), a quantum module compatible with noisy intermediate-scale quantum (NISQ) devices that can replace transformer blocks inside pre-trained large language models (LLMs) with little loss in accuracy and with far fewer parameters than the blocks it replaces. Encoding a model's $D$ hidden neurons into a qubit register is the obstacle: amplitude encoding scales poorly in circuit depth and angle encoding in qubit count, so neither is practical at production-scale width. We instead partition the hidden space into $k$ disjoint heads, angle-encode each into an $n_q$-qubit register, process the heads in parallel, and couple them through constrained classical linear layers, the mixers. Performing surgery on Qwen3-30B-A3B-Instruct-2507, we show that a single multi-head QNN with $145\,281$ trainable parameters ($D=2048$, $k=32$, $n_q=8$, $L=4$) can replace a contiguous span of eight transformer blocks, displacing $16.33\%$ of the model's parameters. Ablations show that, for a single replaced block, the quantum heads (circuits followed by a learned readout), and not the classical mixers alone, recover the displaced function, whereas for fused spans the mixers alone come within $1$-$3\%$ of the full module in perplexity. Whether this benefit is specific to trained, entangling quantum circuits is not established: controls that switch the entangler off (two seeds), or freeze the circuit at its initial or at uniformly random angles (one seed), beat the full module on held-out perplexity, and a parameter-matched classical multilayer perceptron remains a few percent ahead of the full module. We train classically with exact statevector simulation, then execute the quantum heads of our fusion checkpoints on a $156$-qubit IBM Heron processor, showing that NISQ-scale quantum modules can be installed in a production-scale LLM and run on hardware.
제출 이력
확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
공통 태그로 연결된 공개 논문이 아직 없습니다.
토론
이 논문과 연결된 포럼 글이 아직 없습니다.
저자 비고
arXiv Comments
24 pages, 5 figures, 21 tables