Super-network training method and device for generating low-rank adapter parameters

By generating the hypernetwork training method of low-rank adapter parameters, the difficulties of existing hypernetwork in training stability and adaptation of few-sample tasks are solved, and more efficient cross-task generalization and stability are achieved.

CN119474725AInactive Publication Date: 2025-02-18BEIJING DEEPLANG AI TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411501656.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing hypernetwork has stability problems during training and has difficulties in adapting to small-sample tasks, mainly because the optimization signal is not direct and the task information is not representative enough.

Method used

A hypernetwork training method is proposed to generate low-rank adapter parameters. By obtaining multi-task instruction data, low-rank adaptive parameters are generated based on input information, and the input information is processed and parameter optimization is optimized using the underlying model of the hypernetwork. The method includes automatically selecting a task example using gradient-based impact estimation and employing truth-guided training objectives to improve training stability and performance.

Benefits of technology

By generating the hypernetwork training method of low-rank adapter parameters, the performance of hypernetwork in cross-task generalization and small sample adaptation is improved, and training stability and efficiency are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474725A_ABST
    Figure CN119474725A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a super network training method and device for generating low-rank adapter parameters, and the method comprises the steps: obtaining multi-task instruction data as input information, and generating low-rank adaptation parameters based on the input information; optimizing the super network based on the data obtained after the input information is processed by a bottom layer model of the super network and the low-rank adaptation parameters; wherein task examples in the multi-task instruction data are obtained through automatic selection based on gradient influence estimation; the training target is a training target guided by a true value. A text encoder and a parameter generator are included, and super-network pre-training on multi-task compliance instruction data and generalization fine tuning using sparse task data are carried out; training loss and an automatic example selection strategy are constrained, and training stability and performance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a super network training method and device for generating low-rank adapter parameters. Background Art

[0002] In the field of natural language processing, how to better generalize pre-trained language models (PLMs) across tasks is a crucial research direction. Cross-task generalization means that a model can perform well on different tasks, not just the task it was originally trained on. Although fine-tuning and contextual learning are effective ways to adapt language models to new tasks, they are costly and inefficient. Recently, some researchers have focused on using hypernetworks to achieve efficient cross-task generalization. Hypernetworks refer to a method of using one network (also called a hypernetwork) to generate weights for another network. Here, hypernetworks generate task-specific network parameters based on task-oriented information. The task-specific information includes task descriptions, task examples, etc. However, due to the indirect optimization signal for hypernetworks and the fact that task information may not be representative enough, the training of hypernetworks often lacks stability. In addition, most previous works use general corpora to train hypernetworks, which makes it difficult to adapt to few-shot tasks. Summary of the invention

[0003] The main purpose of the present disclosure is to provide a hypernetwork training method and transposition for generating low-rank adapter parameters.

[0004] In order to achieve the above-mentioned purpose, according to the first aspect of the present disclosure, a hypernetwork training method for generating low-rank adapter parameters is provided, including obtaining multi-task instruction data as input information, and generating low-rank adaptation parameters based on the input information; optimizing the hypernetwork based on the underlying model of the hypernetwork, the data processed by the input information, and the low-rank adaptation parameters; wherein the task examples in the multi-task instruction data are automatically selected based on the influence estimation of the gradient; and the training target is a truth-guided training target.

[0005] Optionally, the hypernetwork includes a text encoder and a parameter generator, wherein the text encoder encodes input information; the parameter generator extracts a fixed number of outputs from the text encoder to generate low-rank adaptive parameters, wherein the parameter generator includes a generator module for a decoder and for generating task parameters for the underlying model of the hypernetwork.

[0006] Optionally, the feature encoded by the text encoder is H e=Enc(x), where H e is the encoded task feature, Enc represents the encoded pre-trained language model, x represents the task information, x = [x i ;x e ], x i is the task instruction, x e Refers to the task example.

[0007] Optionally, the generator module is based on a two-layer multi-layer perceptron MLP q,A 、MLP q,B Generate the low-rank adaptation parameters A and B of the underlying model: in Yes H d The i-th vector of is the parameter used to adjust the query weight of the i-th attention layer, MLP stands for the trained multi-layer perceptron; H d = Dec(H e ; E), where H d is the output feature of the decoder, which is used to generate parameters; E represents the learnable task information embedding, and Dec represents the generator used.

[0008] Optionally, obtaining multi-task instruction data as input information and generating low-rank adaptation parameters based on the input information includes: receiving a task instruction of task τ and k task examples as input x τ , and generate low-rank adaptation parameters: φ τ =H(x τ ;θ).

[0009] Optionally, the underlying model based on the hypernetwork processes the data after the input information is processed, and the low-rank adaptive parameter optimizes the hypernetwork, including: the underlying model M(·;ξ) receives the query q of the task τ, and uses the generated low-rank adaptive parameter φ to generate a response; optimizes the hypernetwork according to the prediction of the underlying model: min θ E τ∈T,(q,a)∈Dτ L(M(q;ξ,φ τ ), a), where a is the correct response to query q, T is the set of pre-trained tasks, ξ is the underlying model parameter, and Dτ is the dataset of the task.

[0010] Optionally, the gradient-based influence estimation for automatically selecting task examples includes: converting the task examples into vector representations; clustering the vectors using a k-means clustering algorithm to obtain k clusters, and the ones closest to the cluster centers are sampled as screened task examples; preheating the hypernetwork using the screened task examples; calculating the gradient-based influence score of each task example based on the trained hypernetwork: and determining the final task example based on the influence score.

[0011] Optionally, the training objective is a truth-guided training objective including: optimizing low-rank adaptation parameters for task τ based on the underlying model, and constraining the generation process of low-rank adaptation parameters based on the low-rank adaptation parameters.

[0012] According to a second aspect of the present disclosure, a hypernetwork training device for generating low-rank adapter parameters is provided, comprising: a parameter generation unit for acquiring multi-task instruction data as input information, and generating low-rank adaptation parameters based on the input information; an optimization unit for optimizing the hypernetwork based on the underlying model of the hypernetwork, the data processed by the input information, and the low-rank adaptation parameters; wherein the task examples in the multi-task instruction data are automatically selected based on the influence estimation of the gradient; and the training target is a truth-guided training target.

[0013] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, storing computer instructions, wherein the computer instructions are used to enable the computer to execute the method described in any one of the implementation modes of the first aspect.

[0014] The present embodiment provides a hypernetwork training method and device for generating low-rank adapter parameters, wherein the method includes obtaining multi-task instruction data as input information, and generating low-rank adaptation parameters based on the input information; optimizing the hypernetwork based on the underlying model of the hypernetwork, the data processed by the input information, and the low-rank adaptation parameters; wherein the task examples in the multi-task instruction data are automatically selected based on the influence estimation of the gradient; and the training target is a truth-guided training target. By including a text encoder and a parameter generator, the hypernetwork pre-training on the multi-task compliance instruction data and the generalization fine-tuning using sparse task data; constraining the training loss and the automatic example selection strategy, the training stability and performance are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 is a flow chart of a super network training method for generating low-rank adapter parameters according to an embodiment of the present disclosure;

[0017] Figure 2 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the scheme of the present disclosure, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present disclosure.

[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0020] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0021] According to an embodiment of the present disclosure, a method for training a super network for generating low-rank adapter parameters is provided, such as Figure 1 As shown, it includes the following steps 101 to 102:

[0022] Step 101: Acquire multi-task instruction data as input information, and generate low-rank adaptation parameters based on the input information.

[0023] In this step, previous hypernetwork-based methods pre-train the hypernetwork using a general corpus, which may limit its generalization ability to new tasks. To alleviate this problem, we design a pre-training phase with multi-task instruction data to enable HyperLoRA to have the ability to convert various task information into LoRA modules.

[0024] As an optional implementation of this embodiment, obtaining multi-task instruction data as input information and generating low-rank adaptation parameters based on the input information includes: receiving a task instruction of task τ and k task examples as input x τ , and generate low-rank adaptation parameters: Φ τ =H(x τ ;θ).

[0025] In this optional implementation, the parameterized HyperLoRA is represented as θ, that is, H(·;θ). In each training iteration, HyperLoRA receives the task instruction of task τ and k sample task examples as input x τ , and generate the LoRA parameters: Φ τ =H(x τ ;θ).

[0026] Step 102: Optimize the data after the input information processing and the low-rank adaptive parameters of the hypernetwork based on the underlying model of the hypernetwork, wherein the task examples in the multi-task instruction data are automatically selected based on the influence estimation of the gradient; and the training target is a truth-guided training target.

[0027] In this step, the underlying model M(·; ξ) receives the query q of task τ and generates a response using the generated LoRA parameters φ fusion; HyperLoRA is then optimized based on the predictions of the underlying model.

[0028] Task instructions and task examples are crucial for hypernetworks to capture task features and generate task-specific parameters. However, previous studies construct task examples by manually constructing or randomly sampling from datasets, which may affect parameter generation and lead to suboptimal performance. We introduce an automatic example selection method via gradient-based influence estimation.

[0029] Furthermore, the most challenging aspect of hypernetwork training is its instability, which can be attributed to multiple aspects: (1) Weight initialization. The way weights are initialized has a significant impact on the convergence and stability of hypernetwork training. (2) The difference between input and output. There is a large difference between the representation space of the input text and the output parameters, which may harm the stability of hypernetwork training. (3) Indirect objectives in an end-to-end differentiable manner. During the training phase, the optimization of the hypernetwork relies on the back-propagated gradients from the underlying model. However, the constrained objectives are tailored for the underlying model rather than the hypernetwork. To address the above issues, we experiment with various hypernetwork initialization configurations (including scale, type, and initialization method) and find that reusing weights from the underlying model produces the most favorable results in terms of performance and training convergence. Importantly, we propose a truth-guided training objective to incorporate a more direct weight space constraint loss for the hypernetwork.

[0030] As an optional implementation of this embodiment, the underlying model based on the hypernetwork processes the data after the input information is processed, and the low-rank adaptive parameter optimizes the hypernetwork, including: the underlying model M(·;ξ) receives the query q of the task τ, and uses the generated low-rank adaptive parameter φ to fuse and generate a response; the hypernetwork is optimized according to the prediction of the underlying model:

[0031] min θ E τ∈T,(q,a)∈Dτ L(M(q;ξ,Φ τ ), a), where a is the correct response to query q, T is the set of pre-trained tasks, ξ is the underlying model parameter, and Dτ is the dataset of the task.

[0032] In this optional implementation, the parameterized HyperLoRA is represented as θ, that is, H(·;θ). In each training iteration, HyperLoRA receives the task instruction of task τ and k sample task examples as input x τ , and generate the LoRA parameters: Φ τ =H(x τ ; θ); The underlying model M(·; ξ) receives the query q of task τ and generates a response using the generated LoRA parameter φ fusion. Then, HyperLoRA is optimized based on the prediction of the underlying model: min θ E τ∈T,(q,a)∈Dτ L(M(q;ξ,Φ τ ), a), where a is the correct response to query q, T is the set of pre-training tasks, ξ is the underlying model parameters, and Dτ is the dataset of the task. During the pre-training phase, only HyperLoRA is trained and the underlying model remains frozen. Therefore, for specific task information, the generated parameters φ can be calculated once and then reused for downstream predictions in inference or further adjustment scenarios, which saves memory and computation. In order to train HyperLoRA robustly and efficiently, a gradient-based example selection method is introduced and a truth-guided training objective is adopted.

[0033] As an optional implementation method of this embodiment, the gradient-based influence estimation for automatic selection of task examples includes: converting the task example into a vector representation; clustering the vector using a k-means clustering algorithm to obtain k clusters, and the ones closest to the cluster centers are sampled as screened task examples; preheating the hypernetwork using the screened task examples; calculating the gradient-based influence score of each task example based on the trained hypernetwork: and determining the final task example based on the influence score.

[0034] In this optional implementation, we first perform example pre-screening through embedding and clustering. Specifically, each instance of the task τ∈T is converted into a vector representation using Sentence-BERT, and then the context vectors are clustered using the k-means clustering algorithm to produce k clusters. The instances closest to the cluster center are sampled as the screened task examples. Secondly, the hypernetwork is pre-trained using the preliminarily selected examples. Finally, the gradient-based influence score of each example is calculated based on the trained hypernetwork: Among them, d τ and t τ refer to the examples and test samples of task τ respectively, is the learning rate during the i-th epoch, is the loss function, θ i is the vectorized LoRA parameter. The influence score calculated above reflects the importance of the example to the test sample, so the example with a higher score is selected as the final representative example.

[0035] As an optional implementation method of this embodiment, the training objective is a truth-value guided training objective including: optimizing the low-rank adaptation parameters for the task τ based on the underlying model, and constraining the generation process of the low-rank adaptation parameters based on the low-rank adaptation parameters.

[0036] In this alternative implementation, the truth-guided training objective incorporates a more direct weight space constraint loss for the hypernetwork. In this approach, we pre-optimize the LoRA parameters for task τ using the underlying model Then use to constrain the generation process.

[0037] The above optional implementation utilizes a constrained training loss and a gradient-based example selection strategy to improve training stability and performance.

[0038] As an optional implementation of this embodiment, the hypernetwork includes a text encoder and a parameter generator, wherein the text encoder encodes input information; the parameter generator extracts a fixed number of outputs from the text encoder to generate low-rank adaptive parameters, wherein the parameter generator includes a decoder and a generator module for generating task parameters for the underlying model of the hypernetwork.

[0039] In this optional implementation, the hypernetwork that generates low-rank adapter parameters can convert task instructions into a LoRA module, which consists of a text encoder that converts task information into a continuous vector representation; a parameter generator to promote the interaction between the encoded instruction information and a set of trainable embeddings, thereby playing the role of synthesizing low-rank adaptation (LoRA) parameters.

[0040] As an optional implementation of this embodiment, the feature encoded by the text encoder is H e =Enc(x), where H e is the encoded task feature, Enc represents the encoded pre-trained language model, represents the task information, x = [x i ;x e ], x i is the task instruction, x e Refers to the task example.

[0041] In the above optional implementation, in order to effectively encode the task information, a pre-trained language model encoder is used to initialize the text encoder. i ;x e ] as input, where x i is the task instruction, x e Refers to the task example. Encode x as follows: H e =Enc(x), where H e is the encoded task feature, Enc represents the encoded pre-trained language model, and x represents the task information.

[0042] The parameter generator plays a key role in connecting the text representation space and the low-rank parameter space. It extracts a fixed number of output features from the text encoder to generate parameters. The parameter generator consists of two submodules: (1) a decoder that extracts task features. (2) a generator module that generates task parameters for the underlying model.

[0043] As an optional implementation of this embodiment, the generator module is based on a two-layer multi-layer perceptron MLP q,A 、MLP q,B Generate the low-rank adaptation parameters A and B of the underlying model: in Yes H d The i-th vector of is the parameter used to adjust the query weight of the i-th attention layer, MLP stands for the trained multi-layer perceptron; H d = Dec(H e ; E), where H d is the output feature of the decoder, which is used to generate parameters; E represents the learnable task information embedding, and Dec represents the generator used.

[0044] In this optional implementation, a certain number of learnable task information embeddings are created for the decoder input, denoted as E = [e1, ...e1), where l is the number of layers in the underlying model. The task information interacts with each other through the self-attention layer and with the task features H through the cross-attention layer. e Interaction: Hd = Dec(H e ; E), where H d is the output feature of the decoder, ready to be used to generate parameters; H e Represents the encoded task features obtained above, E represents the learnable task information embedding, and Dec represents the generator used. The generator module of the parameter generator aims to conditionally generate the LoRA parameters of the underlying model based on the output features through some two-layer multi-layer perceptron (MLP) modules. Separate networks are used for different LoRA weights, while sharing between layers. Take the query weight W in the attention module q For example, through MLP q,A and MLP q,B W of all layers q Generate low-rank parameters A and B:

[0045]

[0046] in Yes H d The i-th vector of is the parameter used to adjust the query weight of the ith attention layer, and MLP stands for the trained multi-layer perceptron.

[0047] This embodiment proposes an efficient cross-task generalization method HyperLoRA, which includes a text encoder and a parameter generator for converting task information into a low-rank adaptation (LoRA) module; in order to enhance the generalization ability of the hypernetwork, a paradigm is proposed, which combines hypernetwork pre-training on multi-task instruction-following data and generalization fine-tuning using sparse task data; a constrained training loss and automatic example selection strategy are developed to improve training stability and performance; experimental and analysis results in cross-task generalization and few-sample adaptation scenarios demonstrate the effectiveness of the proposed method.

[0048] Compared with contextual learning and parameter efficient fine-tuning (PEFT), the method is more efficient and reduces training and storage costs. In addition, a paradigm including multi-task instruction pre-training and generalization fine-tuning is proposed for the hypernetwork. Through comprehensive experiments and analysis on four benchmark datasets, it is shown that HyperLoRA achieves better results than a series of multi-task learning and hypernetwork-based methods.

[0049] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0050] According to an embodiment of the present disclosure, a hypernetwork training device for generating low-rank adapter parameters is also provided, including a parameter generation unit for acquiring multi-task instruction data as input information, and generating low-rank adaptation parameters based on the input information; an optimization unit for optimizing the hypernetwork based on the underlying model of the hypernetwork, the data processed by the input information, and the low-rank adaptation parameters; wherein the task examples in the multi-task instruction data are automatically selected based on the influence estimation of the gradient; and the training target is a truth-guided training target.

[0051] As an optional implementation of this embodiment, the hypernetwork includes a text encoder and a parameter generator, wherein the text encoder encodes input information; the parameter generator extracts a fixed number of outputs from the text encoder to generate low-rank adaptive parameters, wherein the parameter generator includes a decoder and a generator module for generating task parameters for the underlying model of the hypernetwork.

[0052] As an optional implementation of this embodiment, the feature encoded by the text encoder is H e =Enc(x), where H e is the encoded task feature, Enc represents the encoded pre-trained language model, x represents the task information, x = [x i ;x e ], x i is the task instruction, x e Refers to the task example.

[0053] As an optional implementation of this embodiment, the generator module is based on a two-layer multi-layer perceptron MLP q,A 、MLP q,B Generate the low-rank adaptation parameters A and B of the underlying model: in Yes H d The i-th vector of is the parameter used to adjust the query weight of the i-th attention layer, MLP stands for the trained multi-layer perceptron; H d = Dec(H e ; E), where H d is the output feature of the decoder, which is used to generate parameters; E represents the learnable task information embedding, and Dec represents the generator used.

[0054] As an optional implementation of this embodiment, obtaining multi-task instruction data as input information and generating low-rank adaptation parameters based on the input information includes: receiving a task instruction of task τ and k task examples as input x τ , and generate low-rank adaptation parameters: Φ τ =H(x τ;θ).

[0055] As an optional implementation method of this embodiment, the underlying model based on the hypernetwork processes the data after the input information is processed, and the low-rank adaptive parameter optimizes the hypernetwork, including: the underlying model M(·;ξ) receives the query q of the task τ, and uses the generated low-rank adaptive parameter φ to fuse and generate a response; optimizes the hypernetwork according to the prediction of the underlying model: min θ E τ∈T,(q,a)∈Dτ L(M(q;ξ,Φ τ ), a), where a is the correct response to query q, T is the set of pre-trained tasks, ξ is the underlying model parameter, and Dτ is the dataset of the task.

[0056] As an optional implementation method of this embodiment, the gradient-based influence estimation for automatic selection of task examples includes: converting the task example into a vector representation; clustering the vector using a k-means clustering algorithm to obtain k clusters, and the ones closest to the cluster centers are sampled as screened task examples; preheating the hypernetwork using the screened task examples; calculating the gradient-based influence score of each task example based on the trained hypernetwork: and determining the final task example based on the influence score.

[0057] As an optional implementation method of this embodiment, the training objective is a truth-value guided training objective including: optimizing the low-rank adaptation parameters for the task τ based on the underlying model, and constraining the generation process of the low-rank adaptation parameters based on the low-rank adaptation parameters.

[0058] According to an embodiment of the present invention, the present invention also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can implement the method described in any of the above embodiments when executing.

[0059] According to an embodiment of the present invention, the present invention further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the method described in any of the above embodiments when executed.

[0060] According to an embodiment of the present invention, the present invention further provides a computer program product, which can implement the method described in any of the above embodiments when executed by a processor.

[0061] Figure 2A schematic block diagram of an example electronic device 300 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices.

[0062] like Figure 2 As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0063] A number of components in the electronic device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0064] The computing unit 301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above, such as the object matching method. For example, in some embodiments, the object matching method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the method described above may be performed.

[0065] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0066] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0067] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

Claims

1. A super network training method for generating low-rank adapter parameters, characterized in that include: Acquire multi-task instruction data as input information, and generate low-rank adaptation parameters based on the input information; Optimizing the hypernetwork based on the data processed by the input information and the low-rank adaptation parameters of the hypernetwork; wherein the task examples in the multi-task instruction data are automatically selected based on the influence estimation of the gradient; The training objective is a truth-value guided training objective.

2. The method for training a super network to generate low-rank adapter parameters according to claim 1, characterized in that: The hypernetwork includes a text encoder and a parameter generator, wherein the text encoder encodes input information; the parameter generator extracts a fixed number of outputs from the text encoder to generate low-rank adaptive parameters, wherein the parameter generator includes a generator module for a decoder and for generating task parameters for the underlying model of the hypernetwork.

3. The method for training a super network to generate low-rank adapter parameters according to claim 2, characterized in that: The feature after the text encoder is encoded is H e =Enc(x), where H e is the encoded task feature, Enc represents the encoded pre-trained language model, x represents the task information, x = [x i ;x e ], x i is the task instruction, x e Refers to the task example.

4. The method for training a super network to generate low-rank adapter parameters according to claim 3, characterized in that: The generator module is based on a two-layer multi-layer perceptron MLP q,A 、MLP q,B Generate the low-rank adaptation parameters A and B of the underlying model: in Yes H d The i-th vector of is the parameter used to adjust the query weight of the i-th attention layer, MLP stands for the trained multi-layer perceptron; H d = Dec(H e ; E), where H d is the output feature of the decoder, which is used to generate parameters; E represents the learnable task information embedding, and Dec represents the generator used.

5. The method for training a super network to generate low-rank adapter parameters according to claim 1, characterized in that: Acquiring multi-task instruction data as input information and generating low-rank adaptation parameters based on the input information includes: receiving a task instruction of task τ and k task examples as input xi, and generating a low-rank adaptation parameter: Φ τ =H(x τ ;θ)).

6. The method for training a super network to generate low-rank adapter parameters according to claim 1, characterized in that: The underlying model based on the hypernetwork optimizes the data processed by the input information and the low-rank adaptive parameters of the hypernetwork, including: The underlying model M(·;ξ)) receives a query q for task τ and generates a response using the generated low-rank adaptation parameters φ. Optimize the hypernetwork based on the predictions of the underlying model: Among them, a is the correct response to query q, T is the set of pre-training tasks, ξ is the underlying model parameter, and Dτ is the dataset of the task.

7. The method for training a super network to generate low-rank adapter parameters according to claim 1, characterized in that: Examples of the gradient-based influence estimation automatic selection task include: Convert the task examples into vector representations; cluster the vectors using a k-means clustering algorithm to obtain k clusters, and the ones closest to the cluster centers are sampled as the screened task examples; Pre-train the hypernetwork using selected task examples; A gradient-based influence score is calculated for each task example based on the trained hypernetwork: a final task example is determined based on the influence score.

8. The method for training a super network to generate low-rank adapter parameters according to claim 1, characterized in that: The training objectives guided by truth values ​​include: optimizing low-rank adaptation parameters for task T based on the underlying model, and constraining the generation process of low-rank adaptation parameters based on the low-rank adaptation parameters.

9. A super network training device for generating low-rank adapter parameters, characterized in that include: a parameter generating unit, configured to obtain multi-task instruction data as input information, and generate low-rank adaptation parameters based on the input information; An optimization unit, configured to optimize the hypernetwork based on the underlying model of the hypernetwork, the data processed by the input information, and the low-rank adaptation parameters; wherein the task examples in the multi-task instruction data are automatically selected based on the influence estimation of the gradient; The training objective is a truth-value guided training objective.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Multi-scene user controllable personalized recommendation method and system based on super network adaptation

    CN121481678A

  • Multi-task learning framework training method and system of power system, electronic equipment and medium

    CN122112646A

  • Power system multitask learning framework training method and system, electronic device, and medium

    CN122112646B