A method and apparatus for deep inference of large models through self-distillation absorption using computing power in an intelligent computing center cloud platform.
By performing self-distillation absorption deep inference training on large models in the intelligent computing center cloud platform, the problem of large models consuming a large amount of computing resources has been solved, and efficient inference services have been achieved.
Patent Information
- Application Number
- CN202511255196.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-09-04
AI Technical Summary
In existing technologies, large models consume a large amount of computing resources in intelligent computing center cloud platforms, resulting in low service efficiency and an inability to effectively accelerate the deep inference process.
By acquiring multiple sets of initial sample data, constructing multiple sets of first and second sample data, training the initial large model, and obtaining the first large model, the deep inference steps are distilled in the latent space to directly generate inference chain data and response data, thereby reducing the consumption of computing resources.
It improves inference efficiency, reduces computing resource consumption, and enhances the service capabilities of the intelligent computing center cloud platform.
Smart Images

Figure CN120745848B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent computing centers, smart computing centers, computing infrastructure, and smart cloud technologies, specifically to a method and apparatus for a smart computing center cloud platform to perform large-scale model self-distillation absorption deep inference through computing power. Background Technology
[0002] With the rapid development of artificial intelligence technology, "intelligent computing centers" and "smart computing centers" have emerged.
[0003] An "intelligent computing center" refers to a facility that provides the necessary computing power, data, and algorithms for artificial intelligence applications (such as the development, training, and inference of deep learning models) by utilizing large-scale heterogeneous computing resources, including general-purpose and intelligent computing power. Intelligent computing centers encompass facilities, hardware, and software, and can provide full-stack capabilities from underlying computing power to top-level application enablement.
[0004] "Intelligent computing center" includes, but is not limited to, "intelligent computing center".
[0005] "Intelligent computing center" or artificial intelligence computing center is a type of computing infrastructure that provides computing power services, data services, and algorithm services required for artificial intelligence applications, based on artificial intelligence theory and adopting artificial intelligence computing architecture.
[0006] "Computing power" is the core of "intelligent computing center" and "smart computing center". It is the ability of computer equipment or computing / data center to process parameters. It is the ability of computer hardware and software to work together to execute a certain computing requirement. It is the computing power to achieve the target result output by processing parameter data. It is a new type of productivity that integrates parameter computing power, network carrying capacity and data storage capacity. It mainly provides services to society through computing power infrastructure.
[0007] In the large-scale model inference process of the intelligent computing center cloud platform, deep reasoning is required to obtain inference chain data and generate corresponding responses. However, deep reasoning of large models consumes a significant amount of time and computational resources. Existing technologies cannot provide effective ways to accelerate deep reasoning, nor can they skip deep reasoning steps or conceal the generation of deep reasoning steps. Consequently, the intelligent computing center cloud platform cannot provide more services through large models.
[0008] It is evident that existing technologies suffer from the problem that large models consume a significant amount of computing resources, resulting in a limited number of large model services being provided on intelligent computing center cloud platforms. Summary of the Invention
[0009] This invention provides a method and apparatus for deep inference of large models through self-distillation absorption using computing power in an intelligent computing center cloud platform, in order to solve the problem in the prior art that large models occupy a large amount of computing power resources, resulting in very few large model services provided in the intelligent computing center cloud platform.
[0010] To solve the above problems, the present invention is implemented as follows:
[0011] In a first aspect, the present invention provides a method for large-scale model self-distillation absorption deep inference using computing power on an intelligent computing center cloud platform, comprising:
[0012] Step S1: Obtain multiple sets of initial sample data. Each set of initial sample data includes sample questions, sample deep inference data, sample inference chain data, and sample response data.
[0013] Step S2: Construct multiple sets of first sample data and multiple sets of second sample data based on the multiple sets of initial sample data. Each set of first sample data includes the sample question, the sample inference chain data, and the sample response data. Each set of second sample data includes the sample deep inference data, the sample inference chain data, and the sample response data.
[0014] Step S3: Train the initial large model based on the multiple sets of first sample data and the multiple sets of second sample data to obtain the first large model. The first large model is used to generate inference chain data and response data corresponding to the question.
[0015] In one embodiment, step S3 includes:
[0016] Step S31: Train the initial large model based on the multiple sets of first sample data and the multiple sets of second sample data to obtain the first intermediate model;
[0017] Step S32: Calculate the first loss value corresponding to the first intermediate model based on the multiple sets of first sample data;
[0018] Step S33: Calculate the second loss value corresponding to the first intermediate model based on the multiple sets of first sample data and the multiple sets of second sample data;
[0019] Step S34: Calculate the third loss value, which is the weighted sum of the first loss value and the second loss value;
[0020] Step S35: If the third loss value is less than or equal to a preset loss threshold, set the first intermediate model as the first large model.
[0021] In one embodiment, step S32 includes:
[0022] Step S321: Calculate the first distribution probability corresponding to each first word in the plurality of first word elements based on the first intermediate model, and calculate the second distribution probability corresponding to each second word in the plurality of second word elements, wherein each first word element is a word element of the sample inference chain data included in each group of first sample data, and each second word element is a word element of the sample response data included in each group of first sample data;
[0023] Step S322: Calculate multiple first logarithms and multiple second logarithms, wherein the multiple first logarithms are the logarithms of the first probability distributions corresponding to the multiple first word elements, and the multiple first logarithms correspond one-to-one with the multiple first word elements; the multiple second logarithms are the logarithms of the second probability distributions corresponding to the multiple second word elements, and the multiple second logarithms correspond one-to-one with the multiple second word elements.
[0024] Step S323: Calculate the first mean and the second mean, wherein the first mean is the mean of a plurality of first logarithms and the second mean is the mean of a plurality of second logarithms;
[0025] Step S324: Calculate the first loss value, which is the weighted sum of the first mean and the second mean.
[0026] In one embodiment, step S33 includes:
[0027] Step S331: Calculate the first distribution probability corresponding to each first word in the plurality of first word elements based on the first intermediate model, and calculate the second distribution probability corresponding to each second word in the plurality of second word elements;
[0028] Step S332: Calculate the third distribution probability corresponding to each third word in the plurality of third word elements based on the first intermediate model, and calculate the fourth distribution probability corresponding to each fourth word element in the plurality of fourth word elements. Each third word element is a word element of the sample inference chain data included in each group of second sample data, and each fourth word element is a word element of the sample response data included in each group of second sample data. The plurality of first word elements correspond one-to-one with the plurality of third word elements, and the plurality of second word elements correspond one-to-one with the plurality of fourth word elements.
[0029] Step S333: Calculate multiple third logarithms and multiple fourth logarithms, wherein the multiple third logarithms are logarithms of multiple first quotients, and each of the multiple first quotients is the quotient of the first probability distribution of the corresponding first word element and the third probability distribution of the third word element; the multiple fourth logarithms are logarithms of multiple second quotients, and each of the multiple second quotients is the quotient of the second probability distribution of the corresponding second word element and the fourth probability distribution of the fourth word element.
[0030] Step S334: Calculate the third mean and the fourth mean, wherein the third mean is the mean of a plurality of first expectations, the plurality of first expectations are the expectations of a plurality of third logarithms, and the plurality of first expectations correspond one-to-one with the plurality of third logarithms; the fourth mean is the mean of a plurality of second expectations, the plurality of second expectations are the expectations of a plurality of fourth logarithms, and the plurality of second expectations correspond one-to-one with the plurality of fourth logarithms.
[0031] Step S335: Calculate the second loss value, which is the weighted value of the third mean and the fourth mean.
[0032] In one embodiment, after step S3, the method further includes:
[0033] Step S4: Receive the first question;
[0034] Step S5: Generate inference chain data and response data corresponding to the first question based on the first large model;
[0035] Step S6: Output the inference chain data and response data corresponding to the first question.
[0036] In one embodiment, after step S6, the method further includes:
[0037] Step S7: Receive feedback information, which includes the modified inference chain data and response data;
[0038] Step S8: Add the feedback information to the database;
[0039] Step S9: If the number of feedback messages stored in the database is greater than a set threshold, generate updated training data based on the feedback messages. The updated training data includes training questions, training inference chain data, and training response data.
[0040] Step S10: Update the first large model based on the updated training data.
[0041] Secondly, the present invention also provides an apparatus for a smart computing center cloud platform to perform large-scale model self-distillation absorption deep inference through computing power, comprising:
[0042] The acquisition module is used to acquire multiple sets of initial sample data, each set of initial sample data including sample question, sample deep inference data, sample inference chain data and sample response data;
[0043] The construction module is used to construct multiple sets of first sample data and multiple sets of second sample data based on the multiple sets of initial sample data. Each set of first sample data includes the sample question, the sample inference chain data, and the sample response data. Each set of second sample data includes the sample deep inference data, the sample inference chain data, and the sample response data.
[0044] The training module is used to train the initial large model based on the multiple sets of first sample data and the multiple sets of second sample data to obtain the first large model. The first large model is used to generate inference chain data and response data corresponding to the question.
[0045] Thirdly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, it implements the steps of the method for large model self-distillation absorption deep inference by computing power in the intelligent computing center cloud platform described in the first aspect above.
[0046] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for large-model self-distillation absorption deep inference by computing power in the intelligent computing center cloud platform described in the first aspect above.
[0047] Fifthly, the present invention also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps in the method for large-model self-distillation absorption deep inference by computing power in the intelligent computing center cloud platform described in the first aspect above.
[0048] In this invention, the method for large-scale model self-distillation absorption deep inference using computing power in an intelligent computing center cloud platform includes: Step S1, acquiring multiple sets of initial sample data, each set of initial sample data including a sample question, sample deep inference data, sample inference chain data, and sample response data; Step S2, constructing multiple sets of first sample data and multiple sets of second sample data based on the multiple sets of initial sample data, each set of first sample data including the sample question, the sample inference chain data, and the sample response data, and each set of second sample data including the sample deep inference data, the sample inference chain data, and the sample response data; Step S3, training the initial large model based on the multiple sets of first sample data and multiple sets of second sample data to obtain a first large model, which is used to generate inference chain data and response data corresponding to the question. In this way, each set of first sample data includes a sample question, sample inference chain data, and sample response data, and each set of second sample data includes sample deep inference data, sample inference chain data, and sample response data. By training the initial large model with multiple sets of first and second sample data, a first large model is obtained. The displayed natural language deep inference steps are distilled into a continuous latent space, so that the first model can still maintain complete and excellent inference capabilities without explicitly generating intermediate deep inference steps. The first large model can directly generate the inference chain data and response data corresponding to the question, effectively improving inference efficiency, greatly reducing the consumption of computing resources, and thus greatly increasing the large model service provided in the intelligent computing center cloud platform. Attached Figure Description
[0049] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is a flowchart of a method for large-scale model self-distillation absorption deep inference provided by the present invention, which utilizes computing power in an intelligent computing center cloud platform.
[0051] Figure 2 This is a schematic diagram of the deep inference of the large-scale model self-distillation absorption provided by the present invention;
[0052] Figure 3 This is a schematic diagram of the training process of the initial large model provided by the present invention;
[0053] Figure 4This is a structural diagram of an intelligent computing center cloud platform provided by the present invention, which performs large-scale model self-distillation absorption deep inference through computing power;
[0054] Figure 5 This is a structural diagram of an electronic device provided by the present invention. Detailed Implementation
[0055] The technical solutions of this invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0056] The “computing power” mentioned in this invention refers to: the ability of computer equipment or computing / data center to process information; the ability of computer hardware and software to work together to perform a certain computing requirement; the computing power to achieve the target result output by processing information data; and a new type of productivity that integrates information computing power, network carrying capacity, and data storage capacity, mainly providing services to society through computing power infrastructure.
[0057] The "computational power" (CP) described in this invention refers to the ability of a data center server to process data and output results. It is a comprehensive indicator of a data center's computing power, encompassing general computing power, supercomputing power, and intelligent computing power. The commonly used unit of measurement is floating-point operations per second (FLOPS, 1 EFLOPS = 10^18 FLOPS), with higher values indicating stronger overall computing power. It is estimated that 1 EFLOPS is approximately the computing power output of 5 Tianhe-2A supercomputers, 500,000 mainstream server CPUs, or 2 million mainstream laptops. The calculation formula is: CP = CP 通用 +CP 智能 +CP 超级 .
[0058] The "Network Power" (NP) mentioned in this invention refers to the performance of data transmission capability of computing facilities, which includes comprehensive capabilities such as network architecture, network bandwidth, transmission latency, intelligent management and scheduling, and involves network transmission within and between data centers. It is a comprehensive indicator for measuring network transmission scheduling capability.
[0059] The "Storage Power" (SP) described in this invention refers to the comprehensive capabilities of a data center in four aspects: data storage capacity, performance, security and reliability, and green and low-carbon operation. It is a comprehensive indicator for measuring the data storage capacity of a data center, including external storage devices such as storage arrays and internal storage devices within servers. The commonly used unit of measurement for storage capacity is exabytes (EB, 1EB = 2^60 bytes), while the commonly used unit of measurement for performance is the number of read / write operations per second (IOPS / TB). Disaster recovery ratio is an important indicator of security and reliability.
[0060] The "computing infrastructure" mentioned in this invention refers to a new type of information infrastructure that integrates information computing power, network carrying capacity, and data storage capacity, enabling centralized computing, storage, transmission, and application of information.
[0061] The "new information infrastructure" mentioned in this invention refers to network infrastructure such as 5G networks, fiber optic broadband networks, backbone networks, international communication networks, and satellite internet; computing infrastructure such as data centers, general computing centers, intelligent computing centers, and supercomputing centers; and new technology facilities such as artificial intelligence, blockchain, and quantum computing.
[0062] The “computing power” mentioned in this invention includes: general computing power, intelligent computing power, and supercomputing power.
[0063] The "general computing power" mentioned in this invention refers to the computing power provided by servers based on CPU (Central Processing Unit) chips, which is used to support basic general computing such as cloud computing and edge computing.
[0064] The "intelligent computing power" mentioned in this invention refers to: a computing platform deployed on a large scale based on dedicated chips such as GPU (Graphics Processing Unit), FPGA (Field Programmable Gate Array), and ASIC (Application Specific Integrated Circuit) for various artificial intelligence innovative applications, such as natural language processing and machine vision.
[0065] The “supercomputing power” mentioned in this invention refers to the computing power provided by high-performance computing clusters such as supercomputers. It utilizes the centralized computing resources of multiple computer systems working in parallel and uses a dedicated operating system to handle extremely complex or data-intensive problems. It is mainly used for computing in cutting-edge scientific fields, such as planetary simulation, drug molecule design, and gene analysis.
[0066] The "intelligent computing center" described in this invention refers to a facility that, through the use of large-scale heterogeneous computing resources, including general-purpose computing power (CPU) and intelligent computing power (GPU, FPGA, ASIC, etc.), primarily provides the necessary computing power, data, and algorithms for artificial intelligence applications (such as the development, training, and inference of deep learning models). The intelligent computing center encompasses facilities, hardware, and software, and can provide full-stack capabilities from underlying computing power to top-level application enablement.
[0067] The "intelligent computing center cloud platform" mentioned in this invention, abbreviated as "intelligent computing cloud", refers to a cloud computing platform that integrates hardware and software resources based on an intelligent computing center.
[0068] The "intelligent computing center" mentioned in this invention includes, but is not limited to, "smart computing center".
[0069] The "intelligent computing center" mentioned in this invention, also known as an artificial intelligence computing center, is a type of computing infrastructure that provides computing power services, data services, and algorithm services required for artificial intelligence applications, based on artificial intelligence theory and adopting an artificial intelligence computing architecture.
[0070] The "computing center" mentioned in this invention refers to a facility that is mainly composed of infrastructure such as wind, thermal, hydro, and electricity, and IT hardware and software equipment, and has computing power, carrying capacity, and storage capacity, including general data centers, intelligent computing centers, supercomputing centers, etc.
[0071] The "supercomputing center" mentioned in this invention refers to a supercomputing data center, which is a data center based on supercomputers or large-scale computing clusters. It can provide large-scale computing, storage and network services and is widely used in aerospace, defense, oil exploration, climate modeling and genome sequencing and other application scenarios.
[0072] The “computing resources” mentioned in this invention refer to the technologies and facilities required for the development of the digital society that have the ability to compute, transmit, store and apply information, including but not limited to computing resources such as CPUs and GPUs, network resources such as switches and routers, storage resources such as storage arrays and distributed storage, security resources such as firewalls and intrusion detection systems, and supporting and guaranteeing resources such as wind, fire, water and electricity.
[0073] The "large model" mentioned in this invention includes, but is not limited to, "large language model" and "multimodal large model".
[0074] The "large language model" mentioned in this invention refers to a large-scale language model (LLM), which is a language model with a large number of parameters. It is designed to understand and generate human language, and is trained with a large amount of text data. It can perform a wide range of tasks, including text summarization, translation, and sentiment analysis.
[0075] The “Multimodal Large Models” mentioned in this invention refer to models that combine multimodal information such as text, images, videos, and audio for training, including but not limited to multimodal large language models.
[0076] The "self-distillation absorption deep inference" described in this invention refers to: absorbing the deep inference process of a large model through training, so that the large model after absorbing the deep inference process can skip the deep inference process during inference and directly obtain the inference chain and response data, thereby achieving fast inference and reducing the occupation of computing resources.
[0077] Please see Figure 1 , Figure 1 This is a flowchart of a method for large-scale model self-distillation absorption deep inference provided by the present invention, using computing power in an intelligent computing center cloud platform. Figure 1 As shown, it includes the following steps:
[0078] Step S1: Obtain multiple sets of initial sample data. Each set of initial sample data includes sample questions, sample deep inference data, sample inference chain data, and sample response data.
[0079] It should be noted that, as Figure 2 As shown, in existing large-scale model inference technologies, after a question is input into the large model, the model performs deep thinking to obtain chain of thought (CoT) data and response data. This deep thinking process is time-consuming and requires significant computing resources. Therefore, this invention trains the large model by self-distilling and absorbing deep thinking data to obtain a first large model. This first large model can skip the deep thinking process when reasoning about user-input questions, directly obtaining the inference chain and response data. This significantly reduces the inference time of the large model and decreases the consumption of computing resources.
[0080] The aforementioned initial sample data sets were obtained based on inference from existing technology models. Specifically, multiple sample questions can be input into a large model in the existing technology, which then yields sample deep inference data, sample inference chain data, and sample response data. It is understood that because the large model in the existing technology performs deep inference during the inference process, the accuracy of the obtained inference chain data and response data is relatively high. Therefore, the inference chain data output by the large model in the existing technology can be directly used as sample inference chain data, the output response data can be used as sample response data, and the deep inference data of the large model can be extracted as sample deep inference data.
[0081] Each set of initial sample data includes sample questions, sample deep inference data, sample inference chain data, and sample response data.
[0082] In some implementations, after acquiring multiple sets of initial sample data, the initial sample data can be preprocessed to remove missing initial sample data. For example, if, when reasoning about an input sample problem using a large model from the prior art, only a portion of the sample depth inference data, sample inference chain data, and sample response data can be obtained, then the initial sample data containing that sample data can be deleted, allowing each set of initial sample data to effectively achieve model training.
[0083] Step S2: Construct multiple sets of first sample data and multiple sets of second sample data based on the multiple sets of initial sample data. Each set of first sample data includes the sample question, the sample inference chain data, and the sample response data. Each set of second sample data includes the sample deep inference data, the sample inference chain data, and the sample response data.
[0084] The aforementioned sets of first sample data are sample data excluding sample depth inference data, while the aforementioned sets of second sample data are sample data including sample depth inference data. For example... Figure 3 As shown, multiple sets of first sample data and multiple sets of second sample data are constructed using multiple sets of initial sample data. Then, multiple sets of first sample data and multiple sets of second sample data can be constructed using multiple sets of initial sample data to train a large model, so that the trained large model can obtain inference chain data and response data without performing deep inference.
[0085] Step S3: Train the initial large model based on the multiple sets of first sample data and the multiple sets of second sample data to obtain the first large model. The first large model is used to generate inference chain data and response data corresponding to the question.
[0086] The aforementioned initial large model is a large language model or a multimodal model. Multiple sets of first sample data and multiple sets of second sample data are constructed from multiple sets of initial sample data to train the large model and obtain the first large model. The displayed natural language deep reasoning steps are distilled into a continuous latent space. The first large model does not need to perform deep reasoning and can directly generate the reasoning chain data and response data corresponding to the question. This allows the first model to maintain complete and excellent reasoning ability without explicitly generating intermediate deep reasoning steps, thereby effectively improving reasoning efficiency and greatly reducing the consumption of computing resources.
[0087] The initial large model can be a large model that acquires multiple sets of initial sample data. Specifically, in some implementations, acquiring multiple sets of initial sample data includes:
[0088] The problem of obtaining multiple samples;
[0089] Based on the initial large model, inference is performed on the multiple sample data to obtain sample deep inference data, sample inference chain data and sample response data corresponding to each sample question.
[0090] In this invention, the method for large-scale model self-distillation absorption deep inference using computing power in an intelligent computing center cloud platform includes: Step S1, acquiring multiple sets of initial sample data, each set of initial sample data including a sample question, sample deep inference data, sample inference chain data, and sample response data; Step S2, constructing multiple sets of first sample data and multiple sets of second sample data based on the multiple sets of initial sample data, each set of first sample data including the sample question, the sample inference chain data, and the sample response data, and each set of second sample data including the sample deep inference data, the sample inference chain data, and the sample response data; Step S3, training the initial large model based on the multiple sets of first sample data and multiple sets of second sample data to obtain a first large model, which is used to generate inference chain data and response data corresponding to the question. In this way, each set of first sample data includes a sample question, sample inference chain data, and sample response data, and each set of second sample data includes sample deep inference data, sample inference chain data, and sample response data. By training the initial large model with multiple sets of first and second sample data, a first large model is obtained. The displayed natural language deep inference steps are distilled into a continuous latent space, so that the first model can still maintain complete and excellent inference capabilities without explicitly generating intermediate deep inference steps. The first large model can directly generate the inference chain data and response data corresponding to the question, effectively improving inference efficiency, greatly reducing the consumption of computing resources, and thus greatly increasing the large model service provided in the intelligent computing center cloud platform.
[0091] In one embodiment, step S3 includes:
[0092] Step S31: Train the initial large model based on the multiple sets of first sample data and the multiple sets of second sample data to obtain the first intermediate model;
[0093] Step S32: Calculate the first loss value corresponding to the first intermediate model based on the multiple sets of first sample data;
[0094] Step S33: Calculate the second loss value corresponding to the first intermediate model based on the multiple sets of first sample data and the multiple sets of second sample data;
[0095] Step S34: Calculate the third loss value, which is the weighted sum of the first loss value and the second loss value;
[0096] Step S35: If the third loss value is less than or equal to a preset loss threshold, set the first intermediate model as the first large model.
[0097] The first loss value is calculated based on multiple sets of first sample data. The first loss value can characterize the situation where the first intermediate model directly generates the inference chain data and response data corresponding to the question. The second loss value is calculated based on the multiple sets of first sample data and the multiple sets of second sample data. The second loss value can characterize the situation where the first intermediate model generates the inference chain data and response data corresponding to the question through a deep inference process.
[0098] It should be noted that when the first intermediate model directly generates the inference chain data and response data corresponding to the question, the inference chain data and response data obtained may not be accurate because they have not undergone deep inference. During the model training process, it is necessary to make the directly generated inference chain data and response data corresponding to the question as close as possible to the inference chain data and response data corresponding to the question generated through the deep inference process, so as to improve the accuracy of the first model trained, and enable the first model to still maintain complete and excellent reasoning ability without explicitly generating the intermediate deep inference steps.
[0099] Therefore, in this invention, the initial large model is trained based on the multiple sets of first sample data and the multiple sets of second sample data to obtain a first intermediate model; a first loss value corresponding to the first intermediate model is calculated based on the multiple sets of first sample data; a second loss value corresponding to the first intermediate model is calculated based on the multiple sets of first sample data and the multiple sets of second sample data; a third loss value is calculated, wherein the third loss value is a weighted sum of the first loss value and the second loss value; if the third loss value is less than or equal to a preset loss threshold, the first intermediate model is set as the first large model. In this way, the first loss value can determine whether the first intermediate model directly generates the inference chain data and response data corresponding to the question. The second loss value can determine whether the first intermediate model generates the inference chain data and response data corresponding to the question through a deep inference process. Then, a third loss value is calculated from the first and second loss values. The third loss value can determine whether the effect of the first intermediate model directly generating the inference chain data and response data corresponding to the question is close to the effect of the first intermediate model generating the inference chain data and response data corresponding to the question through a deep inference process. When the third loss value is less than or equal to the preset loss threshold, the first intermediate model is set as the first major model, which improves the accuracy of the first major model when directly generating the inference chain data and response data corresponding to the question. This allows the first model to maintain complete and excellent reasoning ability without displaying the intermediate deep inference steps.
[0100] In some implementations, the third loss value can be calculated using the following formula:
[0101] ;
[0102] in the formula This is the third loss value. The first loss value, This is the second loss value. The hyperparameters are used to balance the first and second loss values.
[0103] The first loss value can be the cross-entropy loss value, and the second loss value can be the relative entropy loss value, such as the KL (Kullback-Leibler Divergence) divergence loss value.
[0104] In one embodiment, step S32 includes:
[0105] Step S321: Calculate the first distribution probability corresponding to each first token in the plurality of first tokens based on the first intermediate model, and calculate the second distribution probability corresponding to each second token in the plurality of second tokens, wherein each first token is a token of the sample inference chain data included in each group of first sample data, and each second token is a token of the sample response data included in each group of first sample data;
[0106] Step S322: Calculate multiple first logarithms and multiple second logarithms, wherein the multiple first logarithms are the logarithms of the first probability distributions corresponding to the multiple first word elements, and the multiple first logarithms correspond one-to-one with the multiple first word elements; the multiple second logarithms are the logarithms of the second probability distributions corresponding to the multiple second word elements, and the multiple second logarithms correspond one-to-one with the multiple second word elements.
[0107] Step S323: Calculate the first mean and the second mean, wherein the first mean is the mean of a plurality of first logarithms and the second mean is the mean of a plurality of second logarithms;
[0108] Step S324: Calculate the first loss value, which is the weighted sum of the first mean and the second mean.
[0109] The first distribution probability mentioned above is the distribution probability corresponding to each token in the sample inference chain of multiple sets of first sample data, and the second distribution probability mentioned above is the distribution probability corresponding to each token in the sample response data of multiple sets of first sample data. The distribution of the inference chain data and sample data directly output by the first intermediate model is determined by the first distribution probability and the second distribution probability, and then the first loss value can be obtained to determine the situation of the inference chain data and response data corresponding to the question directly generated by the first intermediate model.
[0110] Furthermore, after calculating the first distribution probability and the second distribution probability, the first loss value can be calculated by calculating the cross-entropy (i.e., steps S322 to S324).
[0111] In some implementations, the first loss value can be calculated using the following formula:
[0112] ;
[0113] in the formula Let represent the first probability distribution, where x represents the sequence of input questions and c represents the sequence of inference chain data. t Let t be the t-th word in the reasoning chain; Let y represent the second distribution probability, and y represent the sequence of response data. t T represents the t-th term in the response data sequence;c T represents the number of the first word element. y Indicates the number of second lexical units.
[0114] In this invention, based on the first intermediate model, a first probability distribution corresponding to each of a plurality of first lexical units is calculated, and a second probability distribution corresponding to each of a plurality of second lexical units is calculated. Each first lexical unit is a lexical unit of the sample inference chain data included in each group of first sample data, and each second lexical unit is a lexical unit of the sample response data included in each group of first sample data. A plurality of first logarithms and a plurality of second logarithms are calculated. The plurality of first logarithms are the logarithms of the first probability distribution corresponding to the plurality of first lexical units, and each of the plurality of first logarithms corresponds one-to-one with the plurality of first lexical units. The plurality of second logarithms are the logarithms of the second probability distribution corresponding to the plurality of second lexical units, and each of the plurality of second logarithms corresponds one-to-one with the plurality of second lexical units. A first mean and a second mean are calculated. The first mean is the mean of the plurality of first logarithms, and the second mean is the mean of the plurality of second logarithms. A first loss value is calculated. The first loss value is the weighted sum of the first mean and the second mean, thereby achieving the calculation of the first loss value using the first probability distribution and the second probability distribution.
[0115] In one embodiment, step S33 includes:
[0116] Step S331: Calculate the first distribution probability corresponding to each first word in the plurality of first word elements based on the first intermediate model, and calculate the second distribution probability corresponding to each second word in the plurality of second word elements;
[0117] Step S332: Calculate the third distribution probability corresponding to each third word in the plurality of third word elements based on the first intermediate model, and calculate the fourth distribution probability corresponding to each fourth word element in the plurality of fourth word elements. Each third word element is a word element of the sample inference chain data included in each group of second sample data, and each fourth word element is a word element of the sample response data included in each group of second sample data. The plurality of first word elements correspond one-to-one with the plurality of third word elements, and the plurality of second word elements correspond one-to-one with the plurality of fourth word elements.
[0118] Step S333: Calculate multiple third logarithms and multiple fourth logarithms, wherein the multiple third logarithms are logarithms of multiple first quotients, and each of the multiple first quotients is the quotient of the first probability distribution of the corresponding first word element and the third probability distribution of the third word element; the multiple fourth logarithms are logarithms of multiple second quotients, and each of the multiple second quotients is the quotient of the second probability distribution of the corresponding second word element and the fourth probability distribution of the fourth word element.
[0119] Step S334: Calculate the third mean and the fourth mean, wherein the third mean is the mean of a plurality of first expectations, the plurality of first expectations are the expectations of a plurality of third logarithms, and the plurality of first expectations correspond one-to-one with the plurality of third logarithms; the fourth mean is the mean of a plurality of second expectations, the plurality of second expectations are the expectations of a plurality of fourth logarithms, and the plurality of second expectations correspond one-to-one with the plurality of fourth logarithms.
[0120] Step S335: Calculate the second loss value, which is the weighted value of the third mean and the fourth mean.
[0121] The third probability distribution mentioned above is the probability distribution corresponding to each token in the sample inference chain of multiple sets of second sample data, and the fourth probability distribution mentioned above is the probability distribution corresponding to each token in the sample response data of multiple sets of second sample data. It should be noted that the first and second probability distributions are the probability distributions of directly generated inference chain data and response data (i.e., without deep inference), while the third and fourth probability distributions are the probability distributions of generated inference chain data and response data after deep inference. Thus, by using the first and second probability distributions to determine the distribution of inference chain data and sample data output by the first intermediate model, a first loss value can be obtained to characterize the situation where the first intermediate model directly generates the inference chain data and response data corresponding to the question. Conversely, by using the third and fourth probability distributions to determine the distribution of inference chain data and sample data output by the first intermediate model after deep inference, and combining the first and second probability distributions, a second loss value is obtained. This second loss value characterizes the effect of the first intermediate model directly generating the inference chain data and response data corresponding to the question compared to the first intermediate model generating the inference chain data and response data corresponding to the question after deep inference.
[0122] In some implementations, after calculating the first probability distribution, the second probability distribution, the third probability distribution, and the fourth probability distribution, the second loss value can be calculated by calculating the KL divergence (i.e., steps S332 to S325).
[0123] The calculation process for the second loss value can be represented by the following formula:
[0124] ;
[0125] in the formula Denotes the probability of the first distribution. This represents the second distribution probability. This represents the probability of the third distribution. This represents the fourth distribution probability. This indicates the calculation of the expected value.
[0126] Wherein, since the KL divergence is defined as Therefore, the negative sign is retained in the formula to ensure that the distribution is closer when the loss function is minimized.
[0127] In this invention, based on the first intermediate model, a first distribution probability corresponding to each of the multiple first lexical units is calculated, and a second distribution probability corresponding to each of the multiple second lexical units is calculated; based on the first intermediate model, a third distribution probability corresponding to each of the multiple third lexical units is calculated, and a fourth distribution probability corresponding to each of the multiple fourth lexical units is calculated. Each third lexical unit is a lexical unit of the sample inference chain data included in each group of second sample data, and each fourth lexical unit is a lexical unit of the sample response data included in each group of second sample data. The multiple first lexical units correspond one-to-one with the multiple third lexical units, and the multiple second lexical units correspond one-to-one with the multiple fourth lexical units. Multiple third logarithms and multiple fourth logarithms are calculated, where the multiple third logarithms are the logarithms of multiple first quotients. Each of the plurality of first quotients is the quotient of the first probability distribution of the corresponding first word element and the third probability distribution of the corresponding third word element. The plurality of fourth logarithms are the logarithms of the plurality of second quotients. Each of the plurality of second quotients is the quotient of the second probability distribution of the corresponding second word element and the fourth probability distribution of the corresponding fourth word element. A third mean and a fourth mean are calculated. The third mean is the mean of the plurality of first expectations, which are the expectations of the plurality of third logarithms, and each of the plurality of first expectations corresponds one-to-one with the plurality of third logarithms. The fourth mean is the mean of the plurality of second expectations, which are the expectations of the plurality of fourth logarithms, and each of the plurality of second expectations corresponds one-to-one with the plurality of fourth logarithms. A second loss value is calculated, which is the weighted sum of the third mean and the fourth mean. Thus, the second loss value is calculated using the first, second, third, and fourth probability distributions.
[0128] In some implementations, the first loss value can be calculated using the following formula:
[0129]
[0130] in, This is the standard definition of KL divergence.
[0131] In one embodiment, after step S3, the method further includes:
[0132] Step S4: Receive the first question;
[0133] Step S5: Generate inference chain data and response data corresponding to the first question based on the first large model;
[0134] Step S6: Output the inference chain data and response data corresponding to the first question.
[0135] In this invention, a first question is received; inference chain data and response data corresponding to the first question are generated based on the first large model; and the inference chain data and response data corresponding to the first question are output. In this way, the first large model, obtained through training, directly generates the inference chain data and response data corresponding to the first question, without requiring a deep inference process, effectively improving inference speed and reducing the consumption of computing resources.
[0136] In one embodiment, after step S6, the method further includes:
[0137] Step S7: Receive feedback information, which includes the modified inference chain data and response data;
[0138] Step S8: Add the feedback information to the database;
[0139] Step S9: If the number of feedback messages stored in the database is greater than a set threshold, generate updated training data based on the feedback messages. The updated training data includes training questions, training inference chain data, and training response data.
[0140] Step S10: Update the first large model based on the updated training data.
[0141] The feedback information described above represents the feedback from users or trainers regarding the inference chain data and response data output by the first main model. It should be noted that the inference chain data and response data output by the first model may contain inaccuracies. In such cases, receiving feedback information regarding the inference chain data and response data output by the first model allows for further optimization of the first main model. Specifically, the feedback information includes revised inference chain data and response data, which are then used to optimize the first main model.
[0142] The aforementioned database is used to store feedback information. When feedback information is received, it is added to the database. The database then retrieves the corresponding question data and saves the question data and feedback information as a set of data. This data is used to generate updated training data later based on the feedback information stored in the database.
[0143] The updated training data mentioned above is generated based on feedback information in the database. Updating the training data can update the first model to improve its inference accuracy.
[0144] The feedback information and question data in the database are stored together in groups. When it is necessary to generate updated training data, the inference chain data included in the feedback information of each group can be extracted as training inference chain data, and the response data included can be extracted as training response data. The question data is used as training questions, thereby obtaining updated training data.
[0145] Furthermore, after generating updated training data based on the feedback information, the feedback data stored in the database is deleted, and the feedback information is saved again, thereby enabling the updating of the training data and continuous optimization of the first model.
[0146] In this invention, feedback information is received, including modified inference chain data and response data; the feedback information is added to a database; if the number of feedback information stored in the database exceeds a set threshold, updated training data is generated based on the feedback information, including training questions, training inference chain data, and training response data; the first large model is updated based on the updated training data. Thus, by generating updated training data based on feedback and updating the first large model using the updated training data, the inference accuracy of the first large model is further improved.
[0147] Please see Figure 4 , Figure 4 This is a structural diagram of a device for a smart computing center cloud platform to perform large-scale model self-distillation absorption deep inference using computing power, as provided by the present invention. Figure 4 As shown, the device 400 for large-scale model self-distillation absorption deep inference via computing power in the intelligent computing center cloud platform includes:
[0148] The acquisition module 401 is used to acquire multiple sets of initial sample data, each set of initial sample data including sample question, sample deep inference data, sample inference chain data and sample response data;
[0149] The construction module 402 is used to construct multiple sets of first sample data and multiple sets of second sample data based on the multiple sets of initial sample data. Each set of first sample data includes the sample question, the sample inference chain data and the sample response data. Each set of second sample data includes the sample deep inference data, the sample inference chain data and the sample response data.
[0150] Training module 403 is used to train an initial large model based on the multiple sets of first sample data and the multiple sets of second sample data to obtain a first large model. The first large model is used to generate inference chain data and response data corresponding to the question.
[0151] In one embodiment, the training module 403 includes:
[0152] The training submodule is used to train the initial large model based on the multiple sets of first sample data and the multiple sets of second sample data to obtain a first intermediate model;
[0153] The first calculation submodule is used to calculate the first loss value corresponding to the first intermediate model based on the multiple sets of first sample data;
[0154] The second calculation submodule is used to calculate the second loss value corresponding to the first intermediate model based on the multiple sets of first sample data and the multiple sets of second sample data;
[0155] The third calculation submodule is used to calculate the third loss value, which is a weighted sum of the first loss value and the second loss value.
[0156] The setting submodule is used to set the first intermediate model as the first large model when the third loss value is less than or equal to a preset loss threshold.
[0157] In one embodiment, the first computing submodule includes:
[0158] The first computing unit is configured to calculate the first distribution probability corresponding to each of the multiple first word elements based on the first intermediate model, and to calculate the second distribution probability corresponding to each of the multiple second word elements, wherein each first word element is a word element of the sample inference chain data included in each group of first sample data, and each second word element is a word element of the sample response data included in each group of first sample data.
[0159] The second calculation unit is used to calculate a plurality of first logarithms and a plurality of second logarithms, wherein the plurality of first logarithms are the logarithms of the first probability distributions corresponding to the plurality of first words, and the plurality of first logarithms correspond one-to-one with the plurality of first words; the plurality of second logarithms are the logarithms of the second probability distributions corresponding to the plurality of second words, and the plurality of second logarithms correspond one-to-one with the plurality of second words.
[0160] The third calculation unit is used to calculate a first mean and a second mean, wherein the first mean is the mean of a plurality of first logarithms and the second mean is the mean of a plurality of second logarithms;
[0161] The fourth calculation unit is used to calculate the first loss value, which is a weighted sum of the first mean and the second mean.
[0162] In one embodiment, the second computing submodule includes:
[0163] The fifth calculation unit is used to calculate the first distribution probability corresponding to each of the multiple first word elements based on the first intermediate model, and to calculate the second distribution probability corresponding to each of the multiple second word elements;
[0164] The sixth calculation unit is used to calculate the third distribution probability corresponding to each third word in the plurality of third word words based on the first intermediate model, and to calculate the fourth distribution probability corresponding to each fourth word word in the plurality of fourth word words. Each third word word is a word word in the sample inference chain data included in each group of second sample data, and each fourth word word is a word word in the sample response data included in each group of second sample data. The plurality of first word words correspond one-to-one with the plurality of third word words, and the plurality of second word words correspond one-to-one with the plurality of fourth word words.
[0165] The seventh calculation unit is used to calculate multiple third logarithms and multiple fourth logarithms, wherein the multiple third logarithms are logarithms of multiple first quotients, and each of the multiple first quotients is the quotient of the first probability distribution of the corresponding first word element and the third probability distribution of the corresponding third word element; the multiple fourth logarithms are logarithms of multiple second quotients, and each of the multiple second quotients is the quotient of the second probability distribution of the corresponding second word element and the fourth probability distribution of the corresponding fourth word element.
[0166] The eighth calculation unit is used to calculate the third mean and the fourth mean, wherein the third mean is the mean of a plurality of first expectations, the plurality of first expectations are the expectations of a plurality of third logarithms, and the plurality of first expectations correspond one-to-one with the plurality of third logarithms; the fourth mean is the mean of a plurality of second expectations, the plurality of second expectations are the expectations of a plurality of fourth logarithms, and the plurality of second expectations correspond one-to-one with the plurality of fourth logarithms.
[0167] The ninth calculation unit is used to calculate the second loss value, which is a weighted sum of the third mean and the fourth mean.
[0168] In one embodiment, the apparatus 400 for the intelligent computing center cloud platform to perform large model self-distillation absorption deep inference via computing power further includes:
[0169] The first receiving module is used to receive the first question;
[0170] The first generation module is used to generate inference chain data and response data corresponding to the first question based on the first large model.
[0171] The output module is used to output the inference chain data and response data corresponding to the first question.
[0172] In one embodiment, the apparatus 400 for the intelligent computing center cloud platform to perform large model self-distillation absorption deep inference via computing power further includes:
[0173] The second receiving module is used to receive feedback information, which includes modified inference chain data and response data.
[0174] An add module is used to add the feedback information to the database;
[0175] The second generation module is used to generate updated training data based on the feedback information when the number of feedback information stored in the database exceeds a set threshold. The updated training data includes training questions, training inference chain data, and training response data.
[0176] An update module is used to update the first large model based on the updated training data.
[0177] The device for performing large-scale model self-distillation absorption deep inference using computing power in the intelligent computing center cloud platform provided by this invention is capable of realizing the various processes of the various embodiments of the above-mentioned method for performing large-scale model self-distillation absorption deep inference using computing power in the intelligent computing center cloud platform. The technical features are one-to-one and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0178] It should be noted that the device for large-scale model self-distillation absorption deep inference in the intelligent computing center cloud platform of this invention can be a device, or a component, integrated circuit, or chip in an electronic device.
[0179] The present invention also provides an electronic device, see [link to relevant documentation]. Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device includes a memory 501, a processor 502, and a program or instructions stored in the memory 501 that run on the processor 502. When the program or instructions are executed by the processor 502, they can achieve the following: Figure 1 The corresponding intelligent computing center cloud platform uses computing power to perform large model self-distillation absorption deep inference, and any step in the method embodiment achieves the same beneficial effect, which will not be repeated here.
[0180] The processor 502 can be a CPU, ASIC, FPGA, or GPU.
[0181] Those skilled in the art will understand that all or part of the steps of the above-described method embodiment for large-model self-distillation absorption deep inference via computing power in the intelligent computing center cloud platform can be implemented by hardware related to program instructions, and the program can be stored in a readable medium.
[0182] The present invention also provides a readable storage medium on which a computer program is stored, and which, when executed by a processor, can perform the above-described functions. Figure 1 The corresponding intelligent computing center cloud platform performs any step in the method embodiment of large model self-distillation absorption deep inference through computing power, and can achieve the same technical effect. To avoid repetition, it will not be described again here. The storage medium mentioned is such as read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc.
[0183] The present invention also provides a computer program product, including computer instructions that, when executed by a processor, implement the above-described... Figure 1 The corresponding intelligent computing center cloud platform performs various processes of the method embodiment of large model self-distillation absorption deep inference through computing power, and can achieve the same technical effect. To avoid repetition, it will not be described in detail here.
[0184] The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses. Additionally, the use of "and / or" in this application indicates at least one of the connected objects, such as A and / or B and / or C, representing seven possibilities: A alone, B alone, C alone, both A and B present, both B and C present, both A and C present, and A, B, and C present.
[0185] It should be noted that, in this document, 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. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0186] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or second terminal device, etc.) to execute the methods of the various embodiments of this application.
[0187] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A method for deep inference of large models through self-distillation absorption using computing power in an intelligent computing center cloud platform, characterized in that, include: Step S1: Obtain multiple sets of initial sample data. Each set of initial sample data includes sample questions, sample deep inference data, sample inference chain data, and sample response data. Step S2: Construct multiple sets of first sample data and multiple sets of second sample data based on the multiple sets of initial sample data. Each set of first sample data includes the sample question, the sample inference chain data, and the sample response data. Each set of second sample data includes the sample deep inference data, the sample inference chain data, and the sample response data. Step S3: Train the initial large model based on the multiple sets of first sample data and the multiple sets of second sample data to obtain the first large model. The first large model is used to generate inference chain data and response data corresponding to the question.
2. The method as described in claim 1, characterized in that, Step S3 includes: Step S31: Train the initial large model based on the multiple sets of first sample data and the multiple sets of second sample data to obtain the first intermediate model; Step S32: Calculate the first loss value corresponding to the first intermediate model based on the multiple sets of first sample data; Step S33: Calculate the second loss value corresponding to the first intermediate model based on the multiple sets of first sample data and the multiple sets of second sample data; Step S34: Calculate the third loss value, which is the weighted sum of the first loss value and the second loss value; Step S35: If the third loss value is less than or equal to a preset loss threshold, set the first intermediate model as the first large model.
3. The method as described in claim 2, characterized in that, Step S32 includes: Step S321: Calculate the first distribution probability corresponding to each first word in the plurality of first word elements based on the first intermediate model, and calculate the second distribution probability corresponding to each second word in the plurality of second word elements, wherein each first word element is a word element of the sample inference chain data included in each group of first sample data, and each second word element is a word element of the sample response data included in each group of first sample data; Step S322: Calculate multiple first logarithms and multiple second logarithms, wherein the multiple first logarithms are the logarithms of the first probability distributions corresponding to the multiple first word elements, and the multiple first logarithms correspond one-to-one with the multiple first word elements; the multiple second logarithms are the logarithms of the second probability distributions corresponding to the multiple second word elements, and the multiple second logarithms correspond one-to-one with the multiple second word elements. Step S323: Calculate the first mean and the second mean, wherein the first mean is the mean of a plurality of first logarithms and the second mean is the mean of a plurality of second logarithms; Step S324: Calculate the first loss value, which is the weighted sum of the first mean and the second mean.
4. The method as described in claim 2, characterized in that, Step S33 includes: Step S331: Calculate the first distribution probability corresponding to each first word in the plurality of first word elements based on the first intermediate model, and calculate the second distribution probability corresponding to each second word in the plurality of second word elements; Step S332: Calculate the third distribution probability corresponding to each third word in the plurality of third word elements based on the first intermediate model, and calculate the fourth distribution probability corresponding to each fourth word element in the plurality of fourth word elements. Each third word element is a word element of the sample inference chain data included in each group of second sample data, and each fourth word element is a word element of the sample response data included in each group of second sample data. The plurality of first word elements correspond one-to-one with the plurality of third word elements, and the plurality of second word elements correspond one-to-one with the plurality of fourth word elements. Step S333: Calculate multiple third logarithms and multiple fourth logarithms, wherein the multiple third logarithms are logarithms of multiple first quotients, and each of the multiple first quotients is the quotient of the first probability distribution of the corresponding first word element and the third probability distribution of the third word element; the multiple fourth logarithms are logarithms of multiple second quotients, and each of the multiple second quotients is the quotient of the second probability distribution of the corresponding second word element and the fourth probability distribution of the fourth word element. Step S334: Calculate the third mean and the fourth mean, wherein the third mean is the mean of a plurality of first expectations, the plurality of first expectations are the expectations of a plurality of third logarithms, and the plurality of first expectations correspond one-to-one with the plurality of third logarithms; the fourth mean is the mean of a plurality of second expectations, the plurality of second expectations are the expectations of a plurality of fourth logarithms, and the plurality of second expectations correspond one-to-one with the plurality of fourth logarithms. Step S335: Calculate the second loss value, which is the weighted value of the third mean and the fourth mean.
5. The method according to any one of claims 1 to 4, characterized in that, After step S3, the method further includes: Step S4: Receive the first question; Step S5: Generate inference chain data and response data corresponding to the first question based on the first large model; Step S6: Output the inference chain data and response data corresponding to the first question.
6. The method as described in claim 5, characterized in that, After step S6, the method further includes: Step S7: Receive feedback information, which includes the modified inference chain data and response data; Step S8: Add the feedback information to the database; Step S9: If the number of feedback messages stored in the database is greater than a set threshold, generate updated training data based on the feedback messages. The updated training data includes training questions, training inference chain data, and training response data. Step S10: Update the first large model based on the updated training data.
7. A device for a smart computing center cloud platform to perform large-scale model self-distillation absorption deep inference using computing power, characterized in that, include: The acquisition module is used to acquire multiple sets of initial sample data, each set of initial sample data including sample question, sample deep inference data, sample inference chain data and sample response data; The construction module is used to construct multiple sets of first sample data and multiple sets of second sample data based on the multiple sets of initial sample data. Each set of first sample data includes the sample question, the sample inference chain data, and the sample response data. Each set of second sample data includes the sample deep inference data, the sample inference chain data, and the sample response data. The training module is used to train the initial large model based on the multiple sets of first sample data and the multiple sets of second sample data to obtain the first large model. The first large model is used to generate inference chain data and response data corresponding to the question.
8. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method for large-model self-distillation absorption deep inference by computing power in the intelligent computing center cloud platform as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method for large-scale model self-distillation absorption deep inference using computing power by the intelligent computing center cloud platform as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The method includes computer instructions that, when executed by a processor, implement the steps of the method for large-scale model self-distillation absorption deep inference using computing power by the intelligent computing center cloud platform as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Large-model end-to-end distillation deployment method, device and equipment for low-computing-power equipment and medium
CN120066803A
Dialogue model training method, artificial intelligence interview method, computing device, storage medium and program product
CN120067252A