Model parameter adjustment methods, devices, equipment, storage media, and program products

By dynamically adjusting the quantum circuit depth and tensor decomposition, and combining quantum and classical hybrid analytical gradient techniques, the problem of high fine-tuning costs for downstream tasks of large models is solved, enabling lightweight deployment and efficient fine-tuning in financial payment scenarios.

CN123117104APending Publication Date: 2026-11-17CHINA UNIONPAY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611248892.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In financial payment scenarios, the cost of fine-tuning downstream tasks of large models is high and it is difficult to achieve lightweight deployment. Existing technical solutions have problems such as high computing and storage costs, long training cycles, and insufficient accuracy.

Method used

By obtaining the embedding feature matrix of a large model, the dynamic circuit depth of the quantum circuit is determined based on information entropy and feature dispersion. The attention projection features are processed using quantum unitary evolution operators and gating units, and the quantum circuit depth and tensor decomposition are dynamically adjusted. Combined with quantum and classical hybrid analytical gradient techniques, fine-tuning is achieved by updating only a small number of parameters.

Benefits of technology

Without updating all network weights of the large model, the fine-tuning accuracy was improved, the computational overhead and training time were reduced, and the lightweight deployment and hardware deployment robustness of the large model were achieved, thus improving the task adaptability in financial payment scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123117104A_ABST
    Figure CN123117104A_ABST
Patent Text Reader

Abstract

This application discloses a model parameter adjustment method, apparatus, device, storage medium, and program product, relating to the field of artificial intelligence technology. The method includes obtaining the embedding feature matrix of the input text of a large model, and determining the dynamic circuit depth of the quantum circuit based on the comprehensive complexity data corresponding to the matrix; processing the attention projection features of the input text of the model according to the quantum unitary evolution operator of the dynamic circuit depth and the gating unit of the large model, obtaining an attention weight matrix characterizing the semantic association strength between each word in the input text and a value feature matrix characterizing the semantic representation strength of each word in each feature dimension; determining the fine-tuning output features based on the first two types of matrices to determine the prediction loss of the large model on downstream tasks and adjusting the training parameters of the quantum unitary evolution operator and the gating unit accordingly. This solves the problem of high adjustment costs and difficulty in lightweight deployment when fine-tuning large models for downstream tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence technology, and in particular relates to a method, apparatus, device, storage medium and program product for adjusting model parameters. Background Technology

[0002] Based on the overall strategy of integrating artificial intelligence (AI) with payment services, a two-tiered risk control system has been constructed, with small and large models working together. The small model is responsible for real-time and rapid screening of high-frequency transactions, while the large model performs deep semantic reasoning for complex gray-box service scenarios. Both types of models can cover various AI application scenarios such as service operation, intelligent marketing, and risk management.

[0003] In downstream adaptation to vertical scenarios of financial payments, whether it's intent understanding and semantic parsing for smart payments or complex long-range logical reasoning for financial risk control, fine-tuning of model parameters in large models is necessary to unleash their domain-specific capabilities. However, fine-tuning all parameters requires updating all network weights of the large model, resulting in high computational and storage costs, making lightweight deployment difficult. Summary of the Invention

[0004] This application provides a model parameter adjustment method, apparatus, device, storage medium, and program product, which can solve the problem of high adjustment costs and difficulty in lightweight deployment when fine-tuning large models for downstream tasks in financial payment scenarios.

[0005] In a first aspect, embodiments of this application provide a model parameter adjustment method, including: Obtain the embedding feature matrix of the input text of a large model; Based on the comprehensive complexity data corresponding to the embedded feature matrix, the dynamic circuit depth of the quantum circuit is determined. The comprehensive complexity data is used to characterize the semantic complexity of the model input text. The comprehensive complexity data is determined by the information entropy and feature dispersion of the embedded feature matrix. The dynamic circuit depth is the number of quantum gate layers required for the quantum circuit to process the model input text on the quantum chip. Based on the quantum unitary evolution operator of dynamic circuit depth and the gating unit of the large model, the attention projection features of the model input text are processed to obtain the attention weight matrix and the value feature matrix. The attention weight matrix is ​​used to characterize the semantic association strength between each word in the model input text, and the value feature matrix is ​​used to characterize the semantic representation strength of each word in each feature dimension. Based on the attention weight matrix and the value feature matrix, the fine-tuned output features are determined. The fine-tuned output features are used to determine the prediction loss of the large model on downstream tasks. The prediction loss is used to adjust the first training parameters of the quantum unitary evolution operator and the second training parameters of the gating unit.

[0006] Secondly, embodiments of this application provide a model parameter adjustment device, including: The acquisition module is used to obtain the embedding feature matrix of the input text of a large model; The determination module is used to determine the dynamic circuit depth of the quantum circuit based on the comprehensive complexity data corresponding to the embedded feature matrix. The comprehensive complexity data is used to characterize the semantic complexity of the input text of the model. The comprehensive complexity data is determined by the information entropy and feature dispersion of the embedded feature matrix. The dynamic circuit depth is the number of quantum gate layers required for the quantum circuit to process the input text of the model on the quantum chip. The processing module is used to process the attention projection features of the model input text based on the quantum unitary evolution operator of dynamic line depth and the gating unit of the large model to obtain the attention weight matrix and the value feature matrix. The attention weight matrix is ​​used to characterize the semantic association strength between each word in the model input text, and the value feature matrix is ​​used to characterize the semantic representation strength of each word in each feature dimension. The determination module is also used to determine the fine-tuned output features based on the attention weight matrix and the value feature matrix. The fine-tuned output features are used to determine the prediction loss of the large model on downstream tasks. The prediction loss is used to adjust the first training parameters of the quantum unitary evolution operator and the second training parameters of the gating unit.

[0007] Thirdly, embodiments of this application provide a computer device, which includes: a processor and a memory storing computer program instructions; When the processor executes computer program instructions, it implements the model parameter adjustment method as shown in the first aspect.

[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the model parameter adjustment method as described in the first aspect.

[0009] Fifthly, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the model parameter adjustment method as described in the first aspect.

[0010] The model parameter adjustment method, apparatus, device, storage medium, and program product of this application embodiment can obtain the embedding feature matrix of the model input text of a large model; based on the comprehensive complexity data corresponding to the embedding feature matrix, the dynamic circuit depth of the quantum circuit is determined. The comprehensive complexity data is used to characterize the semantic complexity of the model input text. The comprehensive complexity data is determined by the information entropy and feature dispersion of the embedding feature matrix. The dynamic circuit depth is the number of quantum gate layers required for the quantum circuit to process the model input text on the quantum chip; according to the quantum unitary evolution operator of the dynamic circuit depth and the gating unit of the large model, the attention projection features of the model input text are processed to obtain the attention weight matrix and the value feature matrix. The attention weight matrix is ​​used to characterize the semantic association strength between each word in the model input text, and the value feature matrix is ​​used to characterize the semantic representation strength of each word in each feature dimension; according to the attention weight matrix and the value feature matrix, the fine-tuned output features are determined. The fine-tuned output features are used to determine the prediction loss of the large model in the downstream task. The prediction loss is used to adjust the first training parameters of the quantum unitary evolution operator and the second training parameters of the gating unit. In this way, by using the high-dimensional nonlinear mapping of quantum unitary evolution operators and the dynamic tensor decomposition of gated units, downstream task adaptation can be completed without updating all network weights of the large model, requiring only a small number of new parameters. While maintaining a parameter magnitude comparable to low-rank adaptive and other efficient parameter fine-tuning methods, it breaks through the feature representation space limitations of low-rank linear approximation, significantly improving the fine-tuning accuracy of complex financial transaction semantic understanding and multi-step reasoning tasks. At the same time, by determining the comprehensive complexity data through the information entropy and feature dispersion of the embedded feature matrix, and dynamically adjusting the dynamic line depth accordingly, the quantum entanglement depth matches the semantic complexity of the input text. This ensures high-dimensional expressive power under complex tasks while avoiding computational redundancy and noise accumulation in simple tasks, improving fine-tuning accuracy while reducing the impact of quantum chip computational overhead. Furthermore, based on the hybrid analytical gradient technique of quantum and classical methods, a closed-form analytical solution for gradient calculation has been achieved in the field of quantum-enhanced fine-tuning. This reduces the linear complexity required by traditional parameter offset algorithms to a constant, significantly optimizing training iteration speed and overall computational power consumption. Thus, while significantly reducing the computational overhead and training time for fine-tuning downstream tasks in large-scale financial payment scenarios, it effectively improves fine-tuning accuracy and hardware deployment robustness, enabling lightweight deployment of large-scale models. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1This is a system architecture diagram of a model parameter adjustment system provided in one embodiment of this application; Figure 2 This is a flowchart illustrating a model parameter adjustment method provided in one embodiment of this application; Figure 3 This is a schematic diagram of the structure of a model parameter adjustment device provided in one embodiment of this application; Figure 4 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application. Detailed Implementation

[0013] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0014] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0015] The acquisition, storage, use, and processing of data (including but not limited to features and information mentioned in this document) in the technical solution of this application all comply with the relevant provisions of national laws and regulations.

[0016] As the number of parameters in large language models grows from hundreds of millions to trillions, they demonstrate powerful generalization capabilities in general semantic understanding and logical reasoning tasks. The demand for downstream adaptation of these large models in financial payment scenarios is also becoming increasingly urgent. Whether it's intent understanding and semantic parsing for smart payments or complex long-range logical reasoning for financial risk control, downstream task fine-tuning of large models is necessary to unleash their domain-specific capabilities.

[0017] In related technologies, parameter fine-tuning of large models can be accomplished in two ways.

[0018] One approach involves updating all network weights of a large model through full parameter fine-tuning, for example, by updating the gradients of all parameters in a pre-trained model using the standard Transformer training process. However, full parameter fine-tuning suffers from drawbacks such as extremely high computational cost, long training cycles, high memory usage, susceptibility to overfitting on small datasets, and high deployment costs, making it unsuitable for the lightweight deployment needs of industry.

[0019] Another approach involves using efficient parameter fine-tuning techniques to adapt large models. For example, methods such as Low-Rank Adaptation (LoRA), Weight-Decomposed Low-Rank Adaptation (DoRA), Prefix-Tuning, and Adapter-Tuning are used to fix the backbone weights of the pre-trained model, training only a small number of newly added adaptive parameters. While this approach significantly reduces training computation and storage overhead, its reliance on low-rank linear approximation limits the feature representation space. It fails to capture high-dimensional nonlinear dependencies in complex logical reasoning and high-order semantic association tasks, exhibiting limitations in expressive power, sensitivity to rank parameters, slow convergence speed, and accuracy degradation in complex tasks.

[0020] However, both approaches have drawbacks: full parameter fine-tuning is too costly to achieve lightweight deployment, while parameter-efficient fine-tuning methods such as LoRA lack accuracy in complex financial semantic understanding and long-range inference tasks, making it difficult to meet the actual service needs of large model fine-tuning in financial payment scenarios.

[0021] Meanwhile, relying on the physical properties of quantum superposition, quantum entanglement, and quantum interference, quantum computing can achieve parallel encoding and nonlinear fitting of massive features in Hilbert high-dimensional space, providing a new technical path to overcome the expressive limitations of classical linear computing. Although existing quantum enhancement fine-tuning techniques have initially verified their feasibility, current schemes generally employ quantum circuits with fixed depth and fixed entanglement structures, globally unified tensor decomposition bond dimensions, and gradient approximation algorithms that rely on parameter offset rules. These schemes suffer from problems such as rigid quantum circuit structures, fixed and inflexible tensor decomposition dimensions, shallow integration of quantum and classical approaches, extremely low efficiency of quantum gradient computation, poor robustness to quantum hardware noise, and insufficient task adaptability and versatility, which seriously restrict the large-scale application of quantum large-scale model fine-tuning techniques.

[0022] To address the aforementioned pain points, this application provides a model parameter adjustment method, apparatus, device, storage medium, and program product. It utilizes an adaptive deep quantum circuit to dynamically adjust the dynamic circuit depth based on the input semantic complexity, enabling shallow processing of simple tasks and deep evolution of complex tasks, effectively avoiding resource waste and insufficient representation in fixed-depth structures. A dynamic key dimension matrix multiplication operator independently generates dynamic key dimensions for each decomposition unit of the tensor network, achieving adaptive matching between tensor decomposition accuracy and parameter scale. A quantum tensor attention kernel deeply embeds quantum superposition and entanglement characteristics into the Transformer attention mechanism, using quantum state inner products to calculate the similarity of all query-key pairs in parallel, reducing computational complexity from the attention computation paradigm level. A hybrid quantum and classical analytical gradient technique derives the closed-form solution of the analytical gradient of the quantum unitary transform, compressing the linear complexity required by traditional parameter offset algorithms to a constant, significantly improving training efficiency. A noise-adaptive quantum measurement module quantizes hardware noise in real time and dynamically adjusts the measurement strategy, ensuring high robustness of the system on real quantum hardware. Ultimately, it achieves lightweight, efficient, and high-precision parameter fine-tuning of large models in financial payment scenarios.

[0023] The following will be combined with the appendix Figures 1 to 4 This application describes in detail the model parameter adjustment methods, apparatus, devices, storage media, and program products of the embodiments thereof. It should be noted that these embodiments are not intended to limit the scope of disclosure of this application.

[0024] The terminology used in the embodiments of this invention will be explained below.

[0025] Attention projection features refer to the query matrix Q, key matrix K, and value matrix V obtained by linearly transforming the embedded feature matrix through the pre-training weights of a large model.

[0026] The attention weight matrix is ​​denoted as A∈ ×N Its element A ij This represents the weight proportion of information extracted from the j-th word when generating the output representation of the i-th word, with the sum of elements in each row being 1. This matrix is ​​obtained by scaling and Softmax normalization of the similarity between the query quantum state and the bond quantum state.

[0027] Labeled data refers to the supervision signals corresponding to the input text of the model, used to calculate the prediction loss during training. In supervised fine-tuning scenarios, labeled data can be classification labels, reference text for the generation task, or standard answers, etc.

[0028] A pooling vector is a vector obtained by performing global average pooling on the value matrix across the word sequence dimension of the input text. It represents the overall distribution characteristics of the value matrix across the word sequence. This vector serves as the input to the gating unit, generating the gating coefficients for each decomposition unit.

[0029] A token is a basic semantic unit obtained after the input text is segmented. It is the basic unit corresponding to the row index of the embedded feature matrix.

[0030] Large-scale models refer to deep learning models with billions to hundreds of billions of parameters, pre-trained on large-scale general corpora. Based on the Transformer architecture, they capture long-range dependencies and semantic features in text through self-attention mechanisms, exhibiting powerful generalization capabilities in tasks such as general semantic understanding, logical reasoning, and content generation. In this application embodiment, large-scale models refer to large language models (LLMs) that require fine-tuning for downstream tasks in vertical scenarios such as financial payments, such as the Qwen series, GPT series, and Llama series. The backbone network of a large-scale model includes pre-trained weights... , , The network layers that subsequently output the results are frozen throughout the fine-tuning process and do not participate in parameter updates. In this embodiment, only the first training parameters of the newly added quantum unitary evolution operator and the second training parameters of the gating unit in the large model are updated to drive the large model to adapt to downstream tasks.

[0031] Dynamic circuit depth refers to the number of quantum gate layers contained in a quantum circuit, denoted as . The depth of the circuit, ∈{2,4,6,8}, is dynamically determined by comparing the comprehensive complexity data with preset multi-level thresholds. This dynamic circuit depth controls the expressive power of quantum feature evolution; that is, the greater the depth, the richer the quantum entanglement and the stronger the nonlinear mapping capability.

[0032] The key dimension parameter used by each decomposition unit in a matrix multiplication operator tensor network during tensor decomposition is denoted as . The gating coefficients corresponding to the decomposition unit are obtained by linear interpolation between the preset minimum key dimension and the preset maximum key dimension, and are used to control the tensor decomposition accuracy and the number of parameters of the decomposition unit.

[0033] The embedding feature matrix refers to a two-dimensional matrix formed by mapping each word segment of the input text to a high-dimensional vector and stacking them in sequence. It is denoted as […]. ∈ × ,in The number of lexical units, This is the embedding vector dimension. This matrix carries the semantic information of the input text and serves as the data foundation for each subsequent step.

[0034] A decomposition unit refers to a local tensor in a matrix multiplication operator tensor network; it is the basic building block of a tensor chain and is denoted as w. (k) Where k is the index of the k-th decomposition unit in the tensor network. Each decomposition unit has an independent dynamic key dimension D. k This is used to control the tensor decomposition accuracy of the unit.

[0035] Nonlinear mapping refers to the process of compressing the output of a linear transformation from the real number domain to the interval [0,1] using the sigmoid activation function. In the embodiments of this application, nonlinear mapping is used to generate gating coefficients, giving the gating coefficients a clear probabilistic interpretation.

[0036] Probability density statistics refers to the process of analyzing the frequency distribution of all values ​​of a specific feature dimension in an embedded feature matrix. By statistically analyzing the distribution of feature values ​​within each value interval, the probability density function of that feature dimension is calculated to determine the information entropy.

[0037] The set of gating coefficients output by the gating unit, corresponding to the gating coefficients of each decomposition unit in the matrix multiplication operator tensor network, is denoted as... ∈[0,1], used to determine the dynamic key dimension of the corresponding decomposition unit.

[0038] The Hamiltonian is a physical quantity in quantum mechanics that describes the total energy of a quantum system, denoted as . Hl In the actual case of this application, the first... l The Hamiltonian of a layer quantum circuit is determined by the structure of the quantum gate in that layer and is used for the calculation of analytical gradients.

[0039] Extreme value normalization refers to a normalization method that linearly maps the component values ​​of an eigenvector to a specified interval, and is used to map classical features to the effective angle range of a quantum rotation gate.

[0040] The output network layer refers to the network structure following the self-attention layer in the larger model, including feedforward networks, layer normalization, residual connections, etc. The fine-tuned output features are processed through these network layers to obtain the model's final predicted output.

[0041] Matrix-product operator tensor decomposition (MPO) refers to a tensor network decomposition method that decomposes a high-dimensional value matrix into a series of local tensors, i.e., tensor chain products. It is used to compress the number of parameters in a value matrix. In the embodiments of this application, the key dimension of each local tensor is independently controlled by the dynamic key dimension corresponding to that decomposition unit.

[0042] Trainable parameters refer to parameters that need to be updated through backpropagation, including the set of rotation angles of each quantum gate in the quantum unitary evolution operator. That is, the first training parameters and the weights of the linear transformation layer in the gating unit. Bias This refers to the second training parameter. Pre-trained weights of the backbone network of a large model are not included in this category.

[0043] A quantum circuit refers to a sequence of quantum gates arranged in chronological order, deployed and running on a quantum chip. In the embodiments of this application, the quantum circuit consists of... The system consists of layers, each including a single-bit rotating unitary gate and a two-bit controlled entangled unitary gate, with the depth dynamically determined by the ADQC module based on the input semantic complexity.

[0044] A quantum chip is a physical hardware carrier that performs quantum state evolution and measurement, on which quantum circuits are deployed and run.

[0045] Quantum unitary evolution operators refer to those derived from dynamic circuit depth. The unitary transform operator is formed by the sequential accumulation and multiplication of layered quantum circuits. Each layer consists of a single-bit rotating unitary gate and a two-bit controlled entangled unitary gate, and the rotation angle is a trainable parameter.

[0046] A quantum gate is a basic operational unit in a quantum circuit that performs unitary transformations on quantum states. The quantum gates used in the embodiments of this application include single-qubit rotating unitary gates and two-qubit controlled entangled unitary gates, with the rotation angle being a trainable parameter.

[0047] The query quantum state refers to the quantum state obtained after the query matrix is ​​normalized by extremum, rotated by gate encoding and transformed by the quantum unitary evolution operator. It is used to perform interferometry with the bond quantum state to calculate the similarity.

[0048] A bond quantum state is a quantum state obtained by normalizing the bond matrix through extremum, rotating gate encoding, and unitary transformation by the quantum unitary evolution operator. It is used to perform interferometry with the query quantum state to calculate the similarity.

[0049] The query fundamental quantum state refers to the initial quantum state obtained by rotation gate encoding after the query matrix has been normalized to extreme values, before undergoing unitary transformation by the quantum unitary evolution operator.

[0050] The bond-based quantum state refers to the initial quantum state obtained by rotation gate encoding after the bond matrix has been normalized to its extreme values, before undergoing unitary transformation by the quantum unitary evolution operator.

[0051] The gating coefficient set refers to the multidimensional vector output by the gating unit after performing a linear transformation and applying the sigmoid activation function to the pooling vector. Its dimension is equal to the total number of decomposition units in the matrix multiplication operator tensor network. The gating coefficients at different index positions in the set correspond to each decomposition unit and are used to determine the dynamic key dimension of each decomposition unit.

[0052] The gradient of the gating coefficients with respect to the linear output refers to the linear transformation of the gating coefficients with respect to the output of the gating unit. The partial derivative of is the derivative of the Sigmoid activation function.

[0053] Average pooling refers to the operation of aggregating the value matrix along the word sequence dimension, averaging the values ​​of each word in each feature dimension to obtain a fixed-length pooling vector, which is used to capture the overall distribution characteristics of the value matrix.

[0054] The predicted output refers to the final predicted value obtained after the fine-tuned output features are processed by the large model output network layer, and compared with the labeled data to calculate the prediction loss.

[0055] The quantum-classical hybrid analytical gradient refers to a gradient calculation method derived from the unitary nature of quantum unitary transformations. It obtains the gradient information of all quantum gate rotation angles at once through analytical closed-form solutions, without the need to perform additional quantum circuit derivations for each parameter separately.

[0056] The Sigmoid function is a non-linear activation function that compresses the input to the interval [0,1]. In this embodiment, the Sigmoid function is used to map the linear output of the gating unit to gating coefficients, giving the gating coefficients a clear probabilistic interpretation.

[0057] Softmax normalization refers to the normalization operation that transforms each row of the similarity matrix into a probability distribution, such that the sum of the elements in each row is 1. In the embodiments of this application, Softmax normalization is used to convert query and key similarity into an attention weight matrix.

[0058] Feature dimension refers to the dimension of each component of the embedding vector. It is the basic unit corresponding to the column index of the embedding feature matrix and corresponds to the projection of abstract semantic features in the embedding space of the pre-trained model, such as syntactic roles and semantic roles, onto different dimensions.

[0059] Feature dispersion is a metric that quantifies the degree of fluctuation of the values ​​of each feature dimension in the embedded feature matrix along the word sequence. It measures the magnitude of the numerical fluctuation of feature values ​​along the sequence direction. The higher the dispersion, the more drastic the fluctuation of feature values ​​and the more complex the semantic structure.

[0060] The feature analyzer is a functional module configured in the collaborative control layer, used to extract multi-dimensional features from the embedded feature matrix of the input text, including information entropy calculation, feature discreteness calculation, global average pooling, extreme value normalization, quantum state encoding, etc., providing data support for dynamic allocation of dynamic line depth, quantum state evolution and tensor decomposition.

[0061] Fine-tuning output characteristics This refers to the result of multiplying the attention weight matrix and the value feature matrix. This result represents the current layer feature output after processing by the quantum-enhanced self-attention mechanism. This feature serves as the intermediate layer output of the backbone network of the large model, rather than the model's final response text.

[0062] The value feature matrix is ​​a compressed feature representation obtained by tensor decomposition and reconstruction of the value matrix using the matrix product operator of dynamic key dimension. It is used to characterize the semantic representation strength of each word in each feature dimension.

[0063] The gradient of the value feature matrix with respect to the dynamic bond dimension refers to the partial derivative of the value feature matrix with respect to the dynamic bond dimension of the decomposition unit. It represents the rate of change of the value feature matrix as the dynamic bond dimension changes, and is calculated through backpropagation of MPO tensor decomposition.

[0064] Downstream tasks refer to the tasks that the large model needs to complete in specific service scenarios, such as intelligent payment intent understanding, financial risk control reasoning, intelligent dialogue, mathematical reasoning, code generation, text understanding, and psychological counseling.

[0065] Information entropy refers to the entropy value calculated by performing probability density statistics on the values ​​of each feature dimension in the embedded feature matrix. It is used to measure the degree of disorder in the distribution of feature values. The higher the entropy value, the more dispersed the feature value distribution and the richer the semantic information.

[0066] Similarity data refers to the raw similarity values ​​between query quantum states and bond quantum states obtained through interferometry, which are used to generate an attention weight matrix after scaling and Softmax normalization.

[0067] Linear interpolation refers to a calculation method that determines the specific key dimension between a preset minimum key dimension and a preset maximum key dimension based on a gating coefficient. When the gating coefficient approaches 0, the key dimension approaches the minimum value, and when the gating coefficient approaches 1, the key dimension approaches the maximum value.

[0068] Linear transformation refers to the operation of linearly mapping the pooling vector through the weight matrix and bias in the gating unit, which is a processing step before the application of the Sigmoid activation function.

[0069] The unitary transformation refers to the linear transformation of a quantum state in Hilbert space that preserves the inner product through a unitary operator. In this application, the transformation is performed on the fundamental quantum state by a quantum unitary evolution operator to map features to a higher-dimensional space to enhance expressive power.

[0070] The preset depth level refers to the preset dynamic line depth value corresponding to each level of the multi-level threshold range. In this application, the four levels are as follows: 0=2、 1=2、 2=4、 3=8, corresponding to four types of input tasks: minimalist, simple, medium, and complex.

[0071] Prediction loss refers to a measure of the difference between the model's predicted output and the labeled data, such as cross-entropy loss, which is used to drive backpropagation to update the trainable parameters.

[0072] The first training parameter refers to the set of rotation angles of each quantum gate in the quantum unitary evolution operator. This is a newly added trainable parameter in this embodiment and is updated through backpropagation. The rotation angle parameters are those of the single-qubit rotating unitary gate and the two-qubit controlled entangled unitary gate in the quantum unitary evolution operator.

[0073] The second training parameter refers to the weights and biases of the linear transformation layer in the gating unit. These are newly added trainable parameters in this method and are updated through backpropagation.

[0074] The first gradient refers to the partial derivative of the predicted loss value with respect to the rotation angle of each quantum gate in the quantum unitary evolution operator, which is used to update the first training parameters.

[0075] The second gradient refers to the partial derivative of the predicted loss value with respect to the weights of the linear transformation layer in the gating unit, which is used to update the second training parameters.

[0076] The third gradient refers to the partial derivative of the value feature matrix with respect to the dynamic key dimension of each decomposition unit in the gated unit. It is an intermediate quantity in chain rule differentiation and is used to calculate the second gradient.

[0077] The fourth gradient refers to the partial derivative of the gating coefficients of the gated unit with respect to the linear output, which is the derivative of the Sigmoid activation function and is used to calculate the second gradient.

[0078] The comprehensive complexity data refers to the comprehensive score obtained by weighted fusion after normalizing the information entropy and feature dispersion respectively. The value range is [0,1]. It is used to comprehensively characterize the semantic complexity of the input text. The higher the score, the more complex the input semantics, and the deeper the quantum circuits are required for processing; the lower the score, the simpler the input semantics, and shallow quantum circuits can meet the requirements.

[0079] Quantum state evolution processing refers to the process of encoding classical features into quantum states and then performing a unitary transformation on them using a quantum unitary evolution operator. In this application, the query matrix and the bond matrix are subjected to quantum state evolution processing respectively to obtain the query quantum state and the bond quantum state.

[0080] Quantum state encoding refers to the process of mapping normalized classical features to quantum states through quantum gates. In this application, the query of normalized features and bond-normalized features is performed through... RY The rotating gate is encoded as a query for the fundamental quantum state and the bond fundamental quantum state.

[0081] Based on this, the following is combined with Figure 1 The model parameter adjustment system provided in the embodiments of this application will be described in detail.

[0082] Figure 1 This is a system architecture diagram of a model parameter adjustment system provided in an embodiment of this application.

[0083] like Figure 1 As shown, the model parameter adjustment system in this application embodiment may include a quantum circuit layer, a cooperative control layer, and a classical computing layer.

[0084] The quantum circuitry layer, deployed on the quantum chip, performs quantum state encoding, unitary evolution, and interferometric measurement operations. The quantum circuitry layer is configured with programmable quantum circuits, including single-qubit rotational unitary gates applied to each qubit. ) and the two-qubit controlled entanglement unitary gate applied to adjacent qubits ( The depth of the quantum circuit is dynamically determined by the Adaptive Depth Quantum Circuit (ADQC) module based on the semantic complexity of the input, in order to adapt to fine-tuning tasks of different complexities.

[0085] The quantum circuit layer also features a Quantum Tensor Attention Kernel (QTAK) module, which deeply embeds quantum superposition and entanglement properties into the Transformer attention mechanism. The QTAK module first maps classical query and key vectors to quantum pure states through rotational encoding. Then, leveraging the physical properties of the quantum state inner product, it computes the similarity data of all query and key pairs in parallel, reducing the quadratic computational complexity of traditional attention to logarithmic levels.

[0086] The quantum circuit layer is also equipped with a Noise-Adaptive Quantum Measurement (NAQM) module, which is used to adapt the quantum hardware noise in real time during the interferometric measurement reading stage of the QTAK module. Specifically, the NAQM module monitors three types of noise parameters of the quantum hardware in real time: single-qubit gate error rate... Double-bit gate error rate and measurement error rate The overall noise level is calculated using the following formula (1): Based on this comprehensive noise level, the NAQM module can adaptively switch the measurement basis combination, which can be calculated using the following formula (2) to improve statistical robustness: At the same time, the number of measurement samplings can be dynamically adjusted using the following formula (3): in, The higher the noise level, the more samples are taken to ensure the signal-to-noise ratio of the output features. Furthermore, this NAQM module also employs multi-scale noise scaling sampling and zero-noise extrapolation techniques, specifically implemented through the following formula (4): This approach cancels out inherent hardware noise interference, effectively suppressing the performance degradation of the quantum output features from the QTAK module on real noisy intermediate-scale quantum (NISQ) devices. The collaborative control layer, deployed on the classical server, calculates information entropy and feature dispersion based on the embedded feature matrix of the input text, weights and fuses them to obtain comprehensive complexity data, and determines the dynamic circuit depth of the quantum circuit based on the comparison results of the comprehensive complexity data and preset multi-level thresholds. The collaborative control layer also includes a feature analyzer for multi-dimensional feature extraction from the embedded feature matrix of the input text, including extreme value normalization of the query and key matrices and encoding them into query and key fundamental quantum states, and global average pooling of the value matrix to extract pooling vectors, providing data support for the quantum circuit layer. After the QTAK module completes interferometry and denoising by the NAQM module, the collaborative control layer performs scale scaling and Softmax normalization operations on the obtained parallel similarity matrix to generate the final attention weight matrix.

[0087] The classic computation layer is deployed on the classic server and is used to perform classic neural network computations. The classic computation layer is configured with the backbone network and gating units of the large model, where the pre-trained weights of the backbone network are frozen throughout the process. The classic computation layer also includes a Dynamic Key Dimension Matrix Product Operator (DKD-MPO) module, which outputs a set of gating coefficients after processing the pooling vector through linear transformation and the sigmoid activation function. The gating coefficients at different index positions in the set correspond to the decomposition units in the matrix product operator tensor network, used to determine the dynamic key dimension of each decomposition unit. Based on the dynamic key dimension of each decomposition unit, the value matrix is ​​decomposed using the matrix product operator tensor to obtain the value feature matrix. The classic computation layer multiplies the attention weight matrix output by the QTAK module with the value feature matrix output by the DKD-MPO module to obtain the fine-tuned output features. The classical computation layer is also equipped with a Hybrid Classical-Quantum Analytic Gradient (HCAG) module. During the backpropagation phase, it is used to determine the first gradient of the rotation angle of each quantum gate in the quantum unitary evolution operator through the analytical gradient closed solution based on the predicted loss value, quantum state data, and Hamiltonian of the quantum unitary evolution operator. It also determines the second gradient of the linear transformation layer weights in the gating unit based on the gradient of the predicted loss value, attention weight matrix, value feature matrix with respect to the dynamic bond dimension of each decomposition unit and the gradient of the gating coefficient with respect to the linear output. The first training parameters of the quantum unitary evolution operator and the second training parameters of the gating unit are updated according to the first and second gradients, respectively.

[0088] In some embodiments of this application, the process of determining the dynamic line depth by the ADQC module includes: the collaborative control layer calculates the information entropy and feature dispersion based on the embedding feature matrix of the input text, and performs weighted fusion of the information entropy and feature dispersion to obtain comprehensive complexity data; the comprehensive complexity data is compared with a preset multi-level threshold interval, and a target preset depth level is selected from the preset depth levels corresponding to each of the multi-level threshold intervals according to the comparison results, and the value of the target preset depth level is determined as the dynamic line depth of the quantum circuit.

[0089] In some embodiments of this application, the quantum unitary evolution operator deployed in the quantum circuit layer is indicated by the dynamic circuit depth determined by the ADQC module. Layered quantum circuits are constructed by sequentially accumulating products, where each layer includes a single-qubit rotational unitary gate applied to each qubit and a two-qubit controlled entanglement unitary gate applied to adjacent qubits. The depth of the quantum circuit... Based on the comparison results between the comprehensive complexity data and the preset multi-level thresholds, it is determined that the higher the comprehensive complexity data, the greater the dynamic circuit depth, so as to provide a stronger high-dimensional nonlinear expression capability; the lower the comprehensive complexity data, the smaller the dynamic circuit depth, so as to reduce computational overhead and noise impact.

[0090] In some embodiments of this application, the feature analyzer configured in the collaborative control layer supports multi-dimensional feature extraction, including but not limited to: information entropy calculation, feature discreteness calculation, global average pooling, extremum normalization, and quantum state encoding. The feature data extracted by the feature analyzer are synchronously fed back to the collaborative control layer, providing data support for the dynamic allocation of dynamic line depth, quantum state evolution, and tensor decomposition.

[0091] In some embodiments of this application, the QTAK module's processing of the query matrix and key matrix includes: performing extreme value normalization on the query matrix and key matrix respectively, mapping classical features to the effective angle range of the quantum rotation gate; encoding the normalized query features and key features into query fundamental quantum states and key fundamental quantum states respectively through rotation gates; performing unitary transformations on the query fundamental quantum states and key fundamental quantum states respectively through quantum unitary evolution operators to obtain query quantum states and key quantum states; constructing a joint entangled state of index and features, introducing a controlled exchange unitary operator for interferometric measurement, and determining the similarity data between the query and the key based on the measurement probability of the auxiliary qubit.

[0092] In some embodiments of this application, when the QTAK module performs interferometric measurements, the NAQM module synchronously acquires the current overall noise level of the quantum chip, and dynamically switches the measurement basis combination and adjusts the number of measurement samplings accordingly. The measurement results are then subjected to zero-noise extrapolation, and the denoised similarity data is output to the collaborative control layer.

[0093] In some embodiments of this application, the DKD-MPO module's processing of the value matrix includes: performing global average pooling on the value matrix along the word sequence dimension to obtain a pooling vector; inputting the pooling vector into a gating unit, and after linear transformation and Sigmoid activation function processing, obtaining a set of gating coefficients corresponding to each decomposition unit in the matrix multiplication operator tensor network; performing linear interpolation between a preset minimum key dimension and a preset maximum key dimension based on the gating coefficients corresponding to each decomposition unit to obtain the dynamic key dimension of each decomposition unit; and performing matrix multiplication operator tensor decomposition on the value matrix based on the dynamic key dimension of each decomposition unit to obtain the value feature matrix.

[0094] In some embodiments of this application, the gating units deployed in the classical computation layer include a linear transformation layer and an activation function layer. The linear transformation layer performs a linear transformation on the input pooling vector, outputting a multidimensional vector; the activation function layer uses the sigmoid function to perform a nonlinear mapping on each dimension of the multidimensional vector, outputting a set of gating coefficients with values ​​ranging from 0 to 1. The dynamic key dimension of each decomposition unit is obtained by linearly interpolating the corresponding gating coefficients between a preset minimum key dimension and a preset maximum key dimension.

[0095] In some embodiments of this application, the system determines the dynamic line depth through the ADQC module, and processes the query matrix, key matrix, and value matrix in the attention projection features through the QTAK module and DKD-MPO module respectively to obtain the attention weight matrix and value feature matrix. Then, the attention weight matrix and the value feature matrix are multiplied to obtain the fine-tuned output features. The fine-tuned output features are used to determine the prediction loss of the large model in the downstream task. The prediction loss is used by the HCAG module to update the first training parameters of the quantum unitary evolution operator and the second training parameters of the gating unit, thereby realizing the lightweight, high-efficiency, and high-precision parameter fine-tuning of the large model in the financial payment scenario.

[0096] Therefore, this application uses an adaptive deep quantum circuit to perform dual-dimensional complexity quantization of the input text using information entropy and feature dispersion, and weighted fusion to obtain comprehensive complexity data. Based on the comparison results of this data with preset multi-level thresholds, the dynamic circuit depth is dynamically determined so that the entanglement depth of the quantum circuit matches the semantic complexity of the input. That is, shallow circuits are matched for simple tasks to reduce computational redundancy and noise accumulation, while deep circuits are matched for complex tasks to ensure high-dimensional nonlinear expression capabilities. This achieves an optimal balance between resource utilization efficiency and model expressive capability, solving the problems of resource waste in simple tasks and insufficient expression in complex tasks caused by fixed quantum structures.

[0097] This application deeply embeds the quantum superposition and entanglement properties into the Transformer attention mechanism through a quantum tensor attention kernel. It utilizes the physical properties of quantum state inner product interference to calculate the similarity of all query-key pairs in parallel at once, reducing the quadratic computational complexity of traditional attention to logarithmic level, thus fundamentally reconstructing the attention computation paradigm. At the same time, through the gating adaptive mechanism of the dynamic key dimension matrix product operator, dynamic key dimensions are generated independently for each decomposition unit. That is, the key dimension automatically decreases when the gating coefficient approaches 0 to reduce parameter redundancy, and automatically increases when it approaches 1 to enhance feature extraction capability. A dynamic balance is achieved between parameter compression rate and expression accuracy. The number of trainable parameters is significantly lower than that of existing parameter efficient fine-tuning methods, effectively reducing the risk of overfitting.

[0098] This application derives a closed-form analytical gradient solution from the unitary nature of quantum unitary transforms using a hybrid quantum and classical analytical gradient technique, thereby reducing the complexity required by traditional parameter offset algorithms. O ( P The complexity is compressed to a constant. O (1) Complexity: Gradient information of all quantum gate rotation angles can be obtained in a single forward propagation, and the training iteration speed and overall computing power consumption are significantly optimized. At the same time, the first training parameters of the quantum unitary evolution operator and the second training parameters of the gate unit are updated by back propagation, ensuring that the quantum path and the classical tensor path converge towards their respective optimal directions during training, and work together to complete the downstream task adaptation.

[0099] This application uses a noise-adaptive quantum measurement module to monitor the single-qubit gate error rate, double-qubit gate error rate, and measurement error rate of quantum hardware in real time, calculates the overall noise level, and dynamically switches the measurement basis combination and adjusts the number of measurement samplings accordingly. By combining multi-scale noise scaling sampling and zero-noise extrapolation techniques, the performance degradation of quantum output characteristics on real NISQ devices is effectively suppressed, and the hardware adaptability robustness is significantly improved.

[0100] In summary, through the collaborative work of the above five modules, this application significantly reduces the computational overhead and training time for fine-tuning downstream tasks in large-scale financial payment scenarios, while effectively improving fine-tuning accuracy and hardware deployment robustness, achieving lightweight, efficient, and high-precision parameter fine-tuning.

[0101] It should be noted that the model parameter adjustment system provided in this application embodiment can be widely applied to various scenarios involving fine-tuning of large models, including but not limited to: intelligent payment intent understanding scenarios, financial risk control reasoning scenarios, intelligent dialogue scenarios, mathematical reasoning scenarios, text understanding scenarios, code generation scenarios, and psychological counseling scenarios.

[0102] In the intelligent payment intent understanding scenario, the system fine-tunes the parameters of a large model to accurately interpret the true payment intent behind vague user statements. In the financial risk control inference scenario, the system fine-tunes the parameters of a large model to accurately analyze multi-step, time-spanning transaction chains and identify potential fraud or money laundering risks. Furthermore, the system provides commercial banks and payment institutions with a quantum-enhanced fine-tuning application programming interface (API) or private tools to support model adaptation needs for intelligent customer service, anti-fraud, and other service scenarios. It also provides integration interfaces for NAQM and ADQC modules for quantum computing hardware and cloud platform service providers to improve the robustness of model deployment on real quantum hardware. Finally, it provides components for QTAK and DKD-MPO modules for large model technology providers, supporting high-precision, low-cost model customization services. In this way, the system enables lightweight, efficient, and high-precision parameter fine-tuning of large models, effectively improving model inference accuracy and deployment efficiency across various service scenarios.

[0103] Figure 2 This is a flowchart of a model parameter adjustment method provided in an embodiment of this application.

[0104] like Figure 2 As shown, the model parameter adjustment method can be applied to the above-mentioned model parameter adjustment system 10, and may specifically include steps 210 to 240.

[0105] Step 210: Obtain the embedding feature matrix of the model input text of the large model; Step 220: Based on the comprehensive complexity data corresponding to the embedding feature matrix, determine the dynamic circuit depth of the quantum circuit. The comprehensive complexity data is used to characterize the semantic complexity of the model input text. The comprehensive complexity data is determined by the information entropy and feature dispersion of the embedding feature matrix. The dynamic circuit depth is the number of quantum gate layers required for the quantum circuit to process the model input text on the quantum chip; Step 230: Based on the quantum unitary evolution operator of the dynamic circuit depth and the gating unit of the large model, process the attention projection features of the model input text to obtain the attention weight matrix and the value feature matrix. The attention weight matrix is ​​used to characterize the semantic association strength between each word in the model input text, and the value feature matrix is ​​used to characterize the semantic representation strength of each word in each feature dimension; Step 240: Based on the attention weight matrix and the value feature matrix, determine the fine-tuned output features. The fine-tuned output features are used to determine the prediction loss of the large model on the downstream task. The prediction loss is used to adjust the first training parameters of the quantum unitary evolution operator and the second training parameters of the gating unit.

[0106] Therefore, by using the high-dimensional nonlinear mapping of quantum unitary evolution operators and the dynamic tensor decomposition of gated units, downstream task adaptation can be completed without updating all network weights of a large model, requiring only a small number of new parameters. While maintaining a parameter magnitude comparable to low-rank adaptive and other efficient parameter fine-tuning methods, it breaks through the feature representation space limitations of low-rank linear approximation, significantly improving the fine-tuning accuracy of complex financial transaction semantic understanding and multi-step reasoning tasks. At the same time, by determining the comprehensive complexity data through the information entropy and feature dispersion of the embedded feature matrix, and dynamically adjusting the dynamic line depth accordingly, the quantum entanglement depth matches the semantic complexity of the input text. This ensures high-dimensional expressive power under complex tasks while avoiding computational redundancy and noise accumulation in simple tasks, improving fine-tuning accuracy while reducing the impact of quantum chip computational overhead. Furthermore, based on the hybrid analytical gradient technique of quantum and classical methods, a closed-form analytical solution for gradient calculation has been achieved in the field of quantum-enhanced fine-tuning. This reduces the linear complexity required by traditional parameter offset algorithms to a constant, significantly optimizing training iteration speed and overall computational power consumption. Thus, while significantly reducing the computational overhead and training time for fine-tuning downstream tasks in large-scale financial payment scenarios, it effectively improves fine-tuning accuracy and hardware deployment robustness, enabling lightweight deployment of large-scale models.

[0107] The steps described above are explained in detail below.

[0108] In step 210, the model input text is downstream task data to be fine-tuned, such as user question text in a smart payment scenario or transaction description text in a financial risk control scenario. The embedding feature matrix is ​​a dense vector representation obtained by mapping the model input text through the embedding layer of a large model. The rows of this matrix correspond to the word sequence in the input text, and the columns correspond to the embedding vector dimension of each word.

[0109] The embedding feature matrix of the model input text can be denoted as: ,in For sequence length, The feature embedding dimension.

[0110] Step 220 involves adaptively determining the depth of the quantum circuit by quantifying the semantic complexity of the input text. Specifically, two complexity metrics—information entropy and feature dispersion—can be extracted from the embedded feature matrix. After weighted fusion of these two metrics to obtain comprehensive complexity data, it is compared with a preset multi-level threshold to determine the dynamic circuit depth that the current input should match. Simple tasks match shallow circuits, while complex tasks match deep circuits. This will be explained in detail below.

[0111] In some embodiments of this application, the model parameter adjustment method may further include steps 2501 to 2503 before step 220.

[0112] Step 2501: Perform probability density statistics on the eigenvalues ​​of each feature dimension in the embedded feature matrix, and determine the information entropy of the embedded feature matrix based on the results of the probability density statistics. The information entropy is used to characterize the degree of disorder in the distribution of eigenvalues ​​in the embedded feature matrix.

[0113] In this step, the information entropy can be determined using the following formula (5): in, Let the probability density of the eigenvalues ​​in the i-th feature dimension of the input embedding feature matrix be denoted as . The result is the probability density statistics. The larger the value, the more complex the input semantic information and the more dispersed the feature distribution.

[0114] Step 2502: Based on the absolute deviation information of the feature values ​​of each feature dimension in the embedded feature matrix from the mean of the embedded feature matrix, determine the feature dispersion of the embedded feature matrix. The feature dispersion is used to characterize the degree of fluctuation of the feature values ​​in the embedded feature matrix in the word sequence dimension of the input text of the model.

[0115] In this step, the feature dispersion can be determined using the following formula (6): in, The mean of the embedded feature matrix, This is absolute deviation information. To prevent division by zero constant, For characteristic dispersion, The larger the value, the stronger the nonlinear fluctuation of the input features and the higher the task complexity.

[0116] Step 2503: Weighted fusion of information entropy and feature dispersion is performed to obtain comprehensive complexity data.

[0117] In this step, the overall complexity data can be determined using the following formula (7): in, To normalize the information entropy to the [0,1] interval, The feature dispersion is normalized to the [0,1] interval. This is a weight hyperparameter, with a default value of 0.5, which balances the weights for the two-dimensional evaluation. The final input complexity score is the overall complexity data.

[0118] Therefore, by using information entropy and feature dispersion to evaluate input complexity from two dimensions—the degree of disorder in feature value distribution and the degree of fluctuation along the word sequence—and then weighting and fusing them together, we can avoid the problem that a single indicator cannot fully characterize the semantic complexity of the text, and provide a more accurate decision basis for the dynamic allocation of dynamic line depth.

[0119] In some embodiments of this application, step 220 may specifically include steps 2201 to 2203.

[0120] Step 2201: Compare the comprehensive complexity data with the preset multi-level threshold interval to obtain the comparison result.

[0121] In this step, the complexity data is synthesized. S ( x The value is a scalar obtained by weighted fusion of information entropy and feature dispersion in step 210, with a range of [0,1]. This step compares this value with a preset multi-level threshold interval, as shown below, to determine the semantic complexity level of the current input text.

[0122] Among them, threshold Determined through cross-validation; depth level These correspond to four input task categories: minimalist, simple, medium, and complex. The comparison operation is performed by judging... ( The comparison result is determined by identifying which of the four sub-intervals the input text falls into, thus indicating the complexity level of the current input text. The threshold value is determined through cross-validation to ensure discriminative power and generalization performance between different complexity levels.

[0123] It should be noted that, ( The lower the value, the more uniform the feature distribution of the input text, the smoother the fluctuation of the feature values ​​along the sequence, and the simpler the semantic structure. ( A higher value indicates a more dispersed feature distribution, more drastic fluctuations in feature values, and a more complex semantic structure. This step maps the continuous value to a finite number of discrete levels, providing a basis for subsequent depth selection.

[0124] Step 2202: Select the target preset depth level corresponding to the comparison result from the preset depth levels corresponding to each threshold interval in the multi-level threshold interval. Among them, the comprehensive complexity data is positively correlated with the dynamic line depth.

[0125] In this step, the depth level represents the number of quantum gate layers in the quantum circuit. The more layers, the greater the entanglement depth of the quantum circuit and the stronger its high-dimensional nonlinear expression capability; the fewer layers, the lower the computational overhead and noise impact. Through the above mapping relationship, the system selects the corresponding target preset depth level based on the comparison results, completing the conversion from complexity level to hardware configuration parameters.

[0126] It should be noted that the four-level settings implement an adaptive strategy of shallow processing for simple tasks and deep evolution for complex tasks. Specifically, minimalist and simple tasks use 2 or 4 layers of quantum circuits to avoid unnecessary quantum gate operations that accumulate noise; medium and complex tasks use 6 or 8 layers of quantum circuits to provide sufficient entanglement depth to capture higher-order semantic associations.

[0127] Step 2203: Determine the value of the target preset depth level as the dynamic circuit depth of the quantum circuit.

[0128] In this step, the target preset depth level selected in step 2202, i.e., 2, 4, 6, or 8, is assigned to the dynamic circuit depth L as the quantum circuit configuration parameter corresponding to the current input text, used to construct the global unitary evolution operator. The value of L directly determines the number of superposition layers of unitary transformation in the quantum unitary evolution operator. That is, the larger L is, the more layers of CRZ entanglement gates in the quantum circuit, the longer the evolution path of the quantum state in Hilbert space, and the richer the introduced quantum interference effect, thus possessing a stronger nonlinear feature mapping capability; the smaller L is, the fewer quantum gate operations, the shorter the circuit running time, and the smaller the influence of decoherence noise, making it suitable for efficient processing of simple tasks.

[0129] It should be noted that the dynamic line depth L is the control variable for on-demand allocation of quantum resources in this embodiment. By binding L to the semantic complexity of the model input text, two-layer lines can be matched for extremely simple queries to avoid resource waste, and eight-layer lines can be matched for complex risk control inference to ensure expressive power, thereby achieving an optimal balance between resource utilization efficiency and model expressive power.

[0130] Therefore, by comparing the comprehensive complexity data with preset multi-level threshold ranges, the target level is selected from the corresponding preset depth levels as the dynamic line depth, thus achieving a precise match between the dynamic line depth and the complexity of the input text. This allows simple tasks to be matched with shallow lines to reduce computational redundancy, while complex tasks are matched with deep lines to ensure expressive power.

[0131] It should be noted that the quantum unitary evolution operator is composed of the sequential accumulation and product of L layers of quantum circuits indicated by the dynamic circuit depth; each layer of the L-layer quantum circuit includes a single-bit rotation unitary gate applied to each quantum bit in the quantum circuit and a two-bit controlled entanglement unitary gate applied to adjacent quantum bits in the quantum circuit.

[0132] Among them, the quantum unitary evolution operator The global unitary transformation of the entire quantum circuit is constructed by sequentially accumulating and multiplying the L layers of quantum circuits indicated by the dynamic circuit depth L. Specifically, it can be constructed using the following formula (8): in, For the first Unitary transform of layered quantum circuits θ It is the set of rotation angles of each quantum gate.

[0133] Each layer of quantum circuitry is composed of two types of unitary gates combined in a fixed order: namely, single-qubit rotating unitary gates. Apply controlled entanglement unitary gates to each qubit individually. Apply to adjacent qubits.

[0134] The unitary transformation formula for a single-line layer can be expressed as follows (9): in, It is a single-bit universal rotation unitary operator. For a two-bit universal controlled entangled unitary operator, The trainable quantum parameter refers to the first... The i-th single bit of the layer The rotation angle of the door, For the first The i-th layer and Between the (i+1)th qubit of the layer The rotation angle of the door. The total rotation angle θ is the first training parameter in this embodiment, which is optimized through backpropagation, i.e., the HCAG module.

[0135] Therefore, the quantum unitary evolution operator is limited to being composed of L layers of quantum circuits that are sequentially accumulated and multiplied. Each layer contains a single-qubit rotating unitary gate and a two-qubit controlled entangled unitary gate. The alternating stacking of the two types of gates enables the quantum circuits to be programmable and trainable, providing a structural basis for the joint training of quantum-classical hybrid models.

[0136] Regarding step 230, in this embodiment of the application, the attention projection features include a query matrix, a key matrix, and a value matrix. Based on this, step 230 may specifically include steps 2301 and 2302.

[0137] Step 2301: Determine the attention weight matrix based on the quantum unitary evolution operator, the query matrix, and the key matrix.

[0138] Step 2302: Determine the value feature matrix based on the gating unit and value matrix of the large model.

[0139] Therefore, the attention projection features are split into three matrices: query, key, and value. These matrices are then processed through two parallel paths: a quantum unitary evolution operator and a gating unit. This decouples and optimizes query and key matching as well as value feature extraction in the attention mechanism, thereby improving the overall processing efficiency.

[0140] In this embodiment of the application, step 2301 may specifically include steps 23011 to 23013.

[0141] Step 23011: Perform quantum state evolution processing on the query matrix and the bond matrix using the quantum unitary evolution operator to obtain the query quantum state corresponding to the query matrix and the bond quantum state corresponding to the bond matrix.

[0142] Furthermore, step 23011 may specifically include steps 230111 to 230113.

[0143] Step 230111: Normalize the query matrix and the key matrix respectively to obtain the query normalized feature corresponding to the query matrix and the key normalized feature corresponding to the key matrix.

[0144] In this step, the query matrix and key matrix can be normalized using the following formula (10): in, For the query normalization features corresponding to the query matrix, These are the key-normalized features corresponding to the key matrix. To query the first element in the matrix The original values ​​of each element. The first in the key matrix The original value of each element.

[0145] Here, formula (10) is used to linearly map the values ​​of each element in the query matrix q and the key matrix k from the original floating-point range, such as potentially negative, large, or unevenly distributed values, to the effective angle range [0, π / 2] of the quantum rotation gate, so that classical feature information can be encoded into the phase and amplitude of the quantum state without loss.

[0146] Step 230112: Encode the query normalization feature and the bond normalization feature respectively to obtain the query basic quantum state corresponding to the query normalization feature and the basic bond quantum state corresponding to the bond normalization feature.

[0147] In this step, the query normalized features and key normalized features can be encoded using the following formula (11): in, For the query's underlying quantum state corresponding to the query's normalized features, This refers to the fundamental bond quantum state corresponding to the bond normalization characteristic.

[0148] Step 230113: Perform unitary transformations on the query fundamental quantum state and the fundamental bond quantum state respectively using the quantum unitary evolution operator to obtain the query quantum state corresponding to the query matrix and the bond quantum state corresponding to the bond matrix.

[0149] In this step, the encoded query fundamental quantum state is... The fundamental quantum state of bonding The data are input into the quantum chip and processed by the global unitary evolution operator. Utotal ( L By performing a unitary transformation, the query fundamental quantum state and the fundamental bond quantum state can be transformed using the following formula (12): in, The term "unitary transform" is a unitary transform operator composed of the sequentially accumulated products of L layers of quantum circuits, where L is dynamically determined by the ADQC module based on the input semantic complexity. It should be noted that the unitary transform corresponds to the evolution of a closed quantum system in quantum mechanics and possesses mathematical properties such as inner product preservation, norm invariance, and invertibility. In Hilbert space, Through the alternating action of multiple layers of single-bit rotation gates and two-bit entanglement gates, and Mapping from a low-dimensional feature space to a high-dimensional entangled space involves, specifically, a single-qubit rotation gate performs local rotations on the Bloch sphere of each qubit, adjusting the amplitude and phase of each feature dimension. A two-qubit entanglement gate establishes quantum correlations between adjacent qubits, coupling the originally independent feature codes together, allowing the quantum state to capture higher-order correlation information between features. After L-level unitary transformations, the output quantum state is obtained. and It not only contains the original feature information, but also implies the high-dimensional nonlinear interaction relationship between features through quantum interference and entanglement effects.

[0150] Therefore, by performing quantum state evolution on the query and key matrices using quantum unitary evolution operators, and then normalizing the similarity between all tokens to the attention weight matrix after using quantum state inner product interference to calculate the similarity between all tokens, the computational efficiency is significantly improved compared to the classical method of calculating the dot product one by one, and the output is compatible with the traditional Transformer architecture.

[0151] Step 23012: Based on the query quantum state and the bond quantum state, determine the similarity data between each word in the input text of the model.

[0152] In this step, the similarity data between all pairs of words in the input text is calculated in one go through quantum parallel interferometry, serving as the basis for generating the attention weight matrix. The key to this step is to utilize the physical properties of quantum state inner product interference to complete the calculation of the N×N similarity scores, which would otherwise be calculated one by one in the classical attention mechanism, in parallel through a single quantum measurement, fundamentally reconstructing the paradigm for calculating attention similarity.

[0153] This step is based on the principle of quantum state overlap integral, that is, two quantum states and The inner product square physically characterizes the degree of overlap between two quantum states. When the two quantum states are completely aligned in Hilbert space, the inner product square is 1, indicating complete similarity. When the two quantum states are orthogonal to each other, the inner product square is 0, indicating complete dissimilarity.

[0154] Therefore, based on the principle of quantum state overlap integral, the feature similarity corresponding to the square of the inner product of two quantum states can be calculated by the following formula (13): This formula mathematically defines the ideal value of similarity; it is a theoretical expression. Quantum chips cannot directly output the value of the inner product, meaning quantum hardware can only return probabilistic measurement results, such as when the auxiliary bit collapses into... 0 or 1 The values ​​are statistical frequencies, not direct mathematical values. Therefore, it is necessary to construct a physical interferometry system to transform the inner product values ​​into measurable probabilities and establish a mathematical correspondence between the two.

[0155] To achieve parallel computation of all sequence pairs in batches, an index and feature jointly entangled quantum state is constructed using the following formula (14): in, This is an index register quantum state used to distinguish different sequence samples, enabling batch parallel computation. The physical meaning of this jointly entangled state is that it integrates all... N The query state and key state of each term are marked according to their index, placing them in a quantum superposition state, that is, each branch i Simultaneously carrying the first i The query state and key state of each word are determined by the index register. This allows for differentiation. When subsequent interferometry measurements are performed, the queries and key pairings in all branches will simultaneously undergo the interference process on the quantum chip, thereby enabling batch parallel computation.

[0156] In this embodiment, formula (13) defines the ideal mathematical value of similarity, but this value cannot be directly read from quantum hardware. Therefore, in this embodiment, a quantum unitary evolution operator is introduced to construct a similarity interferometric measurement system. The similarity data between each word in the text is input into the auxiliary bit measurement probability solution model, as shown in the following formula (15): in, The probability of a qubit measurement being 0 is obtained through quantum state collapse statistics. This provides similarity data between various lexical units.

[0157] Thus, by introducing auxiliary qubits and constructing an interferometric measurement system using quantum unitary evolution operators, when the query quantum state and the bond quantum state undergo interference, the square of the inner product of the two quantum states is encoded as an auxiliary qubit that collapses to... 0 probability of state The quantum chip obtains the similarity data between each word in the input text of the model by repeatedly measuring and statistically analyzing the probability value, and then performing a linear transformation using formula (15).

[0158] Step 23013: Normalize the similarity data to obtain the attention weight matrix.

[0159] In this step, the similarity matrix obtained by quantum parallel computation can be scaled and normalized using the following formula (16) to obtain the final attention weight matrix: This is a classic scaling factor to avoid excessively large inner product values ​​that could lead to softmax gradient saturation, thus ensuring training stability.

[0160] Thus, by performing extremum normalization, rotation gate encoding, and unitary transformation on the query and key matrices, a high-fidelity mapping from the classical feature space to the quantum Hilbert space is achieved, ensuring that classical semantic information is completely preserved in the quantum state, and providing high-quality quantum state input for subsequent interferometry.

[0161] In this embodiment of the application, step 2302 may specifically include steps 23021 to 23024.

[0162] Step 23021: Perform global average pooling on the value matrix along the word sequence dimension of the input text of the model to obtain a pooling vector. The pooling vector is used to characterize the overall distribution features of the value matrix in the word sequence.

[0163] In this step, global average pooling is performed on the value matrix along the word sequence dimension, compressing the semantic information of the entire sequence into a fixed-length pooling vector. This pooling vector captures the overall distribution characteristics of the value matrix across all word positions, reflecting the global semantic tendency of the current input text in the value space, such as the overall sentiment tone, risk level, or semantic theme of the text, and can serve as the data basis for subsequent gating coefficient generation. Global average pooling is used instead of max pooling or attention pooling because it is necessary to preserve the overall activation level of each feature dimension, rather than local extrema or weighted distribution, to ensure that the gating coefficients have a stable response to the overall semantic distribution of the input text.

[0164] Step 23022: Input the pooling vector into the gating unit of the large model. After the gating unit performs linear transformation and activation function processing on the pooling vector, the gating coefficient set output by the gating unit is obtained. The gating coefficients at different index positions in the gating coefficient set correspond to each decomposition unit in the matrix multiplication operator tensor network.

[0165] In this step, the local tensor of each layer can be calculated based on the following formula (17). After processing by a pooling vector input gate unit, linear transformation, and sigmoid activation function, the gate coefficients are obtained: in, It is the Sigmoid activation function. For gating trainable parameters, The input feature is the global average pooling vector. is the gating coefficient.

[0166] Thus, the gate coefficients at different index positions in the set of gate coefficients correspond to the first in the matrix multiplication operator tensor network. k Decomposition unit w ( k The single forward propagation of the gated unit is output through a linear transformation layer. n dimensional vector z , its first k Each component zk After activation by Sigmoid, the following is obtained gk Exclusively assigned to the first k Each decomposition unit. gk The range of the value is [0,1], indicating the value of the current input in the [0,1]th order. k The required level of tensor decomposition fineness for each decomposition unit, i.e. gk The closer it is to 1, the higher the dimensionality of the decomposition unit needs to be expressed. gk The closer it is to 0, the more likely the decomposition unit can reduce its dimensionality to save parameters.

[0167] Step 23023: Based on the gating coefficient corresponding to each decomposition unit, perform a linear difference between the preset minimum key dimension and the preset maximum key dimension to obtain the dynamic key dimension of each decomposition unit.

[0168] In this step, the gating coefficients corresponding to each decomposition unit obtained in step 23022 are used. gk The minimum key dimension can be achieved using the following formula (18). Compared with the preset maximum key dimension Linear interpolation is performed between them to obtain the dynamic bond dimension of each decomposition unit. Dk : in, To preset the minimum key dimension, The preset maximum key dimension can be set to 2, the preset minimum key dimension can be set to 16, and the preset maximum key dimension can be set to 16. For the first Real-time dynamic key dimension of layer tensors.

[0169] Here, the dynamic key dimension is used to continuously adjust the decomposition accuracy and parameter size. That is, the gating coefficient is used as an adjustment factor to ensure the basic expressive power of tensor decomposition while allowing the key dimension to be expanded to the preset maximum key dimension under complex tasks, so as to achieve a smooth transition from extremely simple to extremely complex.

[0170] Step 23024: Based on the dynamic key dimension of each decomposition unit, perform matrix product operator tensor decomposition on the value matrix to obtain the value feature matrix.

[0171] In this step, based on the dynamic key dimensions of each decomposition unit obtained in step 23023, the value matrix is ​​decomposed into a matrix product operator tensor using the following formula (19) to obtain the value feature matrix: in, For the first The local tensor of each decomposition unit, with a bond dimension of . , This is a tensor trace operation used to shrink local tensors at each level into a global tensor.

[0172] In the dynamic key dimension, the number of trainable parameters for each decomposition unit is: Based on this, the total number of trainable parameters can be calculated as the sum of the parameters for each layer using the following formula (20): in, Ik and Jk These are the physical dimensions of the k-th decomposition unit. When gk When smaller, Dk The number of parameters in this decomposition unit is automatically reduced. This reduces the amount of computation, thereby achieving parameter compression and a reduction in computational overhead at the source.

[0173] Therefore, by using a gating mechanism to generate gating coefficients for each decomposition unit based on the pooling vector, and linearly interpolating between the preset minimum and maximum key dimensions, a dynamic key dimension is obtained. This achieves an on-demand balance between tensor decomposition accuracy and parameter scale, meaning that the key dimension is automatically reduced to decrease redundancy for simple semantic tasks, and automatically increased to enhance expressive power for complex tasks.

[0174] Regarding step 240, in some embodiments of this application, step 240 may specifically include: The product of the attention weight matrix and the value feature matrix is ​​used to determine the fine-tuned output feature.

[0175] In this step, the attention weight matrix and the value feature matrix can be transformed using the following formula (20), and the transformed features are fused to obtain the final fine-tuned output features: Where A is the attention weight matrix, The eigenvalue matrix, This is for fine-tuning the output characteristics.

[0176] Thus, by multiplying the attention weight matrix with the value feature matrix, the fine-tuned output features are obtained, completing the information fusion of the quantum enhanced attention path and the dynamic tensor compression path. This enables the current layer output to simultaneously possess the dual advantages of high-order semantic association captured by the quantum path and efficient parameter compression achieved by the tensor path.

[0177] Furthermore, in some embodiments of this application, the fine-tuned output features are the features of the attention layer output in the large model, and the large model also includes a result output network layer. Based on this, after step 240, the model parameter adjustment method may also include steps 1601 to 1604.

[0178] Step 1601: The fine-tuned output features are input to the network layer to obtain the predicted output result corresponding to the input text of the model.

[0179] In this step, the fine-tuned output features obtained in step 240 are... The output network layer of the input large model, after forward propagation, yields the predicted output corresponding to the input text of the model.

[0180] The output network layer in this embodiment includes the network structure part located after the self-attention layer in the large model, covering standard Transformer components such as feed-forward network, layer normalization, and residual connection. As the output features of the current self-attention layer, they are processed sequentially through these network layers, and finally, through the output mapping layer such as the linear classification layer or the language model head, the predicted output results of the model are obtained, such as the probability distribution of classification labels or generated text. The data transformation process can be shown by the following formula (21): OutputLayers is used to represent the composite function consisting of all network layers after the self-attention layer in a large model.

[0181] Step 1602: Determine the prediction loss value based on the prediction output and the labeled data corresponding to the model input text.

[0182] In this step, the predicted output obtained in step 1601 is compared with the labeled data corresponding to the model input text, and the predicted loss value L is calculated using a loss function. The labeled data is the supervision signal corresponding to the model input text; in supervised fine-tuning scenarios, this can be classification labels, reference text for the generation task, or standard answers, etc. The loss function is selected based on the downstream task type; for classification tasks, cross-entropy loss can be used, and for generation tasks, negative log-likelihood loss can be used, i.e., L = Loss(Prediction, Label). This predicted loss value L is a scalar used to quantify the degree of difference between the current model prediction and the true label, and it is the signal driving backpropagation and parameter updates.

[0183] Step 1603: Based on the predicted loss value, determine the first gradient of the rotation angle of each quantum gate in the quantum unitary evolution operator; and based on the predicted loss value, determine the second gradient of the weight of each linear transformation layer in the gated unit.

[0184] Therefore, based on the predicted loss, the first gradient of the rotation angle of each quantum gate in the quantum unitary evolution operator and the second gradient of the linear transformation layer weight in the gated unit are calculated respectively, and the two types of training parameters are updated respectively. A complete backpropagation mechanism is established to ensure that the quantum path and the classical tensor path converge to their respective optimal directions during training and work together to complete the downstream task adaptation.

[0185] In some embodiments, before step 1603, the model parameter adjustment method may further include step 1605, obtaining quantum state data of each layer of quantum circuits of the quantum unitary evolution operator when running on the quantum chip, the quantum state data being used to characterize the quantum state distribution information of the quantum state corresponding to the model input text after unitary transformation of each layer of quantum circuits on the quantum chip.

[0186] Based on this, step 1603 may specifically include: Based on the predicted loss value, quantum state data, and Hamiltonian of the quantum unitary evolution operator, determine the first gradient of the predicted loss value with respect to the rotation angle of each quantum gate.

[0187] In this step, the first gradient is the rotation angle of each quantum gate in the quantum unitary evolution operator relative to the predicted loss value L. partial derivatives Based on this, the expected output value for the final measurement of the quantum circuit is: By utilizing the unitary property and derivative properties of the unitary transform , The gradient is derived as shown in equation (22): in, The first one obtained in step 1605 Layer quantum state data, For the transformed measurement operator, For quantum commutator operations, For the first The fixed Hamiltonian corresponding to the layer-unit gate. = - This refers to quantum commutator operations.

[0188] Combining the chain rule, the first gradient of the loss value with respect to the rotation angle of each quantum gate is predicted as follows (23): Therefore, by utilizing the quantum state data retained during forward propagation, and combining the predicted loss value and Hamiltonian, the first gradient is determined through the analytical gradient formula. This eliminates the need to perform additional circuit derivation for each quantum gate rotation angle, reducing the gradient calculation complexity from O(P) to O(1) and significantly reducing training time overhead.

[0189] In other embodiments, prior to step 1603, step 1603 may specifically include: Based on the predicted loss value, the attention weight matrix, the third gradient, and the fourth gradient, determine the second gradient of the weights of each linear transformation layer in the gating unit; The third gradient is the gradient of the value feature matrix with respect to the dynamic key dimension of each decomposition unit in the gated unit, and the fourth gradient is the gradient of the gated coefficients of the gated unit with respect to the linear output.

[0190] In this step, the second gradient is the partial derivative of the predicted loss value L with respect to the weights Wg of the linear transformation layer in the gated unit. The second gradient is calculated using the classical chain rule, as shown in formula (24): Where z=Wg V pool +bg, and finally the second gradient is used to update the trainable parameters of the gating unit.

[0191] Step 1604: Adjust the first training parameters of the quantum unitary evolution operator according to the first gradient; and adjust the second training parameters of the gating unit according to the second gradient.

[0192] In this step, based on the first and second gradients obtained in step 1603, the first training parameters of the quantum unitary evolution operator and the second training parameters of the gating unit are updated respectively using formula (25): Where η is the learning rate, the updated quantum gate rotation angle will produce more accurate quantum interference and similarity calculation in the next round of forward propagation, and the updated gating weights will assign more reasonable dynamic bond dimensions to each decomposition unit, thereby driving the model to gradually converge to the optimal fit state of the downstream task.

[0193] Therefore, by establishing a complete chain-like derivative path from prediction loss to gating parameters through the gradient of the third gradient (i.e., the gradient of the value feature matrix) on the dynamic key dimension and the fourth gradient (i.e., the gradient of the gating coefficient with respect to the linear output), the gating unit can continuously optimize the key dimension allocation strategy of each decomposition unit according to the feedback from downstream tasks, thereby achieving task-adaptive optimization of parameter scale and expressive power.

[0194] Based on the above, this embodiment dynamically determines the dynamic circuit depth of quantum circuits according to the semantic complexity of the input text of the model through an adaptive deep quantum circuit module. This ensures that the depth of quantum entanglement matches the task complexity. Simple tasks are matched with shallow circuits to reduce computational redundancy and noise accumulation, while complex tasks are matched with deep circuits to ensure high-dimensional nonlinear expression capabilities. This solves the problems of resource waste in simple tasks and insufficient expression in complex tasks caused by fixed quantum structures, and realizes on-demand allocation of quantum computing resources. Simultaneously, the quantum tensor attention kernel module utilizes the physical properties of quantum state inner product interference to calculate the similarity of all queries and key pairs in parallel at once, reducing the quadratic computational complexity of traditional attention to logarithmic levels, fundamentally reconstructing the attention computation paradigm. Through the gating adaptive mechanism of the dynamic key dimension matrix multiplication operator module, dynamic key dimensions are independently generated for each decomposition unit, achieving a dynamic balance between parameter compression rate and expression accuracy. The number of trainable parameters is significantly lower than existing efficient parameter fine-tuning methods. Compared with LoRA and the current best quantum fine-tuning technology QTHA, it achieves a significant reduction in parameters, significantly reducing the risk of overfitting and improving the model's generalization ability.

[0195] Building upon this foundation, this application derives the closed-form solution of the analytical gradient from the unitary nature of the quantum unitary evolution operator using a hybrid quantum and classical analytical gradient module. This compresses the linear complexity required by traditional parameter shift algorithms to a constant, significantly optimizing both the training iteration convergence speed and overall training computational power consumption, thus removing efficiency barriers for large-scale industrial fine-tuning. Regarding fine-tuning accuracy, quantitative verification results on three standard datasets—Chinese psychological counseling, Chinese-English mathematical reasoning, and K12 mathematical question answering—show that both training and validation losses are significantly reduced, and the convergence curve fluctuations are significantly smaller than those of comparative techniques, demonstrating excellent optimization stability. The text generation metrics BLEU-4 and ROUGE-L are effectively improved compared to QTHA, with a significant reduction in perplexity, confirming the model's ability to finely fit complex semantic distributions. In mathematical reasoning tasks, both strict accuracy and completeness of thought chains reach ideal levels, and the overall reasoning accuracy is significantly improved compared to the current best techniques.

[0196] In terms of hardware deployment, this application uses a noise-adaptive quantum measurement module to monitor the single-qubit gate error rate, double-qubit gate error rate, and measurement error rate of the quantum hardware in real time, calculates the overall noise level, and dynamically switches the measurement basis combination and adjusts the number of measurement samplings accordingly. By combining multi-scale noise scaling sampling and zero-noise extrapolation techniques, the performance degradation rate of the model task is controlled to a level far lower than that of existing technologies in the noisy environment of real superconducting quantum hardware. The hardware adaptability robustness is significantly improved, and a real leap from simulator verification to deployment of real quantum devices is achieved.

[0197] In summary, this application constructs a new paradigm of quantum and classical hybrid fine-tuning with dynamic collaboration across the entire chain, from quantum circuit depth, tensor dimension, attention computing power to training efficiency and hardware adaptation. While significantly reducing the computational overhead and training time for fine-tuning downstream tasks in large-scale financial payment scenarios, it effectively improves fine-tuning accuracy and hardware deployment robustness, achieving lightweight, efficient, and high-precision parameter fine-tuning.

[0198] Based on the same inventive concept, this application also provides a model parameter adjustment device. (Specifically combined with...) Figure 3 Please provide a detailed explanation.

[0199] Figure 3 This is a schematic diagram of the structure of a model parameter adjustment device provided in one embodiment of this application.

[0200] In some embodiments of this application, such as Figure 3 As shown, the model parameter adjustment device 30 may specifically include an acquisition module 301, a determination module 302, and a processing module 303, as detailed below.

[0201] The acquisition module 301 is used to acquire the embedding feature matrix of the model input text of the large model.

[0202] The determination module 302 is used to determine the dynamic circuit depth of the quantum circuit based on the comprehensive complexity data corresponding to the embedded feature matrix. The comprehensive complexity data is used to characterize the semantic complexity of the input text of the model. The comprehensive complexity data is determined by the information entropy and feature dispersion of the embedded feature matrix. The dynamic circuit depth is the number of quantum gate layers required for the quantum circuit to process the input text of the model on the quantum chip.

[0203] The processing module 303 is used to process the attention projection features of the model input text according to the quantum unitary evolution operator of the dynamic line depth and the gating unit of the large model to obtain the attention weight matrix and the value feature matrix. The attention weight matrix is ​​used to characterize the semantic association strength between each word in the model input text, and the value feature matrix is ​​used to characterize the semantic representation strength of each word in each feature dimension.

[0204] The determination module 302 is also used to determine the fine-tuned output features based on the attention weight matrix and the value feature matrix. The fine-tuned output features are used to determine the prediction loss of the large model on the downstream task. The prediction loss is used to adjust the first training parameters of the quantum unitary evolution operator and the second training parameters of the gating unit.

[0205] In this way, by using the high-dimensional nonlinear mapping of quantum unitary evolution operators and the dynamic tensor decomposition of gated units, downstream task adaptation can be completed without updating all network weights of the large model, requiring only a small number of new parameters. While maintaining a parameter magnitude comparable to low-rank adaptive and other efficient parameter fine-tuning methods, it breaks through the feature representation space limitations of low-rank linear approximation, significantly improving the fine-tuning accuracy of complex financial transaction semantic understanding and multi-step reasoning tasks. At the same time, by determining the comprehensive complexity data through the information entropy and feature dispersion of the embedded feature matrix, and dynamically adjusting the dynamic line depth accordingly, the quantum entanglement depth matches the semantic complexity of the input text. This ensures high-dimensional expressive power under complex tasks while avoiding computational redundancy and noise accumulation in simple tasks, improving fine-tuning accuracy while reducing the impact of quantum chip computational overhead. Furthermore, based on the hybrid analytical gradient technique of quantum and classical methods, a closed-form analytical solution for gradient calculation has been achieved in the field of quantum-enhanced fine-tuning. This reduces the linear complexity required by traditional parameter offset algorithms to a constant, significantly optimizing training iteration speed and overall computational power consumption. Thus, while significantly reducing the computational overhead and training time for fine-tuning downstream tasks in large-scale financial payment scenarios, it effectively improves fine-tuning accuracy and hardware deployment robustness, enabling lightweight deployment of large-scale models.

[0206] Furthermore, by using analytical gradient calculation, all gradient information can be obtained at once without performing additional quantum circuit derivation for each quantum gate rotation angle, which greatly improves the training convergence speed and overall training efficiency. While maintaining the advantages of efficient parameter fine-tuning and lightweight design, it breaks through the upper limit of the expressive power of classical linear approximation, enabling the large model to more accurately verify the suspected misjudgments and missed judgments output by the small model in the two-layer risk control system, effectively enhancing its in-depth judgment capability and overall risk control accuracy, while meeting the noise tolerance and deployment constraints of real quantum hardware.

[0207] The model parameter adjustment device 30 in the embodiments of this application will be described in detail below.

[0208] In one or more optional embodiments, the model parameter adjustment device 30 may further include a statistical module for performing probability density statistics on the feature values ​​of each feature dimension in the embedded feature matrix. The determination module 302 is used to determine the information entropy of the embedded feature matrix based on the results of probability density statistics. The information entropy is used to characterize the degree of disorder in the distribution of eigenvalues ​​in the embedded feature matrix. The determination module 302 is used to determine the feature dispersion of the embedded feature matrix based on the absolute deviation information of the feature values ​​of each feature dimension in the embedded feature matrix from the mean of the embedded feature matrix. The feature dispersion is used to characterize the degree of fluctuation of the feature values ​​in the embedded feature matrix in the word sequence dimension of the input text of the model. The model parameter adjustment device 30 may also include a fusion module for weighted fusion of information entropy and feature dispersion to obtain comprehensive complexity data.

[0209] In one or more optional embodiments, the model parameter adjustment device 30 may further include a comparison module for comparing the comprehensive complexity data with a preset multi-level threshold range to obtain a comparison result; The model parameter adjustment device 30 may also include a selection module for selecting a target preset depth level corresponding to the comparison result from the preset depth levels corresponding to each threshold level in the multi-level threshold interval. The determination module 302 is used to determine the value of the target preset depth level as the dynamic circuit depth of the quantum circuit.

[0210] In one or more alternative embodiments, the quantum unitary evolution operator is composed of the sequentially accumulated product of L layers of quantum circuits indicated by dynamic circuit depth; Each layer of an L-layer quantum circuit includes a single-bit rotating unitary gate applied to each qubit in the quantum circuit and a two-bit controlled entanglement unitary gate applied to adjacent qubits in the quantum circuit.

[0211] In one or more optional embodiments, the determining module 302 is used to determine the attention weight matrix based on the quantum unitary evolution operator, the query matrix, and the key matrix when the attention projection features include a query matrix, a key matrix, and a value matrix. Based on the gating units and value matrix of the large model, determine the value feature matrix.

[0212] In one or more optional embodiments, the processing module 303 is used to perform quantum state evolution processing on the query matrix and the bond matrix through a quantum unitary evolution operator to obtain the query quantum state corresponding to the query matrix and the bond quantum state corresponding to the bond matrix; The determination module 302 is used to determine the similarity data between each word in the input text of the model based on the query quantum state and the bond quantum state; The processing module 303 is used to normalize the similarity data to obtain the attention weight matrix.

[0213] In one or more optional embodiments, the processing module 303 is used to normalize the query matrix and the key matrix respectively to obtain the query normalization feature corresponding to the query matrix and the key normalization feature corresponding to the key matrix. The model parameter adjustment device 30 may also include an encoding module for encoding the query normalization feature and the bond normalization feature respectively, to obtain the query basic quantum state corresponding to the query normalization feature and the basic bond quantum state corresponding to the bond normalization feature; The model parameter adjustment device 30 may also include a transformation module, which is used to perform unitary transformation on the query fundamental quantum state and the fundamental bond quantum state respectively through the quantum unitary evolution operator to obtain the query quantum state corresponding to the query matrix and the bond quantum state corresponding to the bond matrix.

[0214] In one or more optional embodiments, the processing module 303 is used to perform global average pooling on the value matrix in the word sequence dimension of the model input text to obtain a pooling vector, which is used to characterize the overall distribution features of the value matrix in the word sequence. The model parameter adjustment device 30 may also include a model module for inputting the pooling vector into the gating unit of the large model. After the gating unit performs linear transformation and activation function processing on the pooling vector, a set of gating coefficients output by the gating unit is obtained. The gating coefficients at different index positions in the set of gating coefficients correspond to each decomposition unit in the matrix multiplication operator tensor network. The model parameter adjustment device 30 may also include a calculation module, which is used to perform a linear difference between a preset minimum key dimension and a preset maximum key dimension based on the gating coefficient corresponding to each decomposition unit, so as to obtain the dynamic key dimension of each decomposition unit. The model parameter adjustment device 30 may also include a decomposition module for performing matrix multiplication operator tensor decomposition on the value matrix based on the dynamic key dimension of each decomposition unit to obtain the value feature matrix.

[0215] In one or more alternative embodiments, the determining module 302 is specifically used to determine the product of the attention weight matrix and the value feature matrix as the fine-tuned output feature.

[0216] In one or more optional embodiments, the model parameter adjustment device 30 may further include an input module, used to input the fine-tuned output features into the result output network layer when the fine-tuned output features are the features output by the attention layer in the large model and the large model also includes a result output network layer, so as to obtain the predicted output result output by the result output network layer corresponding to the model input text. The determination module 302 is used to determine the prediction loss value based on the prediction output and the labeled data corresponding to the model input text; determine the first gradient of the rotation angle of each quantum gate in the quantum unitary evolution operator based on the prediction loss value; and determine the second gradient of the weight of each linear transformation layer in the gate unit based on the prediction loss value. The model parameter adjustment device 30 may further include an adjustment module for adjusting the first training parameters of the quantum unitary evolution operator according to the first gradient; and adjusting the second training parameters of the gating unit according to the second gradient.

[0217] In one or more optional embodiments, the acquisition module 301 is used to acquire quantum state data of each layer of quantum circuits of the quantum unitary evolution operator when running on the quantum chip. The quantum state data is used to characterize the quantum state distribution information of the quantum state corresponding to the model input text after unitary transformation of each layer of quantum circuits on the quantum chip. The determination module 302 is used to determine the first gradient of the predicted loss value with respect to the rotation angle of each quantum gate based on the predicted loss value, quantum state data, and Hamiltonian of the quantum unitary evolution operator.

[0218] In one or more alternative embodiments, the determining module 302 is used to determine the second gradient of the weights of each linear transformation layer in the gating unit based on the predicted loss value, the attention weight matrix, the third gradient, and the fourth gradient. The third gradient is the gradient of the value feature matrix with respect to the dynamic key dimension of each decomposition unit in the gated unit, and the fourth gradient is the gradient of the gated coefficients of the gated unit with respect to the linear output.

[0219] Based on the same inventive concept, this application also provides a computer device. (Specifically combined with...) Figure 4 Please provide a detailed explanation.

[0220] Figure 4 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application.

[0221] like Figure 4 As shown, the computer device 40 may include at least one of the following involved in the embodiments of this application: an electronic device, a device for adjusting model parameters, and a server for application servers. The computer device 40 may include a processor 401 and a memory 402 storing computer program instructions.

[0222] Specifically, the processor 401 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0223] Memory 402 may include a large-capacity memory for data or instructions. For example, and not limitingly, memory 402 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 402 may include removable or non-removable (or fixed) media. Where appropriate, memory 402 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 402 is non-volatile solid-state memory. In a particular embodiment, memory 402 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0224] The processor 401 reads and executes computer program instructions stored in the memory 402 to implement any of the model parameter adjustment methods in the above embodiments.

[0225] In one example, computer device 40 may also include a communication interface 403 and a bus 410. Wherein, as... Figure 4 As shown, the processor 401, memory 402, and communication interface 403 are connected through bus 410 and complete communication with each other.

[0226] The communication interface 403 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0227] Bus 410 includes hardware, software, or both, that couples components of a flow control device together. For example, and not limited to, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count Bus (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VESA Local Bus, VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 410 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.

[0228] The computer device can execute the model parameter adjustment method in the embodiments of this application, thereby achieving the combination Figure 2 and Figure 3 The described model parameter adjustment method and apparatus.

[0229] Furthermore, in conjunction with the model parameter adjustment methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the model parameter adjustment methods in the above embodiments.

[0230] Furthermore, in conjunction with the model parameter adjustment methods in the above embodiments, this application embodiment can provide a computer program product to implement this method. This program product is stored in a storage medium and may specifically include a computer program or instructions. When executed by a processor, the computer program or instructions implement any of the model parameter adjustment methods in the above embodiments. This program product is executed by at least one processor to implement the various processes of the above model parameter adjustment method embodiments and achieves the same technical effects; therefore, to avoid repetition, further details are omitted here.

[0231] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0232] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0233] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0234] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A method for adjusting model parameters, characterized in that, include: Obtain the embedding feature matrix of the input text of a large model; Based on the comprehensive complexity data corresponding to the embedded feature matrix, the dynamic circuit depth of the quantum circuit is determined. The comprehensive complexity data is used to characterize the semantic complexity of the model input text. The comprehensive complexity data is determined by the information entropy and feature dispersion of the embedded feature matrix. The dynamic circuit depth is the number of quantum gate layers required for the quantum circuit to process the model input text on the quantum chip. Based on the quantum unitary evolution operator of the dynamic line depth and the gating unit of the large model, the attention projection features of the model input text are processed to obtain an attention weight matrix and a value feature matrix. The attention weight matrix is ​​used to characterize the semantic association strength between each word in the model input text, and the value feature matrix is ​​used to characterize the semantic representation strength of each word in each feature dimension. Based on the attention weight matrix and the value feature matrix, fine-tuned output features are determined. These fine-tuned output features are used to determine the prediction loss of the large model on downstream tasks. The prediction loss is used to adjust the first training parameters of the quantum unitary evolution operator and the second training parameters of the gating unit.

2. The method according to claim 1, characterized in that, Before determining the dynamic circuit depth of the quantum circuit based on the comprehensive complexity data corresponding to the embedded feature matrix, the method further includes: The probability density statistics of the feature values ​​of each feature dimension in the embedded feature matrix are performed, and the information entropy of the embedded feature matrix is ​​determined based on the results of the probability density statistics. The information entropy is used to characterize the degree of disorder in the distribution of feature values ​​in the embedded feature matrix. Based on the absolute deviation information of the feature values ​​of each feature dimension in the embedded feature matrix from the mean of the embedded feature matrix, the feature dispersion of the embedded feature matrix is ​​determined. The feature dispersion is used to characterize the degree of fluctuation of the feature values ​​in the embedded feature matrix in the word sequence dimension of the input text of the model. The information entropy and the feature dispersion are weighted and fused to obtain the comprehensive complexity data.

3. The method according to claim 1 or 2, characterized in that, The determination of the dynamic circuit depth of the quantum circuit based on the comprehensive complexity data corresponding to the embedded feature matrix includes: The comprehensive complexity data is compared with a preset multi-level threshold range to obtain the comparison result; Select the target preset depth level corresponding to the comparison result from the preset depth levels corresponding to each of the multi-level threshold intervals; The value of the target preset depth level is determined as the dynamic circuit depth of the quantum circuit.

4. The method according to claim 1, characterized in that, The quantum unitary evolution operator is composed of the sequential accumulation and product of L layers of quantum circuits indicated by the dynamic circuit depth; Each layer of the L-layer quantum circuit includes a single-bit rotating unitary gate applied to each qubit in the quantum circuit and a two-bit controlled entanglement unitary gate applied to adjacent qubits in the quantum circuit.

5. The method according to claim 1, characterized in that, The attention projection features include a query matrix, a key matrix, and a value matrix; the attention projection features of the model input text are processed according to the quantum unitary evolution operator of the dynamic line depth and the gating unit of the large model to obtain an attention weight matrix and a value feature matrix, including: The attention weight matrix is ​​determined based on the quantum unitary evolution operator, the query matrix, and the key matrix; The value feature matrix is ​​determined based on the gating unit of the large model and the value matrix.

6. The method according to claim 5, characterized in that, Determining the attention weight matrix based on the quantum unitary evolution operator, the query matrix, and the key matrix includes: The query matrix and the bond matrix are subjected to quantum state evolution processing using the quantum unitary evolution operator to obtain the query quantum state corresponding to the query matrix and the bond quantum state corresponding to the bond matrix. Based on the query quantum state and the bond quantum state, the similarity data between each word in the input text of the model is determined; The similarity data is normalized to obtain the attention weight matrix.

7. The method according to claim 6, characterized in that, The step of performing quantum state evolution processing on the query matrix and the bond matrix using the quantum unitary evolution operator to obtain the query quantum state corresponding to the query matrix and the bond quantum state corresponding to the bond matrix includes: The query matrix and the key matrix are normalized respectively to obtain the query normalized feature corresponding to the query matrix and the key normalized feature corresponding to the key matrix; The query normalization feature and the key normalization feature are encoded respectively to obtain the query basic quantum state corresponding to the query normalization feature and the basic bond quantum state corresponding to the key normalization feature; The query quantum state and the fundamental bond quantum state are transformed by the quantum unitary evolution operator to obtain the query quantum state corresponding to the query matrix and the bond quantum state corresponding to the bond matrix.

8. The method according to claim 5, characterized in that, The step of determining the value feature matrix based on the gating unit of the large model and the value matrix includes: The value matrix is ​​subjected to global average pooling along the lexical sequence dimension of the input text of the model to obtain a pooling vector, which is used to characterize the overall distribution features of the value matrix in the lexical sequence. The pooling vector is input into the gating unit of the large model. After the gating unit performs linear transformation and activation function processing on the pooling vector, the gating coefficient set output by the gating unit is obtained. The gating coefficients at different index positions in the gating coefficient set correspond to each decomposition unit in the matrix multiplication operator tensor network. Based on the gating coefficient corresponding to each decomposition unit, a linear difference is made between the preset minimum key dimension and the preset maximum key dimension to obtain the dynamic key dimension of each decomposition unit. Based on the dynamic key dimension of each decomposition unit, the value matrix is ​​subjected to matrix product operator tensor decomposition to obtain the value feature matrix.

9. The method according to claim 1, characterized in that, The step of determining the fine-tuned output features based on the attention weight matrix and the value feature matrix includes: The product of the attention weight matrix and the value feature matrix is ​​determined as the fine-tuned output feature.

10. The method according to claim 1, characterized in that, The fine-tuned output features are the features output by the attention layer in the large model, which also includes a result output network layer; after determining the fine-tuned output features based on the attention weight matrix and the value feature matrix, the method further includes: The fine-tuned output features are input into the result output network layer to obtain the predicted output result corresponding to the input text of the model. The prediction loss value is determined based on the predicted output and the labeled data corresponding to the input text of the model. Based on the predicted loss value, determine the first gradient of the rotation angle of each quantum gate in the quantum unitary evolution operator; and based on the predicted loss value, determine the second gradient of the weight of each linear transformation layer in the gated unit. The first training parameters of the quantum unitary evolution operator are adjusted according to the first gradient; and the second training parameters of the gating unit are adjusted according to the second gradient.

11. The method according to claim 10, characterized in that, Before determining the first gradient of the quantum gate rotation angle in the quantum unitary evolution operator based on the predicted loss value, the method further includes: The quantum state data of each layer of quantum circuits of the quantum unitary evolution operator is obtained when it runs on the quantum chip. The quantum state data is used to characterize the quantum state distribution information of the quantum state corresponding to the model input text after unitary transformation of each layer of quantum circuits on the quantum chip. Determining the first gradient of the quantum gate rotation angle in the quantum unitary evolution operator based on the predicted loss value includes: Based on the predicted loss value, the quantum state data, and the Hamiltonian of the quantum unitary evolution operator, the first gradient of the predicted loss value with respect to the rotation angle of each quantum gate is determined.

12. The method according to claim 10, characterized in that, The step of determining the second gradient of the weights of each linear transform layer in the gating unit based on the predicted loss value includes: Based on the predicted loss value, the attention weight matrix, the third gradient, and the fourth gradient, determine the second gradient of the weights of each linear transformation layer in the gating unit; Wherein, the third gradient is the gradient of the value feature matrix with respect to the dynamic key dimension of each decomposition unit in the gating unit, and the fourth gradient is the gradient of the gating coefficient of the gating unit with respect to the linear output.

13. A model parameter adjustment device, characterized in that, include: The acquisition module is used to obtain the embedding feature matrix of the input text of a large model; The determination module is used to determine the dynamic circuit depth of the quantum circuit based on the comprehensive complexity data corresponding to the embedded feature matrix. The comprehensive complexity data is used to characterize the semantic complexity of the input text of the model. The comprehensive complexity data is determined by the information entropy and feature dispersion of the embedded feature matrix. The dynamic circuit depth is the number of quantum gate layers required for the quantum circuit to process the input text of the model on the quantum chip. The processing module is used to process the attention projection features of the model input text according to the quantum unitary evolution operator of the dynamic line depth and the gating unit of the large model to obtain an attention weight matrix and a value feature matrix. The attention weight matrix is ​​used to characterize the semantic association strength between each word in the model input text, and the value feature matrix is ​​used to characterize the semantic representation strength of each word in each feature dimension. The determining module is further configured to determine fine-tuned output features based on the attention weight matrix and the value feature matrix. The fine-tuned output features are used to determine the prediction loss of the large model on downstream tasks. The prediction loss is used to adjust the first training parameters of the quantum unitary evolution operator and the second training parameters of the gating unit.

14. A computer device, characterized in that, The computer device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the model parameter adjustment method as described in any one of claims 1-12.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the model parameter adjustment method as described in any one of claims 1-12.

16. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the model parameter adjustment method as described in any one of claims 1-12.