Hybrid Quantum Transformer for Language Generation
Desheng Kong, Xiangshuo Cui, Jiaying Jin, Jing Xu, Donglin Wang
TL;DR
HyQuT tackles the high resource cost of large language models by integrating variational quantum circuits into Transformer layers, creating a hybrid quantum–classical backbone capable of generative NLP. By implementing a three-stage quantum module with adaptive dimensionality reduction, batched quantum processing, and a quantum-enhanced self-attention mechanism, the approach achieves substantial parameter and compute reductions without sacrificing convergence or text quality. Empirical results at 8M and 150M scales show that as few as 10 qubits with 80 gates can replace roughly 10% of classical parameters in a 150M model, with stable training and coherent generation, presenting a viable near-term quantum augmentation path for NLP. The work thus provides a proof of concept for quantum-augmented generative NLP and suggests directions for scaling quantum integrations in future large-scale models.
Abstract
Although quantum computing has been increasingly applied to replace classical computation, most existing quantum or hybrid models remain confined to simple tasks, with no successful application to large-scale natural language generation to date. In this work, we present the first hybrid quantum-classical large language model (LLM) for natural language generation, HyQuT, capable of performing coherent and context-aware dialogue. The proposed architecture integrates variational quantum circuits (VQCs) into the Transformer framework at both 8M and 150M parameter scales. Experimental results show that a minimal number of qubits (10 qubits with 80 quantum gates) can replace about 10% of the classical parameters in the 150M-parameter model, while achieving comparable convergence stability and generation quality. This study provides an early demonstration of the feasibility of integrating quantum computing to large-scale generative language models.
