Large model fine tuning method and device for digital health robot and medium

By fine-tuning the weight matrix using random singular value decomposition and resampling techniques in large models, the problems of inefficient and insufficient generalization capabilities in existing large models in embodied applications are solved, and more efficient and stable model performance is achieved.

CN119886256AInactive Publication Date: 2025-04-25CENT SOUTH UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510386180.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing large models have problems with inefficiency and insufficient generalization capabilities in embodied applications, especially in the field of digital health robots.

Method used

Random singular value decomposition and resampling techniques are used to fine-tune the weight matrix of the large model, generate low-rank approximation and residual matrix, and update the model parameters to suit the embodied task scenario.

Benefits of technology

It improves the fine-tuning efficiency of large models in digital health robots, enhances the generalization ability and performance stability of the model, and solves the problems of computing resource limitation and applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886256A_ABST
    Figure CN119886256A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical body-equipped robots, in particular to a digital health robot-oriented large model fine tuning method and device and a medium, and the method comprises the steps: carrying out the random singular value decomposition of a pre-trained weight matrix of a body-equipped large model, and carrying out the resampling of a random Gaussian initialization matrix; and high-efficiency fine tuning of the body large model parameters of the digital health robot is realized. According to the method, random singular value decomposition is introduced during fine tuning of a large body model of the digital health robot, and the random singular value decomposition approximately calculates main components of a matrix by introducing random sampling, so that key information of the matrix is reserved as far as possible while the calculation efficiency is kept.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical embodied robots, and in particular to a large model fine-tuning method, device and medium for a digital health robot. Background Art

[0002] With the continuous improvement of the capabilities of big models and the continuous improvement of teaching data, simulation platforms, and task sets in embodied intelligence, the combination of big models and embodied intelligence will become the next wave of artificial intelligence. In order to allow big models to run on digital health robots and adapt to embodied applications, it is necessary to lightweight the big models so that the big models can maintain the capabilities of embodied reasoning and decision-making while reducing model complexity. When the big model directly generates task planning, it relies on the knowledge encoded in the model. Since the big model lacks relevant knowledge of embodied task planning and does not adjust the big model parameters during embodied task planning, the big model needs to use additional feedback modules to iterate the unreasonable plans generated. In order for the big model to realize embodied applications, it is usually necessary to fine-tune the usage scenario to adapt it to the embodied intelligence task scenario.

[0003] Currently, LoRA is the most common lightweight fine-tuning technique for large models, which fine-tunes model parameters to retain as much knowledge structure encoded in the large model as possible. However, LoRA and other similar methods usually use randomly initialized low-rank matrices, which may lead to inefficiency in the gradient descent process, and at the same time, due to the unsatisfactory starting point, it will reduce the generalization ability of the model.

[0004] In summary, there is an urgent need for a large model fine-tuning method, device and medium for digital health robots to solve the problems in the existing technology. Summary of the invention

[0005] The object of the present invention is to provide a large model fine-tuning method, device and medium for a digital health robot. The specific technical scheme is as follows: A large model fine-tuning method for a digital health robot comprises the following steps: S1: Obtain an embodied large model for a digital health robot and decompose the pre-trained weight matrix into an approximation matrix and a residual matrix; S2: Randomly sample the approximate matrix and the residual matrix to generate random Gaussian initialization matrices of the approximate matrix and the residual matrix, calculate the first matrix based on the approximate matrix, and calculate the second matrix based on the residual matrix; S3: performing orthogonal triangular decomposition on the first matrix to obtain a first orthogonal matrix and a first upper triangular matrix, and performing orthogonal triangular decomposition on the second matrix to obtain a second orthogonal matrix and a second upper triangular matrix; S4: Calculate a low-rank approximation matrix based on the first orthogonal matrix, and calculate a low-rank residual matrix based on the second orthogonal matrix; S5: Perform singular value decomposition on the low-rank approximation matrix and the low-rank residual matrix respectively to obtain singular value results; S6: Update the approximate matrix and the residual matrix based on the singular value results; S7: Resample the approximate matrix and the residual matrix to generate a new random Gaussian initialization matrix, right-multiply the new random Gaussian initialization matrix to the first matrix and the second matrix to generate a new first matrix and a new second matrix, repeat the process from S3 to S6 using the new first matrix and the new second matrix, output the updated approximate matrix and residual matrix, obtain the updated weight matrix based on the approximate matrix and the residual matrix, pre-train the embodied large model based on the updated weight matrix, and complete the large model fine-tuning method of the digital health robot.

[0006] Preferably, in S2, the rank is The weight matrix of the approximation matrix , generating a The random Gaussian initialization matrix , calculate the first matrix ; For the residual matrix , generating a The random Gaussian initialization matrix , calculate the second matrix .

[0007] Preferably, in S3, for the first matrix Perform orthogonal triangular decomposition, the expression is as follows: ; in, Represents the first orthogonal matrix, which is orthogonal to the column vectors matrix; represents the first upper triangular matrix, which is Matrix of For the second matrix Perform orthogonal triangular decomposition, the expression is as follows: ; in, Represents the second orthogonal matrix, which is orthogonal to the column vectors matrix; represents the second upper triangular matrix, which is The matrix of .

[0008] Preferably, in S4, the low-rank approximation matrix is ​​calculated , a low-rank approximation matrix is a Matrix, where Represents the transpose of a matrix; computes the low-rank residual matrix , the low-rank residual matrix is a matrix.

[0009] Preferably, in S5, singular value decomposition is performed on the low-rank approximation matrix and the low-rank residual matrix respectively, and the expressions are as follows: ; ; in, and represents the singular vector matrix, Indicates trainable matrix parameters, subscript and Used to distinguish between low-rank approximation matrices and low-rank residual matrices.

[0010] Preferably, in S6, the update equations of the approximation matrix and the residual matrix are as follows: ; ; in, and Represent the trainable parameter matrices, i.e., singular values, of the approximation matrix and the residual matrix, respectively.

[0011] Additionally, a computer device includes a memory and a processor; The memory is used to store a computer program executable on the processor; The processor is used to implement the steps of the large model fine-tuning method as described above when executing the computer program.

[0012] In addition, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the large model fine-tuning method as described above are implemented.

[0013] The application of the technical solution of the present invention has the following beneficial effects: (1) The present invention provides a large model fine-tuning method for a digital health robot. The present invention method introduces random singular value decomposition when efficiently fine-tuning the embodied large model of the digital health robot: random singular value decomposition approximates the main components of the matrix by introducing random sampling, thereby retaining the key information of the matrix as much as possible while maintaining computational efficiency. Since the random singular value decomposition process is easier to parallelize, it is particularly useful for large-scale data sets. Large-scale data sets are required when training the embodied large model of the digital health robot. The present invention method solves the problem of computing resource limitations.

[0014] (2) The method of the present invention applies a resampling method when fine-tuning the embodied large model using random singular value decomposition, which can obtain different dimensionality reduction results, thereby achieving better data distribution and enhancing the stability of model performance. The method of the present invention solves the problems of applicability limitation, singular value selection, and generalization ability; at the same time, the use of hyperparameters to control the resampling frequency solves the problems of model complexity, hyperparameter adjustment, long-term maintenance and updating.

[0015] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0017] Figure 1 It is a flow chart of the steps of the large model fine-tuning method in the preferred embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0019] like Figure 1 As shown, this embodiment provides a large model fine-tuning method for a digital health robot, comprising the following steps: A large model fine-tuning method for a digital health robot comprises the following steps: S1: Obtain an embodied large model for the digital health robot and convert the pre-trained weight matrix Decompose into approximate matrices and the residual matrix , the expression is , the rank of the approximate matrix is .

[0020] S2: Randomly sample the approximate matrix and the residual matrix to generate random Gaussian initialization matrices of the approximate matrix and the residual matrix, calculate the first matrix based on the approximate matrix, and calculate the second matrix based on the residual matrix.

[0021] Specifically, the rank is The weight matrix of the approximation matrix , generating a The random Gaussian initialization matrix , calculate the first matrix ; For the residual matrix , generating a The random Gaussian initialization matrix , calculate the second matrix .

[0022] S3: Perform orthogonal triangular decomposition on the first matrix to obtain a first orthogonal matrix and a first upper triangular matrix, and perform orthogonal triangular decomposition on the second matrix to obtain a second orthogonal matrix and a second upper triangular matrix.

[0023] Specifically, for the first matrix Perform orthogonal triangular decomposition, the expression is as follows: ; in, Represents the first orthogonal matrix, which is orthogonal to the column vectors matrix; represents the first upper triangular matrix, which is Matrix of For the second matrix Perform orthogonal triangular decomposition, the expression is as follows: ; in, Represents the second orthogonal matrix, which is orthogonal to the column vectors matrix; represents the second upper triangular matrix, which is The matrix of .

[0024] S4: Calculate a low-rank approximation matrix based on the first orthogonal matrix, and calculate a low-rank residual matrix based on the second orthogonal matrix.

[0025] Specifically, calculate the low-rank approximation matrix , a low-rank approximation matrix is a Matrix, where Represents the transpose of a matrix; computes the low-rank residual matrix , the low-rank residual matrix is a matrix.

[0026] S5: Perform singular value decomposition on the low-rank approximation matrix and the low-rank residual matrix respectively to obtain singular value results.

[0027] Specifically, the low-rank approximation matrix and the low-rank residual matrix are decomposed by singular values, and the expressions are as follows: ; ; in, and represents the singular vector matrix, Indicates trainable matrix parameters, subscript and Used to distinguish between low-rank approximation matrices and low-rank residual matrices.

[0028] S6: Update the approximation matrix and the residual matrix based on the singular value results.

[0029] Specifically, the update equations for the approximation matrix and the residual matrix are as follows: ; ; in, and Represent the trainable parameter matrices, i.e., singular values, of the approximation matrix and the residual matrix, respectively.

[0030] S7: Resample the approximate matrix and the residual matrix to generate a new random Gaussian initialization matrix, right-multiply the new random Gaussian initialization matrix to the first matrix and the second matrix to generate a new first matrix and a new second matrix, repeat the process from S3 to S6 using the new first matrix and the new second matrix, output the updated approximate matrix and residual matrix, obtain the updated weight matrix based on the approximate matrix and the residual matrix, pre-train the embodied large model based on the updated weight matrix, and complete the efficient fine-tuning of the embodied large model parameters of the digital health robot.

[0031] In addition, this embodiment also provides a computer device, including a memory and a processor; The memory is used to store a computer program executable on the processor; The processor is used to implement the steps of the above-mentioned large model fine-tuning method when executing the computer program.

[0032] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the computer device.

[0033] The computer device may be a computing device such as a mobile phone, a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may include, but is not limited to, a processor and a memory. For example, the computer device may also include an input / output device, a network access device, a bus, etc.

[0034] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.

[0035] The memory can be used to store the computer program and / or module, and the processor implements the computer program by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0036] Wherein, if the module / unit integrated in the computer device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0037] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned large model fine-tuning method are implemented.

[0038] The embodiment of the present invention provides a large model fine-tuning method for a digital health robot. The method of this embodiment introduces random singular value decomposition when fine-tuning the embodied large model of the digital health robot: random singular value decomposition approximates the main components of the matrix by introducing random sampling, thereby retaining the key information of the matrix as much as possible while maintaining computational efficiency. Since the process of random singular value decomposition is easier to parallelize, it is particularly useful for large-scale data sets. When training the embodied large model of the digital health robot, a large-scale data set needs to be applied. The method of this embodiment solves the problem of computing resource limitations.

[0039] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0040] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A large model fine-tuning method for a digital health robot, characterized in that: The steps include: S1: Obtain an embodied large model for a digital health robot and decompose the pre-trained weight matrix into an approximation matrix and a residual matrix; S2: Randomly sample the approximate matrix and the residual matrix to generate random Gaussian initialization matrices of the approximate matrix and the residual matrix, calculate the first matrix based on the approximate matrix, and calculate the second matrix based on the residual matrix; S3: performing orthogonal triangular decomposition on the first matrix to obtain a first orthogonal matrix and a first upper triangular matrix, and performing orthogonal triangular decomposition on the second matrix to obtain a second orthogonal matrix and a second upper triangular matrix; S4: Calculate a low-rank approximation matrix based on the first orthogonal matrix, and calculate a low-rank residual matrix based on the second orthogonal matrix; S5: Perform singular value decomposition on the low-rank approximation matrix and the low-rank residual matrix respectively to obtain singular value results; S6: Update the approximate matrix and the residual matrix based on the singular value results; S7: Resample the approximate matrix and the residual matrix to generate a new random Gaussian initialization matrix, right-multiply the new random Gaussian initialization matrix to the first matrix and the second matrix to generate a new first matrix and a new second matrix, repeat the process from S3 to S6 using the new first matrix and the new second matrix, output the updated approximate matrix and residual matrix, obtain the updated weight matrix based on the approximate matrix and the residual matrix, and complete the parameter fine-tuning of the embodied large model of the digital health robot based on the updated weight matrix.

2. The large model fine-tuning method according to claim 1, characterized in that: In S2, the rank is The weight matrix of the approximation matrix , generating a The random Gaussian initialization matrix , calculate the first matrix ; For the residual matrix , generating a The random Gaussian initialization matrix , calculate the second matrix .

3. The large model fine-tuning method according to claim 2, characterized in that: In S3, for the first matrix Perform orthogonal triangular decomposition, the expression is as follows: ; in, Represents the first orthogonal matrix, which is orthogonal to the column vectors matrix; represents the first upper triangular matrix, which is Matrix of For the second matrix Perform orthogonal triangular decomposition, the expression is as follows: ; in, Represents the second orthogonal matrix, which is orthogonal to the column vectors matrix; represents the second upper triangular matrix, which is The matrix of .

4. The large model fine-tuning method according to claim 3, characterized in that: In S4, calculate the low-rank approximation matrix , a low-rank approximation matrix is a Matrix, where Represents the transpose of a matrix; computes the low-rank residual matrix , the low-rank residual matrix is a matrix.

5. The large model fine-tuning method according to claim 4, characterized in that: In S5, singular value decomposition is performed on the low-rank approximation matrix and the low-rank residual matrix respectively, and the expressions are as follows: ; ; in, and represents the singular vector matrix, Indicates trainable matrix parameters, subscript and Used to distinguish between low-rank approximation matrices and low-rank residual matrices.

6. The large model fine-tuning method according to claim 5, characterized in that: In S6, the update equations of the approximation matrix and the residual matrix are as follows: ; ; in, and Represent the trainable parameter matrices, i.e., singular values, of the approximation matrix and the residual matrix, respectively.

7. A computer device, characterized in that: including memory and processor; The memory is used to store a computer program executable on the processor; The processor is used to implement the steps of the large model fine-tuning method according to any one of claims 1 to 6 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the large model fine-tuning method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Pre-training visual model parameter fine tuning method based on singular value

    CN119251621A