A Quantum Circuit-Based Compression Perspective for Parameter-Efficient Learning

## Abstract

Abstract Quantum-centric supercomputing presents a compelling framework for large-scale hybrid quantum-classical tasks. Although quantum machine learning (QML) offers theoretical benefits in various applications, challenges such as large-size data encoding in the input stage and the reliance on quantum resources in the inference stage limit its practicality for tasks like fine-tuning large language models (LLMs). Quantum parameter generation, a novel approach of QML, addresses these limitations by using quantum neural networks (QNNs) to generate classical model weights (parameters) exclusively during training, thereby decoupling inference from quantum hardware. In this work, we introduce Quantum Parameter Adaptation (QPA) in the framework of quantum parameter generation, which integrates QNNs with a classical multi-layer perceptron mapping model to generate parameters for fine-tuning methods. Using Gemma-2 and GPT-2 as case studies, QPA demonstrates significant parameter reduction for parameter-efficient fine-tuning methods, such as Low-Rank Adaptation (LoRA), while maintaining comparable or improved performance in text generation tasks. Specifically, QPA reduces the number of parameters to 52.06 % percent 52.06 52.06\% of the original LoRA for GPT-2 with a slight performance gain of 0.75 % percent 0.75 0.75\% , and to 16.84 % percent 16.84 16.84\% for Gemma-2, with a marginal performance improvement of 0.07 % percent 0.07 0.07\% . These results highlight QPA’s ability to achieve efficient parameter reduction without sacrificing performance in the quantum parameter generation framework. This work showcases the potential of quantum-enhanced parameter reduction, offering a scalable quantum-classical solution for fine-tuning LLMs while preserving the feasibility of inference on classical hardware.

## 1 Introduction

Decomposing complex problems into components suited for classical or quantum computing allows for more efficient problem-solving. While classical systems handle tasks like data processing, quantum computing excels in optimization and managing large state spaces. Quantum-centric supercomputing (Bravyi et al., ; Gambetta, ) combines these strengths, offering scalable solutions for challenging problems. This hybrid approach is especially promising in quantum machine learning (QML), where it can enhance the training and fine-tuning of large models.

Conventional QML approaches employ parameterized quantum circuits (PQCs) as quantum neural networks (QNNs) (Chen et al., ), where data is input through specific data encoding methods (Pérez-Salinas et al., ; Schuld et al., ). The updates to QNN parameters during the training process are computed on the classical side, creating a hybrid quantum-classical computing framework (Mari et al., ). When scaled up, quantum-centric supercomputing offers a promising paradigm that could reshape the landscape of computational science, particularly in the current Noisy Intermediate-Scale Quantum (NISQ) era (Preskill, ). Classical neural networks (NNs) can also be combined with QNNs, serving as either pre-processing or post-processing layers (Mari et al., ; Liu et al., ). While both empirical and theoretical results suggest that QML can offer improvements in specific applications (Cerezo et al., ; Huang et al., ; Biamonte et al., ; Caro et al., ; Huang et al., ), significant challenges remain—particularly in data encoding for large datasets. For instance, gate-angle encoding can result in quantum circuits that are either too deep or require an impractical number of qubits. Another major obstacle to the practicality of QML is the need for a quantum computer during the model inference stage.

Figure: Figure 1: Overview of (a) Quantum Machine Learning (Mari et al., ; Mitarai et al., ), (b) Quantum Parameter Generation (Liu et al., ), (c) our proposed Quantum Parameter Adaptation (QPA), and (d) Parameter-Efficient Fine-Tuning methods (Houlsby et al., ).
Refer to caption: /html/2410.09846/assets/x1.png

One such proposal to address both the data encoding challenge and the requirement for quantum hardware during the inference stage is quantum parameter generation (Sidhu & Kok, ; Liu et al., ). Instead of using a QNN to interact directly with the data, this approach leverages QNNs to “generate” the weights of a target classical NN model during the training process. This quantum parameter generation method: 1) keeps the data input process entirely within the classical model, 2) eliminates the exorbitant need for quantum computing hardware during inference, as the trained model is purely classical, and 3) reduces the number of training parameters on a polylogarithmic scale by mapping quantum state basis to the target NN parameters, assuming the QNN is constructed with a polynomial number of layers relative to the qubit count. Further details will be provided in the following sections.

Current studies (Liu et al., ; Lin et al., ) of quantum parameter generation have primarily focused on small-scale models with fewer than one million parameters, where the largest model is up to $0.28$M. To more clearly demonstrate the practicality of this quantum approach, the size of the models or problems investigated should be scaled to more realistic levels, extending beyond basic tasks such as handwritten digit classification and simplified reinforcement learning environments.

As model sizes grow, both in quantum and classical machine learning (ML), scaling becomes a key computation challenge. This is especially evident in the rise of large language models (LLMs), which have become foundational in natural language processing tasks. However, training and fine-tuning LLMs—such as GPT-2 (Radford et al., ), GPT-3 (Brown, ), and the more recent Gemma-2 (Team et al., )—presents its own set of challenges. The immense number of parameters in these models requires vast computational resources, making conventional fine-tuning approaches computationally expensive and impractical for many use cases. To address these issues, parameter-efficient fine-tuning methods (PEFT) like Low-Rank Adaptation (LoRA) (Hu et al., ), Weight-Decomposed Low-Rank Adaptation (DoRA) (Liu et al., ), Prefix-Tuning (PT) (Li & Liang, ; Yang et al., ), and adapters have been proposed (Houlsby et al., ; Lin et al., ). These methods aim to reduce the number of trainable parameters while maintaining model performance, yet the challenge of balancing efficiency and effectiveness remains a critical area of research.

We draw inspiration from both quantum parameter generation and PEFT methods for LLMs, which demonstrate that PQCs can serve as parameter generators for machine learning models, and changes to LLM weights can be captured by low-rank or smaller-sized representations (models). We suggest that the training parameters in PEFT methods can be generated using a combination of QNNs and a classical multi-layer perceptron (MLP) mapping model, further reducing the parameter count. This leads to our introduction of the Quantum Parameter Adaptation (QPA) method.
QPA enables additional parameter reduction during fine-tuning by leveraging the quantum parameter generation method to generate PEFT parameters, as shown in Fig. [1](#S1.F1). The figure also provides an overview of QML, quantum parameter generation, and PEFT for comparison, clearly illustrating how QPA generates the PEFT parameters.
In experiments with Gemma-2 (Team et al., ) and GPT-2 (Radford et al., ), we demonstrate that QPA reduces the number of parameters in methods such as LoRA, DoRA, PT, and Feed-Forward Adapters (FFAs) by nearly an order of magnitude (e.g., $10^{6}\rightarrow 10^{5}$), while achieving better or comparable perplexity in text generation tasks. QPA marks the first example of quantum computing applied to fine-tuning classical LLMs at a practical scale, while enabling inference to be performed entirely on classical hardware. Further theoretical analysis of QPA’s convergence behavior, as well as its trainability and learnability properties, is left for future work.

The main contributions of QPA include:

- •
Efficient adaptation through quantum parameter generation: QPA utilizes quantum parameters from the PQC, which scale in proportion to the number of qubits $N$, to generate parameters that scale with the Hilbert space size $2^{N}$. When applied to tunable parameters in PEFT tasks, this property enables highly efficient adaptation by generating parameters through quantum methods.
- •
Practical application of QML in LLMs: By incorporating quantum parameter generation, our approach to combining QML with LLMs is more practical compared to conventional QML methods (i.e., Quantum Transformer (Di Sipio et al., )). The data-encoding issues associated with conventional QML (Yang et al., ) have been eliminated, and the inference stage no longer requires quantum hardware. This is particularly important for tasks that demand short response times, as reliance on remote quantum computers could introduce delays due to queuing and increased costs.
- •
Scaling up the size of existing quantum parameter generation studies: In this study, we scale up the application of quantum parameter generation by fine-tuning up to the linear layer of the Gemma-2 ($2$B) model, where the target layer consists of $0.52$B parameters. This is approximately $1785$ times larger than the largest previously studied model ($0.28$M), significantly pushing the boundaries of how QML can be applied.
- •
Flexibility, applicability, and efficiency in classical fine-tuning methods: We demonstrate that quantum parameter generation is not only capable of generating classical NN parameters, but is also applicable to a wide-range of popular parameter-tuning tasks. These tasks include tuning parameters in methods such as LoRA, DoRA, PT, and FFA, all while achieving comparable or better perplexity in text generation tasks with reduced parameter requirements.

## 2 Related Works

Parameter-Efficient Fine-Tuning (PEFT) Methods. To address the challenge of fine-tuning LLMs, PEFT methods aim to reduce the number of trainable parameters while maintaining or even improving model performance. Key PEFT approaches include LoRA (Hu et al., ) and DoRA (Liu et al., ), which assume that the changes in model weights during fine-tuning lie in a low-rank subspace. Instead of updating the full weight matrices, these methods add small, trainable low-rank decomposition matrices to the model’s weights, effectively reducing the number of trainable parameters while capturing the essential adjustments. Another approach involves adapters, which are small feed-forward layers inserted between existing layers of the neural network (Houlsby et al., ; Lin et al., ). Only these adapter layers are fine-tuned, leaving the rest of the model unchanged, thus significantly reducing the training overhead. PT (Li & Liang, ; Yang et al., ) takes a different approach by introducing tunable prefix vectors that are prepended to the input or hidden states at each layer. During fine-tuning, only these prefix vectors are updated, while the core model parameters remain frozen. These techniques optimize fine-tuning efficiency by focusing on smaller, task-specific modifications.

From Quantum Circuit Learning to Large-Scale Representation Modeling. QML leverages quantum properties such as superposition and entanglement, presenting a theoretically promising approach to accelerate the training and learning process (Du et al., ; Schuld & Killoran, ; Farhi & Neven, ). However, the process of encoding classical data into quantum states increases the depth of quantum circuits, further adding to the depth of QNNs (Pérez-Salinas et al., ; Schuld et al., ). We refer to QML approaches that directly interact with data as “conventional QML,” distinct from the quantum parameter generation approach discussed later. There have been proposals suggesting that the GPT model could be integrated into the quantum computing paradigm (Liao & Ferrie, ), where the transformer architecture is implemented using quantum circuits (Gao et al., ; Khatri et al., ). In such case, the input data is encoded into quantum states through amplitude encoding methods. Consequently, these QML methods require access to quantum computers during the inference stage.

Training Classical Neural Networks via Quantum Computing.
Leveraging quantum computing to train classical NNs offers a promising approach where the resulting model remains entirely classical, effectively addressing the challenges of data encoding and the reliance on quantum hardware during inference. One example involves utilizing quantum walks as a search process to optimize the parameters of classical NNs (de Souza et al., ). Another method proposes employing a quantum hypernetwork to train a classical binary NN (Carrasquilla et al., ). However, the practical utility of this approach is constrained by its ability to train only binary NNs, limiting its applicability in more general settings.

## 3 Quantum Parameter Generation Based Efficient Adaptation

In LoRA and DoRA, one primary assumption is that weight updates can be represented by low-rank matrices. However, these methods often lack flexibility in exploring parameter settings between integer ranks $r$ and $r+1$, leaving the intermediate values unexamined. A method capable of investigating the parameter space between $r$ and $r+1$ could potentially enhance performance by enabling more precise, “fine-grained” adjustments.
This limitation also applies to other PEFT methods with rigid configurations, such as PT, where the number of trainable parameters is strongly tied to the input size. Inspired by this idea and combined with quantum circuit based compression, which uses PQC and mapping model to train the target NN with fewer parameters, we hypothesize that using PQC-based QNN and mapping model as a parameter generator can take advantage of the fact that only a small number of QNN parameters are required to control the measurement probabilities, governed by the dimension of the Hilbert space. In other words, we propose that the high-dimensional Hilbert space facilitates an efficient representation for adaptation. This could lead to a more detailed and precise exploration of the representation space in PEFT methods.

### 3.1 Quantum Circuit based Model Parameter Generation.

We consider a parameter generation process that provides a different approach from conventional QML. Consider a target NN model with parameters ${\bm{a}}=(a_{1},a_{2},\ldots,a_{m})$, where $m$ is the number of parameters. A PQC with $N=\lceil\log_{2}m\rceil$ qubits and $L$ layers is constructed using a circuit ansatz, represented as:

$$ $|\psi({\bm{\theta}})\rangle=\left(\prod_{i=1}^{N-1}\text{CNOT}^{i,i+1}\prod_{j=1}^{N}R_{Y}^{j}(\theta_{j}^{(L)})\right)^{L}|0\rangle^{\otimes N},$ (1) $$

where the single-qubit rotation gate $R_{Y}^{j}$ is associated with the tunable parameter $\theta_{j}^{(L)}$, with qubit index $j$ and layer index $L$, and CNOT represents the two-qubit controlled-NOT gate. With a Hilbert space of size $2^{N}$, where $2^{N}\geq m$, this PQC produces $2^{N}$ distinct measurement probabilities, $|\langle\phi_{i}|\psi({\bm{\theta}})\rangle|^{2}\in[0,1]$ for $i\in\{1,2,\ldots,2^{N}\}$. The parameter size of ${\bm{\theta}}$ depends on $N$ and $L$, where $L$ is a hyperparameter similar to those in classical ML. Typically, $L$ scales proportionally to the number of qubits, either $O(N)$ or in some cases $O(N^{2})$ (Cerezo et al., ; Sim et al., ; Benedetti et al., ), though it can be generalized to a looser polynomial scale, $O(poly(N))$. Thus, with polynomial layers in the PQC, we can generate $2^{\lceil\log_{2}m\rceil}\geq m$ parameters (probabilities) using $O(polylog(m))$ PQC parameters.

At this stage, the measurement probabilities are values between 0 and 1. To map these probabilities to the target parameters ${\bm{a}}\in\mathbb{R}^{m}$, we employ a MLP mapping model $G$ with tunable parameters ${\bm{b}}$. The input to $G$ is the binary representation of the basis (of length $N$) and the corresponding measurement probability, such that

$$ $G_{{\bm{b}}}(|\phi_{i}\rangle,|\langle\phi_{i}|\psi({\bm{\theta}})\rangle|^{2})=a_{i},\quad\forall i\in\{1,2,\dots,m\}.$ (2) $$

Here, only the first $m$ basis states are used to cover all parameters in the target NN. Since the input size of $G_{{\bm{b}}}$ is $N+1$, the size of ${\bm{b}}$ can also be controlled at a scale of $O(polylog(M))$.
Consequently, ${\bm{a}}$ is generated from the output of the PQC and the mapping model $G_{\bm{b}}$. By tuning ${\bm{\theta}}$ and ${\bm{b}}$, we effectively influence the value of the loss function $\mathcal{L}$, which is evaluated by the target NN for a given task.

Gradient Estimation of Quantum Circuit Compressed Parameters.
The target NN parameters ${\bm{a}}$ are generated through the use of a PQC coupled with a mapping model. The quantum-dependent parameters, represented as $({\bm{\theta}},{\bm{b}})$, impact the target NN parameters via the quantum state preparation and measurement steps. The gradient of the loss function, reflecting the influence of quantum parameters, is expressed as:

$$ $\nabla_{{\bm{\theta}},{\bm{b}}}\mathcal{L}=\left(\frac{\partial{\bm{a}}}{\partial({\bm{\theta}},{\bm{b}})}\right)^{T}\cdot\nabla_{{\bm{a}}}\mathcal{L}.$ (3) $$

In this expression, $\frac{\partial{\bm{a}}}{\partial({\bm{\theta}},{\bm{b}})}$ denotes the Jacobian matrix, which describes how sensitive the classical parameters ${\bm{a}}$ are to changes in the quantum parameters $({\bm{\theta}},{\bm{b}})$. This provides a high-level overview of the gradient in an exact quantum state simulation. In practical applications involving real quantum computers, the gradient calculation must account for the parameter shift rule and its variants (Mitarai et al., ; Schuld et al., ).

Parameter Update of Quantum Circuit Compressed Parameters. The learning rate $\eta$ is a critical factor, particularly due to the complex dynamics introduced by the quantum-classical interface. The update for the quantum parameters is defined as:

$$ ${\bm{\theta}}_{t+1},{\bm{b}}_{t+1}={\bm{\theta}}_{t},{\bm{b}}_{t}+\eta\nabla_{{\bm{\theta}},{\bm{b}}}\mathcal{L}.$ (4) $$

This rule ensures that the quantum parameters are updated to optimize the performance of the target NN.

Using the gradient computation and parameter update rule, the parameter generation process of QPA has been applied to image classification with convolutional neural networks (CNNs) (Liu et al., ; ; Liu & Chen, ), flood prediction (time series) with long short-term memory (LSTM) models (Lin et al., ), and policy gradient reinforcement learning in CartPole and MiniGrid environments (Liu et al., ). These applications demonstrated a reduction in training parameters while maintaining similar performance.

**Table 1: Configuration of the mapping model $\tilde{G}_{{\bm{b}}}$, with $N$ representing the number of qubits for each task.**
| Hyperparameter | Meaning | Value |
| --- | --- | --- |
| Input size | Input of the mapping model $(|\phi_{i}\rangle,|\langle\phi_{i}|\psi({\bm{\theta}})\rangle|^{2})$ | $N+1$ |
| Hidden dimension | Main structure of the MLP mapping model | [32, 64, 128, 128, 64, 32, $n_{mlp}$] |

### 3.2 Batched Parameter Generation of Quantum Parameter Adaptation (QPA)

If the target NN model consists of $m$ parameters, the required number of qubits is $N=\lceil\log_{2}m\rceil$. For instance, scaling this up to $m=10^{9}$ (one billion) parameters would require $N=30$ qubits. Although a quantum system with 30 qubits is feasible on today’s hardware and in classical simulations, the GPU memory requirements (around 16 GB) and evaluation time (several seconds per circuit) (Google, ) make it impractical for ML tasks that demand extensive repetitions within a reasonable time frame. In our approach, the $m$ parameters (following the above syntax) of the target NN model are split into $n_{ch}$ chunks, with each chunk containing $n_{mlp}$ parameters, such that $n_{ch}=\lceil m/n_{mlp}\rceil$. In other words, the qubit count can be reduced by generating more than one parameter of the target NN per quantum basis. The mapping model, now represented as $\tilde{G}_{{\bm{b}}}$, takes as input $|\phi_{i}\rangle$ and $|\langle\phi_{i}|\psi({\bm{\theta}})\rangle|^{2}$, and outputs a batch of $n_{mlp}$ parameters ${\bm{a}}$ for each chunk:

$$ $\displaystyle{\bm{a}}=(\tilde{a}_{1},\tilde{a}_{2},\ldots,\tilde{a}_{n_{ch}}),$ (5) $\displaystyle\tilde{G}_{{\bm{b}}}(|\phi_{i}\rangle,|\langle\phi_{i}|\psi({\bm{\theta}})\rangle|^{2})=\tilde{a}_{i},\quad\forall i\in\{1,2,\ldots,n_{ch}\},$ (6) $\displaystyle\tilde{a}_{i}=(a_{i,1},a_{i,2},\dots,a_{i,j}),\quad\forall j\in\{1,2,\ldots,n_{mlp}\}.$ (7) $$

This is achieved by using a decoder-like structure in the MLP within the mapping model $\tilde{G}_{{\bm{b}}}$, where the output size is expanded from 1 to $n_{mlp}$, the detailed configuration is shown in Table. [1](#S3.T1). As a result, the number of qubits required is reduced from $N=\lceil\log_{2}m\rceil$ to

$$ $N=\lceil\log_{2}n_{ch}\rceil=\lceil\log_{2}\left(\lceil\frac{m}{n_{mlp}}\rceil\right)\rceil.$ (8) $$

This adjustment effectively reduces the qubit requirement by approximately $\lceil\log_{2}n_{mlp}\rceil$ qubits compared to the original quantum parameter generation. The original method can be viewed as a special case where $n_{mlp}=1$. Although this reduction in qubit count increases the number of parameters in the mapping model (due to the expanded output size), it offers a significant memory reduction, as the memory needed to store the quantum state decreases by a factor of $1/n_{mlp}$.

For example, with $m=10^{9}$ and $n_{mlp}=1024$, the qubit usage can be reduced to $N=\lceil\log_{2}\left(\lceil\frac{10^{9}}{1024}\rceil\right)\rceil=20$. This $33\%$ of qubit saving reduces the memory required to store the quantum state to just $1/1024$ of what is needed for 30 qubits, and speedup the classical simulation as well.

### 3.3 From model tuning to general parameter-tuning task

In QPA, we consider the tuning target of quantum parameter generation from the full model parameters of a target NN to the parameters of a PEFT method, enabling significantly larger tasks to be handled. Additionally, with the help of batch parameter generation, the scale of the target task is further amplified. Following the previous notation, the parameter ${\bm{a}}$ now represents the parameters of a PEFT method. Taking LoRA as an example, for a pre-trained weight matrix $W_{0}\in\mathbb{R}^{d\times k}$, the low-rank decomposition of the update is $W_{0}+\Delta W=W_{0}+BA$, with $B\in\mathbb{R}^{d\times r}$, $A\in\mathbb{R}^{r\times k}$, and $r\ll\text{min}(d,k)$. In this case, QPA generates these two low-rank matrices using Eq. [6](#S3.E6) and Eq. [7](#S3.E7), where ${\bm{a}}$ represents the elements of $A$ and $B$, and the required qubit count is:

$$ $\displaystyle N=\lceil\log_{2}\left(\lceil\frac{r(d+k)}{n_{mlp}}\rceil\right)\rceil\quad\text{(LoRA case)}.$ (9) $$

The tuning of QPA can then follow the gradient evaluation and update rules in Eq. [3](#S3.E3) and Eq. [4](#S3.E4). A similar situation applies to DoRA, where there are additional $k$ parameters in the magnitude vector to be tuned. In this case, the required qubit count is:

$$ $\displaystyle N=\lceil\log_{2}\left(\lceil\frac{r(d+k)+k}{n_{mlp}}\rceil\right)\rceil\quad\text{(DoRA case)}.$ (10) $$

These examples can be generalized to other parameter-tuning tasks. The schematic of QPA is shown in Fig. [1](#S1.F1), where the PEFT method is applied to only one layer in the LLM, as we will discuss in Sec. [4](#S4), which describes the experiment.
For scenarios where gradient-based tuning is not supported, other non-gradient-based optimizers (e.g. Nelder-Mead and COBYLA) may be required for the parameter update process.

## 4 Empirical Experiments

Our objective is to assess the effectiveness of QPA, as outlined in Sec. [3](#S3), to determine whether the proposed QPA can effectively reduce the number of parameters while maintaining or surpassing the performance of existing PEFT methods. This evaluation is based on one hypothesis that the high-dimensional Hilbert space enables efficient representation for adaptation.
The experiment is conducted using quantum circuit simulation via PyTorch and TorchQuantum (Wang et al., ). At this stage, noise effects on the quantum system are ignored, and the quantum state amplitudes (probabilities) are obtained exactly. A discussion on the potential computing limitations and its theoretical discussion introduced by finite measurement shots can be found in Appendix [B](#A2).
We assess the text generation perplexity of Gemma-2 (2B) and GPT-2 (80M), fine-tuned on the WikiText-2 dataset, using several well-known PEFT methods, including LoRA, DoRA, PT, and Feed-Forward Adapter (FFA).
Gemma-2 was selected as one of the most recent LLMs(^1^11We selected the deployed Gemma-2 version released on August 8th, 2024: [https://huggingface.co/google/gemma-2-2b](https://huggingface.co/google/gemma-2-2b).), offering competitive performance relative to models such as Phi-2-2B (Javaheripi et al., ), LLaMA2-7B (Touvron et al., ), and Mistral-7B (Jiang et al., ). Additionally, we assess GPT-2 XL (1.5B) with QPA, with further discussion provided in Appendix [A.1](#A1.SS1).
For comparison, we apply QPA to generate the parameters for these PEFT methods following the procedure outlined in Sec. [3.3](#S3.SS3). The full hyperparameter configurations are provided in Appendix [D](#A4), while additional results on a different dataset are presented in Appendix [F](#A6).
To isolate the effects of QPA, we simplify the PEFT setup by freezing all layers of Gemma-2 and GPT-2, and fine-tuning only the final linear layer, commonly referred to as the “lmhead.” This layer comprises $38.59$M parameters in GPT-2 and $0.52$B parameters in Gemma-2. The QNN repetition $L$ is fixed at 8 for all cases, except those discussed in the “Effect of Deeper QNN” paragraph.

### 4.1 Performance of QPA

Low-rank adaptation methods with QPA. First, using LoRA and DoRA as baselines, QPA is applied to generate the low-rank matrices for these methods, with an additional magnitude vector generated for DoRA. In this experiment, the rank of the low-rank matrices to be generated is fixed at $4$ (other results could be found at Appendix [E](#A5)), and various chunk sizes $n_{mlp}$ are investigated to adjust the number of trainable parameters. Specifically, $n_{mlp}\in\{256,512,1024,2048,4096,8192\}$ for GPT-2 with LoRA, $n_{mlp}\in\{512,1024,2048,4096,8192\}$ for GPT-2 with DoRA, $n_{mlp}\in\{1024,4096,8192,16258,32768,65536\}$ for Gemma-2 with LoRA, and $n_{mlp}\in\{512,1024,2048,4096,8192\}$.
For comparison, the results for LoRA and DoRA are obtained by varying the rank $r\in\{1,2,4,8,16,32\}$.

Figure: Figure 2: Testing perplexity of GPT-2 and Gemma-2 models compared to the number of trainable parameters for LoRA, DoRA, and QPA on the WikiText-2 dataset.
Refer to caption: /html/2410.09846/assets/x2.png

**Table 2: Training parameters and testing perplexity for GPT-2 and Gemma-2 using PEFT and QPA methods, with emphasis on configurations achieving the most significant parameter reductions. Complete results are provided in Fig. [2](#S4.F2) and Fig. [3](#S4.F3).**
| PEFT Method |  | GPT-2 | Gemma-2 |  |  |
| --- | --- | --- | --- | --- | --- |
|  |  | # Params (%) | PPL | # Params (%) | PPL |
| LoRA |  | 0.52 | 1.595 | 0.19 | 1.418 |
| QPA LoRA (Ours) |  | 0.27 | 1.583 | 0.03 | 1.417 |
| DoRA |  | 4.36 | 5.003 | 0.09 | 5.504 |
| QPA DoRA (Ours) |  | 0.27 | 4.955 | 0.05 | 5.487 |
| PT |  | 1.01 | 2.225 | 0.20 | 1.530 |
| QPA PT (Ours) |  | 0.18 | 2.327 | 0.01 | 1.540 |
| FFA |  | 0.76 | 1.763 | 0.40 | 1.439 |
| QPA FFA (Ours) |  | 0.18 | 1.689 | 0.01 | 1.507 |

In the results, as illustrated in Fig. [2](#S4.F2), QPA consistently outperforms LoRA and DoRA across various parameter configurations. For GPT-2, QPA achieves lower testing perplexity compared to LoRA, particularly in configurations with fewer trainable parameters, demonstrating its efficiency. Even with larger parameter counts, QPA maintains comparable or better performance than LoRA. The best result in terms of parameter reduction and improved perplexity is achieved with $106264$ trainable parameters and a perplexity of $1.583$ for QPA, while LoRA requires $204100$ trainable parameters and achieves a perplexity of $1.595$. This indicates that QPA reduces the trainable parameters to $52.06\%$ while delivering a $0.75\%$ improvement in performance.

Similarly, for Gemma-2, QPA demonstrates significant improvements over LoRA in the lower parameter regime, with the gap narrowing as the parameter count increases, yet QPA consistently maintains better perplexity overall. The best result here is $173,888$ trainable parameters with a perplexity of $1.417$ for QPA, compared to $1,032,192$ trainable parameters with a perplexity of $1.418$ for LoRA. This corresponds to a reduction to $16.84\%$ in trainable parameters with a $0.07\%$ performance improvement.

When comparing QPA to DoRA, the results initially show QPA having higher perplexity with fewer parameters for both GPT-2 and Gemma-2. However, as the number of trainable parameters increases, QPA surpasses DoRA, ultimately achieving comparable or better results. The result with best parameter reduction are concluded in Table. [2](#S4.T2), with the parameter ratio calculated relative to the number of parameters in the target layer.

In the case of Gemma-2, the performance gap between QPA and DoRA also narrows as the number of trainable parameters increases, with QPA remaining competitive across all scales.

While the magnitude of these performance improvements may appear small, the key takeaway is that QPA can significantly reduce the number of trainable parameters in PEFT methods without incurring significant loss in performance.

QPA on Prefix-Tuning and Feed-forward adapter.
In the context of PT, QPA is applied to the tunable prefix vector that is prepended to the input of the target linear layer, where the length of this vector is traditionally fixed to match the input size of the layer. QPA offers a more flexible approach by allowing different parameter configurations, enabling exploration beyond the conventional constraints of input length. The QPA setup uses various chunk sizes $n_{mlp}\in\{256,512,1024,2048,4096,8192\}$ for GPT-2 and $n_{mlp}\in\{1024,2048,4096,8192,16258,32768\}$ for Gemma-2, with an additional $n_{mlp}=65536$ for QPA-FFA case.

Figure: Figure 3: Testing perplexity of GPT-2 and Gemma-2 models compared to the number of trainable parameters for prefix-tuning (PT), feed-forward adapter (FFA), and QPA on the WikiText-2 dataset.
Refer to caption: /html/2410.09846/assets/x3.png

As shown in Fig. [3](#S4.F3) and Table. [2](#S4.T2), for GPT-2, QPA does not outperform PT at lower parameter counts but shows potential for extending the parameter space and achieving better results as the number of parameters increases. In the scenario with the most parameter reduction, QPA achieves $72,552$ trainable parameters and a perplexity of $2.327$, compared to PT with $393,216$ trainable parameters and a perplexity of $2.225$. This indicates that QPA reduces the number of parameters to $18.45\%$, at the cost of a $4.38\%$ performance loss.

For Gemma-2, QPA initially performs on par with PT but surpasses it as the number of trainable parameters increases, leading to superior performance at higher parameter scales. This flexibility in parameter tuning afforded by QPA allows for a broader exploration of the parameter space, potentially resulting in better outcomes than traditional PT.

By inserting small feed-forward layers before the target linear layer, QPA generates the parameters for the FFA. For GPT-2, QPA initially outperforms FFA at lower parameter counts, but as the number of parameters increases, QPA’s performance deteriorates compared to FFA.
In contrast, for Gemma-2, QPA does not outperform the classical FFA approach across the entire parameter range. However, it still demonstrates competitive performance, maintaining comparable testing perplexity even with larger parameter counts.

Although QPA does not consistently outperform PT and FFA in terms of testing perplexity, the significant reduction in trainable parameters ($0.20\%\rightarrow 0.01\%$ for PT and $0.40\%\rightarrow 0.01\%$ for FFA on Gemma-2, as shown in Table [2](#S4.T2)) with only a slight performance loss remains a notable and promising result.

### 4.2 Effects of QPA settings

Figure: Figure 4: (a) Qubit usage versus the number of trainable parameters for QPA applied to LoRA and DoRA on GPT-2 and Gemma-2 models. (b) The relationship between testing perplexity and LoRA rank for QPA applied to GPT-2 and Gemma-2. (c) and (d) Testing perplexity depending on the QNN repetition $L$ for QPA applied to LoRA on GPT-2 and Gemma-2.
Refer to caption: /html/2410.09846/assets/x4.png

Trade-off of qubits counts and parameter size. As described in Sec. [3.2](#S3.SS2), the qubit usage in QPA follows Eq. [8](#S3.E8). Increasing the chunk size $n_{mlp}$ for batched parameter generation increases the total number of trainable parameters in QPA, as $n_{mlp}$ also determines the output size of the MLP mapping model. Consequently, as per Eq. [8](#S3.E8), the required qubit count decreases. Fig. [4](#S4.F4) (a) illustrates the qubit usage corresponding to the QPA results shown in Fig. [2](#S4.F2). The actual qubit usage ranges between 13 and 20 qubits, which are reasonable values for both classical simulations and fault tolerant quantum computers in the foreseeable future (^2^22IBM Quantum announced the achievement of up to 12 logical qubits using 288 physical qubits through error correction methods (Bravyi et al., ): [https://www.ibm.com/quantum/blog/nature-qldpc-error-correction](https://www.ibm.com/quantum/blog/nature-qldpc-error-correction).). Notably, in the results shown in Fig. [4](#S4.F4) (a), without batched parameter generation, the qubit usage for GPT-2 tasks with LoRA and DoRA is $26$, while for Gemma-2 tasks with LoRA and DoRA, the qubit usage increases to 29. While QPA settings with more qubits tend to reduce the number of trainable parameters in PEFT, this often results in higher perplexities. To achieve optimal performance, $n_{mlp}$ should be carefully tuned to balance the number of trainable parameters and the resulting perplexity.

Optimal LoRA rank. As observed in previous LoRA and DoRA studies, increasing the rank of the low-rank matrices does not necessarily lead to better results. In fact, there exists an optimal rank for the best performance. A similar behavior can be seen when applying QPA to low-rank adaptation methods. As shown in Fig. [4](#S4.F4) (b), the optimal LoRA ranks (indicated by stars) highlight that QPA achieves its best performance at a LoRA rank of 2 for GPT-2 and 4 for Gemma-2, with Gemma-2 consistently maintaining lower perplexity than GPT-2 across all ranks. The chunk size is fixed at $n_{mlp}=2048$ for GPT-2 and $n_{mlp}=8192$ for Gemma-2. As the LoRA rank increases, testing perplexity for GPT-2 rises significantly, while for Gemma-2, it remains relatively stable.

Effect of Deeper QNN.
In this study, the QNN (quantum circuit) ansatz is shown in Eq. [1](#S3.E1), constructed by $R_{Y}$ and CNOT gates. The expressiveness of the QNN strongly depends on the number of repetitions $L$ of the corresponding ansatz. A larger number of $L$ results in a deeper QNN, which enhances expressiveness. In Fig. [4](#S4.F4) (c) and (d), the testing perplexity results for different QNN repetitions $L$ in QPA applied to LoRA on GPT-2 and Gemma-2 are shown. The orange lines represent the baseline LoRA testing perplexity without QPA, where LoRA rank $=4$ for GPT-2 and rank $=2$ for Gemma-2. Fig. [4](#S4.F4) (c) shows that for GPT-2, QPA LoRA achieves lower perplexity, which slightly decreases as $L$ increases, with the LoRA rank fixed at $4$ and $n_{mlp}=2048$. Similarly, in Fig. [4](#S4.F4) (d), for Gemma-2 (LoRA rank $=2$ and $n_{mlp}=8192$), QPA LoRA initially performs comparably to standard LoRA but begins to outperform LoRA when $L$ exceeds 64, with more significant reductions in perplexity observed at higher values of $L$.

In general, when using a universal gate set, such as one containing $R_{X}$, $R_{Y}$, $R_{Z}$, phase shift $P(\varphi)$, and CNOT gates, the Solovay–Kitaev theorem (Dawson & Nielsen, ) guarantees that a QNN can approximate any unitary transformation to arbitrary precision. Thus, with sufficient depth (i.e., larger $L$), a QNN constructed from such a gate set can approximate any quantum state, including those that optimally map to the PEFT parameters. As the depth of the QNN increases, it gains the expressivity required to model more complex transformations (Du et al., ; Childs, ), allowing it to approximate optimal parameter configurations for fine-tuning. This is evident in the reduction of testing perplexity as $L$ grows, illustrating the advantages of deeper QNNs in capturing richer quantum representations. Notably, in practice, good performance can still be attained with a more restricted gate set and practical layer depths. In our study, we employ $R_{Y}$ and CNOT gates with $L=8$ in the main experiments, and extend up to $L=O(N^{2})$ in this section, demonstrating the scalability of the approach.

## 5 Conclusion

In conclusion, this work introduces Quantum Parameter Adaptation (QPA) as a new approach for enhancing PEFT methods by leveraging QNNs to generate trainable parameters for LLMs. QPA addresses the critical challenge of reducing the number of parameters required for fine-tuning, which is particularly important for large-scale models. By incorporating QPA into established PEFT methods, such as LoRA, DoRA, PT, and FFA, we demonstrate that QPA significantly reduces the trainable parameters (i.e., from $0.40\%$ to $0.01\%$) while maintaining comparable or even improving model performance in text generation tasks. Moreover, the decoupling of near-term available quantum resources (i.e., $13$ to $20$ qubits) from the inference phase ensures that the quantum benefits are leveraged during training without adding deployment complexities. These results underscore the scalability and efficiency of QPA in fine-tuning LLMs, making it a promising solution for quantum-classical hybrid computational frameworks.

Looking ahead, future research will focus on a more comprehensive theoretical investigation of QPA, particularly in terms of convergence behavior, trainability, and learnability. Expanding QPA’s application across a broader range of neural network architectures and tasks beyond text generation will be critical for validating its generalizability and robustness. Furthermore, incorporating noise models to simulate realistic quantum system imperfections and exploring the potential of running QPA on actual quantum hardware will pave the way for practical quantum-classical hybrid solutions. These efforts will contribute to establishing QPA as a foundational approach for fine-tuning LLMs in the emerging landscape of quantum-centric supercomputing.

## Appendix A Appendix: A Discussion on Model Compression

Model compression is a critical and evolving area of research aimed at enabling efficient training and inference in machine learning models. Common techniques include quantization (Dettmers et al., ; ; Frantar et al., ), pruning (Ma et al., ; Sun et al., ), and the PEFT methods discussed in the main text. Quantization reduces memory and computational costs by lowering the precision of model weights, while pruning removes less significant weights, thereby reducing the overall parameter count. The QPA framework introduced in this work, by “generating” the parameters of PEFT methods, can be seamlessly integrated with other compression techniques, such as quantization and pruning. This combination enhances its practical applicability and opens promising avenues for further exploration of the QPA approach in the context of model compression.

### A.1 Efficient LLM Selection for QPA

We provide a detailed rationale for selecting Gemma-2 and GPT-2 as the focus models. Prioritizing parameter-efficient models, we chose those that are both open-source and commercially accessible to ensure broad applicability and seamless integration into various systems. Given that QPA eliminates the need for quantum hardware during the inference stage, making QML more practical, we also focused on selecting classical models that are widely available and have manageable hardware requirements.

While the main text presents results for GPT-2 (80M), Table. [3](#A1.T3) also includes QPA LoRA results for GPT-2 XL (1.5B), which exhibit similar trends, demonstrating QPA’s ability to reduce training parameters while maintaining performance comparable to other PEFT methods.

The Gemma-2 series was chosen for its strong performance as a 2B parameter model with low hardware demands, which increases its potential impact in real-world applications. In contrast, the LLaMA series was not selected due to its restricted user accessibility. Gemma-2 is engineered for efficient inference at full precision across diverse platforms, including Google Cloud TPUs, NVIDIA A100 80GB Tensor Core GPUs, and NVIDIA H100 Tensor Core GPUs. Additionally, it is optimized for performance across a wide range of hardware configurations, from gaming laptops to cloud-based infrastructure.

Although the proposed QPA is applicable to any LLM and PEFT method (as outlined in Sec. [3](#S3)), Gemma-2 (2B) was selected for this study as it offers the best balance between performance and resource efficiency given current computational constraints, whereas models with over 70B parameters remain beyond the scope of this work. Future research will explore the application of QPA to these larger models.

**Table 3: Training parameters and testing perplexity for GPT-2 XL (1.5B) using LoRA and QPA methods, with emphasis on configurations achieving the most significant parameter reductions.**
| PEFT Method |  | GPT-2 XL |  |  |
| --- | --- | --- | --- | --- |
|  |  | # Params (%) | PPL |  |
| LoRA |  | 0.12 | 1.474 |  |
| QPA LoRA setting 1 (Ours) |  | 0.07 | 1.485 |  |
| QPA LoRA setting 2 (Ours) |  | 0.09 | 1.475 |  |
| QPA LoRA setting 3 (Ours) |  | 0.13 | 1.469 |  |

### A.2 Qubit number Limitations of Non Quantum Parameter Generation Methods

While it is possible to generate parameters for tuning tasks using conventional QML methods, that replacing the PEFT methods with VQC modules, a key difference lies in the output size. For an output of size $n$, conventional QML utilizes the expectation value of the Pauli-z operator, $\langle\psi({\bm{\theta}})|\sigma_{z}^{(i)}|\psi({\bm{\theta}})\rangle$, for each qubit, resulting in a qubit requirement of $n$, as described in Eq. 14 of (Mari et al., ). In contrast, quantum parameter generation leverages the measurement probability $|\langle\phi_{i}|\psi({\bm{\theta}})\rangle|^{2}$ for each basis, reducing the qubit requirement to $\lceil\log_{2}n\rceil$.

In practical terms, the qubit usage in the PEFT experiments presented in this study ranges between 13 and 20 qubits. If conventional QML were employed, the required qubit count would scale exponentially, from $2^{13}$ to $2^{20}$, an impractically large number that would make conventional QML infeasible for PEFT applications.

## Appendix B Potential Limitations of Finite Measurement Shots

In this study, the amplitudes and measurement probabilities of the basis states are computed exactly. However, the implementation on actual quantum hardware is left for future work. On real quantum computers, measurement probabilities are derived from a finite number of measurement shots. The higher the number of shots, the more accurate the probability estimates. To understand the scaling behavior of the required measurement shots, we can draw parallels to tasks that approximate one quantum state with another. Based on theoretical findings from quantum fidelity tomography, the goal is to achieve a fidelity $F(|\gamma\rangle,|\varphi\rangle)\geq 1-\epsilon$ between the output state $|\varphi\rangle$ and an unknown state $|\gamma\rangle$, with a given infidelity $\epsilon$. Prior work suggests that the sufficient number of measurement shots is

$$ $n_{s}=O\left(\frac{2^{N}}{\epsilon}\log\left(\frac{2^{N}}{\epsilon}\right)\right)$ (11) $$

(Haah et al., ), where $N$ represents the number of qubits.

As the number of measurement shots scales exponentially with the system size $N$, adopting a linear scaling strategy with respect to $2^{N}$ becomes a practical approach to enhance both training and testing performance in larger systems. Consequently, the ability to swiftly gather measurement data is critical for the effective application of the QPA method. Generative models present a viable alternative by simulating measurement outcomes efficiently (Ahmed et al., ), which can alleviate the burden of needing exponentially large numbers of shots. By utilizing generative models, it becomes possible to reduce computational complexity and enhance the practicality of quantum state tomography in large-scale systems, thereby increasing the feasibility of applying QPA in real-world scenarios.

It is worth noting that the estimation of required measurement shots stems from fidelity tomography tasks. In contrast, QPA is centered on parameter tuning, where the impact of limited measurement shots may resemble the effects of quantization in classical ML—using reduced precision (fewer measurement shots) to accelerate the training process. This opens up avenues for future exploration of QPA on real quantum hardware.

## Appendix C Discussion on Error Performance

Prior works have examined the theoretical error performance of VQC in regression tasks (Qi et al., ) and classification tasks (Du et al., ). For regression, the representational capacity is bounded by (Eq. 11 in (Qi et al., )):

$$ $\mathcal{L}_{\mathcal{D}}(f^{*}_{\mathcal{D}})=\left\lVert h^{*}_{\mathcal{D}}(\mathbf{x})-\mathcal{T}_{lr}\left(\mathbb{E}\left[g(\mathbf{x};\bm{\theta}_{vqc},\bm{\theta}_{ttn})\right]\right)\right\rVert_{1}\leq\frac{\Theta(1)}{\sqrt{U}}+\mathcal{O}(\frac{1}{\sqrt{M}}),$ (12) $$

where $U$ represents the number of qubits and $M$ the number of measurement shots. While our quantum parameter generation framework diverges from traditional quantum machine learning methodologies, a promising direction for analyzing the approximation error of the QPA in estimating PEFT parameters may be guided by insights from the universal approximation theorem. Specifically, the representation power of pre-trained large language models (LLMs) could leverage population risk estimation, as outlined in previous theoretical work on parameter-efficient learning with Wasserstein measurements in Hilbert space (Yang et al., ). In particular, the dimensionality of classical hidden neurons may align with that of the Hilbert space, utilizing fewer qubits and quantum gate parameters. This alignment suggests that a quantum approach may achieve comparable approximation accuracy with fewer parameters than classical counterparts as one perspective for future studies.

## Appendix D Training Hyperparameter Configuration

In this section, we provide the training hyperparameter configuration used for the results presented in the main text. Notably, $\alpha$ represents the scaling factor in the low-rank adaptation methods. All experiments were conducted on NVIDIA V100S and NVIDIA H100 GPUs.

**Table 4: Hyperparameter configurations of LoRA and QPA LoRA for fine-tuning GPT-2 and Gemma-2 with WikiText-2 dataset.**
| Hyperparameters | LoRA | QPA LoRA |  |  |
| --- | --- | --- | --- | --- |
| GPT-2 | Gemma-2 | GPT-2 | Gemma-2 |  |
| $\alpha$ | 2r | 2r |  |  |
| Dropout | 0.05 | 0.0 | 0.05 | 0.0 |
| Optimizer | AdamW | AdamW |  |  |
| LR | 1e-5 | 1e-5 |  |  |
| LR Scheduler | Linear | Linear |  |  |
| Batch size | 1 | 1 |  |  |
| Warmup Steps | 0 | 0 |  |  |
| Epochs | 3 | 5 | 3 | 5 |

**Table 5: Hyperparameter configurations of DoRA and QPA DoRA for fine-tuning GPT-2 and Gemma-2 with WikiText-2 dataset.**
| Hyperparameters | DoRA | QPA DoRA |  |
| --- | --- | --- | --- |
| GPT-2 | Gemma-2 | GPT-2 | Gemma-2 |
| $\alpha$ | 2r | 2r |  |
| Dropout | 0.0 | 0.0 |  |
| Optimizer | AdamW | AdamW |  |
| LR | 2e-6 | 2e-6 |  |
| LR Scheduler | Linear | Linear |  |
| Batch size | 1 | 1 |  |
| Warmup Steps | 100 | 100 |  |
| Epochs | 5 | 5 |  |

**Table 6: Hyperparameter configurations of PT and QPA PT for fine-tuning GPT-2 and Gemma-2 with WikiText-2 dataset.**
| Hyperparameters | PT | QPA PT |  |
| --- | --- | --- | --- |
| GPT-2 | Gemma-2 | GPT-2 | Gemma-2 |
| Dropout | 0.0 | 0.0 |  |
| Optimizer | AdamW | AdamW |  |
| LR | 5e-6 | 1e-6 |  |
| LR Scheduler | Linear | Linear |  |
| Batch size | 1 | 1 |  |
| Warmup Steps | 0 | 0 |  |
| Epochs | 5 | 5 |  |

**Table 7: Hyperparameter configurations of FFA and QPA FFA for fine-tuning GPT-2 and Gemma-2 with WikiText-2 dataset.**
| Hyperparameters | FFA | QPA FFA |  |  |
| --- | --- | --- | --- | --- |
| GPT-2 | Gemma-2 | GPT-2 | Gemma-2 |  |
| Dropout | 0.0 | 0.0 |  |  |
| Optimizer | AdamW | AdamW |  |  |
| LR | 5e-6 | 5e-6 |  |  |
| LR Scheduler | Linear | Linear |  |  |
| Batch size | 1 | 1 |  |  |
| Warmup Steps | 0 | 0 |  |  |
| Epochs | 5 | 10 | 5 | 10 |

## Appendix E QPA Applied at Different LoRA Ranks

In Sec. [4.1](#S4.SS1), to maintain clarity in the main text, we presented results only for QPA applied at LoRA and DoRA ranks of 4. In this appendix, we provide the full set of results in Fig. [5](#A5.F5), showing QPA applied across various LoRA and DoRA ranks. Additionally, it can be observed that different values of $n_{mlp}$ may yield distinct optimal LoRA and DoRA ranks. Notably, the optimal LoRA rank identified in Sec. [4.2](#S4.SS2) was based on a fixed $n_{mlp}$ for simplicity.

Figure: Figure 5: Full perplexity comparison of GPT-2 and Gemma-2 models versus the number of trainable parameters for LoRA, DoRA and QPA, evaluated on the WikiText-2 dataset. This figure shows the complete results with QPA applied across different LoRA and DoRA ranks, complementing the partial results presented in the main text.
Refer to caption: /html/2410.09846/assets/x5.png

## Appendix F On Penn Treebank dataset

While the main text presents results obtained on the WikiText-2 dataset, we extend our analysis to showcase the broader applicability of QPA across additional datasets. In this section, we report results of QPA applied to LoRA, Prefix Tuning (PT), and Feed-Forward Adapter (FFA) on the Penn Treebank dataset. The findings indicate that QPA achieves its strongest advantage in the lower-parameter regime for LoRA, consistently outperforms PT across all parameter ranges, and demonstrates comparable performance to FFA with a reduced number of trainable parameters. These observations align with the results reported in the main text for the WikiText-2 dataset.

Figure: Figure 6: Testing perplexity of GPT-2 and Gemma-2 models versus the number of trainable parameters on the Penn Treebank dataset. The comparison includes LoRA and QPA applied at different LoRA ranks (r = 1, 2, and 4). The third subplot compares QPA with PT, and the fourth compares QPA with FFA, further illustrating QPA’s competitive performance in various parameter configurations.
Refer to caption: /html/2410.09846/assets/x6.png

## Appendix G Implementation Detail

This section provides a minimal example of how QPA is applied to LoRA in a Gemma-2 model, implemented using PyTorch and TorchQuantum. The code snippets demonstrate the key components of the QPA process, including the modification of the target layer and the generation of low-rank matrices using a quantum parameter generation approach.

In the above example, the “lm_head” layer is modified using the QPA_LoRALayer function, defined as follows:

As shown in lines 28 and 30, the low-rank matrices $A$ and $B$ are generated by the QPA_Net object, which implements the method described in Sec. [3](#S3). The QPA_Net class is defined as follows:

This implementation demonstrates how QPA is applied to generate low-rank matrices using quantum parameter genreation, which can be seamlessly integrated into LLMs to improve parameter efficiency.

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. Could the authors provide experimental results comparing the performance of QPA with baseline methods while maintaining the same computational complexity?
2. Could the authors elaborate on the impact of the barren plateau phenomenon in the training of quantum neural networks, particularly concerning the optimization of large language models (LLMs) with 1 billion parameters, which necessitates a substantial number of qubits?
soundness: 3
strengths: 1. The authors present the Quantum Parameter Adaptation algorithm, which innovatively applies quantum devices to train classical machine learning models. This exploration opens up a new paradigm in quantum machine learning, shifting the focus from using quantum circuits solely as learning models to leveraging them for generating parameters in classical models. This shift in roles between quantum and classical computers enhances the efficiency of classical-quantum hybrid algorithms.
2. The application of QPA to practical large-scale models such as GPT-2, resulting in improved performance and parameter reduction compared to traditional classical fine-tuning methods, is commendable.
summary: The authors propose a novel quantum circuit-based algorithm, termed Quantum Parameter Adaptation (QPA), aimed at generating parameters for classical neural networks. This approach seeks to enable parameter-efficient learning of pre-trained deep learning models by reducing the number of training parameters while preserving model performance. Specifically, they utilize a quantum neural network with tunable parameters to produce a quantum state, whose amplitude under a specific basis is processed by a classical multi-layer perceptron to generate parameters with desired properties (e.g., low rank) for fine-tuning methods. Empirical experiments are conducted on two pre-trained models, Gemma-2 and GPT-2, demonstrating that QPA achieves significant parameter reduction for fine-tuning methods like Low-Rank Adaptation (LoRA), while maintaining or improving performance in text generation tasks.
weaknesses: 1. The authors assert that one motivation for proposing QPA is to mitigate the high computational costs associated with existing fine-tuning approaches by reducing the number of parameters. However, extracting amplitude information from quantum states and training the quantum neural network can be highly computationally intensive due to the inherent challenges of quantum systems and the barren plateau phenomenon. This could introduce significant computational costs during each training epoch, making a fair comparison between QPA and classical fine-tuning methods difficult.
2. Additionally, as I understand it from convergence theory [1], the number of parameters required for a quantum neural network to represent an arbitrary quantum state scales with the dimension of the quantum system, specifically $4^n$. Thus, to represent a parameterized quantum state for an arbitrary vector of dimension $r(d+k)$—the dimension of the low-rank weight matrix $\Delta W=BA$ —the quantum circuit would also need to have parameters on the order of $r(d+k)$. In this regard, QPA may not achieve any significant parameter reduction compared to completely classical fine-tuning methods.

[1]. Larocca, Martin, et al. "Theory of overparametrization in quantum neural networks." Nature Computational Science 3.6 (2023): 542-551.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: - Does this technique have any utility if you always need to perform a full strong simulation of the quantum circuits? Either because it is not robust to noise or because you can’t get away with finite measurements.
   - Have you tried running your method on actual quantum hardware? If not, why not?
   - How expensive would it be to implement your method in a fault-tolerant manner?
   - It is unclear to me how much this work pushes the sota forward. For instance, how does it differ from the other cited works? “Using the gradient computation and parameter update rule, the parameter generation process of QPA
has been applied to image classification with convolutional neural networks (CNNs) (Liu et al.,
2024b;a; Liu & Chen, 2024), flood prediction (time series) with long short-term memory (LSTM)
models (Lin et al., 2024), and policy gradient reinforcement learning in CartPole and MiniGrid
environments (Liu et al., 2024c).”
   - How expensive is it to update the gradient on real hardware?
   - What compute was used to produce the paper? What was the total wall clock time? How does that compare to the classical methods used?
soundness: 3
strengths: Strengths:
   - Interesting idea (albeit one that has been done before to some extent) pushed further than in past work. Smartly gets around some of the known issues with QML, like the issue with expensive inference.
   - Brings related work closer to the forefront of classical ML by applying their method to Gemma-2 and GPT-2. 
   - Good use of MLPs and batching to reduce parameter counts.
summary: This paper introduces quantum parameter adaptation, a quantum parameter generation algorithm that uses quantum neural networks and classical multi-layer perceptrons to generate parameters to help fine-tune classical machine learning models.
weaknesses: REVISION: The author's rebuttal and revised manuscript have addressed enough of these weaknesses to merit inclusion at ICLR.

Weaknesses:
   - Misleading claims about fault-tolerant quantum computation: The paper makes several misleading claims about fault-tolerant quantum computing (FTQC) which have the potential to make a uniformed reader think that universal FTQC is right around the corner. It’s not. For instance, the information in the second footnote is wrong. IBM has not demonstrated 12 logical qubits with 288 physical qubits. They’ve discovered a quantum error correcting code with that property. However, actually implementing that code in practice is going to be very hard! Moreover, running this paper’s parametrized quantum circuit (PQC) in a FT manner is going to be very expensive! The PQC requires small-angle Y rotations, which are extremely costly!
   - No serious discussion of the impact of noise: The paper completely sidesteps the issue of noise. This is especially concerning when the approach is outperformed by classical competitors in the noiseless setting on certain problems. 
   - No theoretical performance guarantees. Not necessarily bad, but it’s not great when you don’t have amazing experimental results (the paper has no experimental results, just simulations).
   - I am not sold at all on their approach to using synthetic data to get around the issue of having finitely many shots…generative models are expensive to train too! 


Some minor nitpicks:
   - It is an open question if quantum computing excels in optimization. Change the claim in your introductory paragraph, or at least soften it.
   - “This hybrid approach is especially promising in quantum machine
learning (QML), where it can enhance the training and fine-tuning of large models.” Also not evident that QML can help with the training or fine-tuning of large models. Isn’t that the whole point of this paper? Temper this claim.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: 1.	Would the algorithm perform equally well if the quantum component were replaced with a classical system? Since the role of the parameterized quantum circuit here is to produce an intermediate hidden state, could a classical neural network serve as an alternative? Given the challenge of barren plateaus in quantum machine learning, a classical neural network might avoid these issues and potentially improve performance.
2.	Is there potential to reduce the need for full quantum state tomography in QPA? Could approaches like quantum shadow tomography, which require only partial measurement data, be used to extract sufficient information from the quantum state while reducing computational costs?
3.	The current parameterized quantum circuit design relies on CNOT and RY gates, which restrict the quantum state to real values and consequently limits the Hilbert space it explores. Have the authors experimented with more complex circuits to explore the full Hilbert space, and if so, does this yield performance improvements?
soundness: 3
strengths: QPA achieves significant reductions in the number of trainable parameters required for fine-tuning LLMs while maintaining performance, making it highly relevant for parameter-efficient learning. This reduction makes the method resource-efficient and feasible for real-world application. In addition, the paper presents an elegant integration of quantum and classical computing. The authors demonstrate QPA’s effectiveness on state-of-the-art LLMs, contributing meaningfully to the rapidly advancing field of LLM research.
summary: The paper proposed quantum parameter adaptation (QPA), a method that combines quantum systems with classical models to enhance parameter-efficient fine-tuning in machine learning, especially for LLMs like GPT-2 and Gemma-2. Unlike traditional quantum machine learning methods that require quantum hardware for both training and inference, this approach uses quantum resources exclusively during the training phase to generate parameters for classical models, eliminating the need for quantum hardware at inference. This design enhances scalability and resource efficiency on classical hardware, addressing practical deployment concerns.
weaknesses: From my understanding, the quantum component of QPA does not appear to harness the inherent advantages of quantum machine learning. Since the quantum state must be fully characterized before classical post-processing, this process typically requires full quantum state tomography, involving an exponential number of measurements with respect to the number of qubits. This requirement is likely more computationally intensive than classical simulation, eliminating any quantum advantage. In this regard, QPA might better be described as a quantum-inspired algorithm rather than a quantum machine learning algorithm, as it does not appear to yield a speed-up or other quantum advantages over classical simulations. The authors themselves acknowledge in Appendix B that modeling the quantum state using a classical generative model could offer a more practical alternative.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: 1. Lack of comparison with other rotation gates: The author mainly chose the combination of RY gate and CNOT gate, but there is a lack of detailed comparative analysis in the article. Why is the RY gate more suitable for this specific task, while the RX and RZ gates are not good enough? The author needs relevant experiments to verify the advantages of the RY gate over other gates.
Rationality of the selection of rotation gates: RX, RY and RZ gates are all single-bit rotation gates, why does RY have a better effect in this scenario? Is there a clear mathematical or experimental basis to show that the efficiency and effect of the RY gate in quantum parameter generation is better than RX or RZ? If not, does this mean that the author's choice of the RY gate is more based on experience rather than theoretical support?
2. Performance in noisy environments: Although the RY gate is considered to perform better in capturing the rotation characteristics of quantum states, quantum hardware has noise and errors in actual operation. Have you compared the robustness of different rotation gates in actual quantum hardware? Especially when considering quantum noise, is the RY gate still the best choice? At the same time, the performance of QPA in actual quantum hardware remains to be considered.
3. Lack of discussion on time complexity: Although QPA performs well in reducing the number of parameters, the paper lacks a detailed discussion on the running time of the quantum circuit when generating parameters. Does the generation and measurement process of the quantum circuit bring additional time overhead? Does this additional time complexity offset the improvement in training efficiency brought by parameter reduction?
Compared with the classical PEFT method, is there a significant time overhead in the process of QPA using quantum circuits to generate parameters? Do these differences have a significant impact on the practical application of models at different scales? In practical applications, the time efficiency of the model is one of the important considerations. Even if the number of parameters is reduced, if the time complexity of the quantum circuit is high when generating parameters, this may affect the efficiency and scalability of the overall system. The author should provide more quantitative analysis to evaluate the overall cost-effectiveness of the QPA method in terms of time and computing resources.

4. In more complex scenarios, how does QPA compare to traditional QML methods? : The paper shows the efficiency of QPA in reducing parameters of large models such as GPT-2 and Gemma-2. However, how does QPA perform when extended to larger models such as GPT-3 or larger? Does quantum parameter generation encounter scalability issues in such scenarios?

5. Best choice of parameter configuration: How to determine the best block size (nmlp) and number of QNN repetitions (L) for different PEFT methods? Is there a general method to determine these hyperparameters for other models?
soundness: 3
strengths: 1. The paper proposes the Quantum Parameter Adaptation (QPA) method, which is a new method that combines  quantum neural networks (QNN) with classical multi-layer perceptrons to generate The parameters of the fine-tuning method demonstrate the efficiency in parameter reduction. 
2. QPA separates quantum computing from the inference stage, allowing the model to perform inference without  relying on quantum hardware, greatly reducing deployment complexity and thus having practical application value for classical hardware inference. 
3. Experimental results show that QPA can significantly reduce the number of parameters while maintaining or slightly improving model performance. In contrast, methods such as LoRA, DoRA,  and Prefix Tuning (PT) are highly efficient in parameters. The performance in learning tasks is not as good as QPA, highlighting its high efficiency. 
4. The authors extend the QPA method to large models such as GPT-2 and Gemma-2, significantly expanding the scope of previous quantum parameter generation studies. 
5. QPA allows flexible exploration of different parameter configurations, improving its 
adaptability in different models and parameter efficient fine-tuning (PEFT) methods.
summary: The paper introduces Quantum Parameter Adaptation (QPA), a novel approach for parameter-efficient learning that combines quantum neural networks (QNNs) with classical machine learning to generate parameters for fine-tuning large models. The QPA method utilizes quantum circuits to generate classical model weights, allowing for significant parameter 
reduction without compromising performance, as demonstrated with Gemma-2 and GPT-2 case studies. The method enables practical use of quantum machine learning by decoupling quantum hardware requirements from the inference phase, thus making inference feasible on classical systems. The results show that QPA can effectively reduce the number of parameters required for methods like Low-Rank Adaptation (LoRA), while maintaining or improving model performance, indicating its potential as a scalable and efficient quantum-classical hybrid solution for large-scale learning tasks.
weaknesses: 1. The study assumes that the measurement probability is exact and does not consider noise, which may not accurately reflect the situation where a finite number of measurements are required in the actual quantum hardware environment. Although the impact of this limitation on performance is discussed, the problem is not completely solved. It is possible to consider introducing some simulated noise models to verify the robustness of the proposed QPA.
2. The paper mentions that QPA uses RY and CNOT gates to build quantum circuit ansatz, but lacks a detailed explanation of why this ansatz structure is chosen. It is recommended that the author add a detailed argument for the choice of ansatz and compare the effects of different quantum gate combinations to ensure the rationality of the current choice.
3. The method uses the gradient obtained from quantum measurements, which may introduce additional complexity in the training process, especially when implemented on actual quantum hardware, due to the presence of parameter offsets and measurement noise.
4. The paper mentions that the theoretical analysis of the convergence behavior, trainability and learnability characteristics of QPA will be addressed in future research, which shows that there is a gap in the current understanding of the long-term effectiveness of QPA.
5. More shortcomings can be found in the Questions section.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: Reviewer would be grateful if the authors could discuss the following: 

Given that the primary idea of this paper aims to leverage the exponential dimensionality of quantum states to represent the parameter space of LLMs. There exists a parallel in tensor network [1,2] theory that serves a similar purpose: the most successful application of tensor networks in physics has been to approximate exponentially large vectors arising in quantum mechanics.
 
The question is that might it also be feasible to explore the application of tensor network's theories and methodologies as an alternative to the currently resource-constrained and large-scale unavailable quantum computing? 

Additionally, could the authors utilize certain theoretical insights (e.g. from tensor network research) to investigate why the proposed method achieves superior performance compared to traditional fine-tuning techniques such as LoRA and DoRA, rather than relying solely on empirical evidence? 

This discussion could significantly enhance the theoretical underpinnings of the paper and provide a more robust framework for understanding the advantages of the proposed approach.

[1] Stoudenmire E, Schwab D J. Supervised learning with tensor networks[J]. Advances in neural information processing systems, 2016, 29.

[2] Liu Z, Yu L W, Duan L M, et al. Presence and absence of barren plateaus in tensor-network based machine learning[J]. Physical Review Letters, 2022, 129(27): 270501.
soundness: 2
strengths: The authors introduce an new framework that aims to bridge the gap between classical machine learning and quantum computing.
summary: The paper presents a novel approach for quantum parameter generation aimed at providing a quantum-classical solution for fine-tuning LLM's parameters.  Authors conduct simulation on benchmark datasets to assess performance compared to traditional fine-tuning techniques like LoRA and DoRA. Results indicate improvements in reducing the number of parameters while maintaining or surpassing the performance of existing PEFT methods.
weaknesses: 1. Efficiency Concerns: The proposed quantum parameter generation method, while designed to reduce the need for quantum hardware during inference, still relies heavily on quantum neural networks (QNN) during training. This raises critical questions regarding the efficiency of the overall process. Specifically, the optimization of quantum neural network parameters is prone to challenges such as barren plateaus, which can significantly hinder the training process. The authors do not sufficiently address how these issues may impact the efficiency of fine-tuning parameters of classical large models, particularly given the complexities associated with high-dimensional optimization landscapes typical of QNN.

2. The inputs of the mapping model necessitates a precise value of the corresponding measurement probabilities of the basis of quantum states. Typically, these probabilities can only be approximated through repeated measurements and averaging, which introduces another layer of complexity. The need for multiple measurements raises concerns regarding the time overhead involved. The paper does not adequately discuss the potential delays that may arise from extensive measurement requirements, especially in the context of noisy intermediate-scale quantum (NISQ) devices where measurement fidelity can be compromised by inherent noise. Furthermore, the implications of limited measurement shots on the accuracy of estimated probabilities and the subsequent effect on LLM's fine-tuning are not sufficiently explored.

Although the authors mention the limitations of finite measurement shots in Appendix B, the reviewer believes that providing sufficient experimental results, including finite measurements and noise-affected simulations, is essential for demonstrating the feasibility of the proposed method in the paper.

Meta-review: This paper presents Quantum Parameter Adaptation (QPA), a novel framework for quantum parameter generation aimed at enhancing parameter-efficient fine-tuning of large language models (LLMs). By leveraging quantum neural networks (QNNs) during training, the proposed approach generates parameters for classical models, enabling inference exclusively on classical hardware and addressing key challenges related to quantum resource demands. Simulation results highlight QPA's ability to reduce the number of parameters while maintaining or slightly improving performance on text generation tasks, as demonstrated with GPT-2 and Gemma-2 case studies.

Reviewers acknowledged the innovative integration of quantum-classical hybrid techniques and the empirical validation of baseline LLMs. However, they also expressed concerns regarding computational efficiency, scalability, and the lack of theoretical guarantees for QPA's performance. Despite these limitations, the paper makes certain contributions to the development of hybrid quantum-classical learning frameworks.

Decision: Accept (Poster)