Compensation method, device and equipment of large model output format and medium

By introducing feature-aware gating units and dynamic routing activation mechanisms into large pretrained models, small format conversion models are designed, and the problem of unstable output format of large pretrained models is solved, achieving resource efficiency and cost reduction.

CN119849554APending Publication Date: 2025-04-18INSPUR ZHUOSHU BIG DATA IND DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510050555.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

Existing large pretrained models have problems with output format instability, and existing solutions such as complex design prompts or dataset fine-tuning lead to high resource consumption, expensive and difficult to apply in resource-limited environments.

Method used

A compensation method for the output format of the large model is proposed. By setting the Transformer decoder layer of the feature-aware gating unit, combining the dynamic routing activation mechanism, a small format conversion model is designed, and deployed in the same system as the target large model, and the intermediate output content of the large model is formatted calibrated through the format conversion model.

Benefits of technology

It realizes effective calibration of the output format, reduces computing resource consumption and time cost, and is suitable for a variety of natural language processing tasks that require a stable output format.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119849554A_ABST
    Figure CN119849554A_ABST
Patent Text Reader

Abstract

The invention discloses a large model output format compensation method and device, equipment and a medium, and the method comprises the steps: determining an output format of a target large model, and taking the output format as an expected input format of an initial format conversion model; obtaining a training data set of the initial format conversion model based on the expected input format; based on the training data set, training the initial format conversion model until the initial format conversion model converges to obtain a format conversion model; deploying the format conversion model and the target large model in the same system, and obtaining an expected output format of the target user; and through the format conversion model, inputting the intermediate output content of the target large model into the format conversion model to obtain target output content in an expected output format, and presenting the target output content to a target user. High resource consumption caused by complex prompt word design and large-scale data fine tuning is avoided, and computing resource consumption and time cost can be remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and specifically to a compensation method, device, equipment and medium for a large model output format. Background Art

[0002] In the field of artificial intelligence, especially natural language processing, large pre-trained models have been widely used due to their strong generalization ability and applicability to a wide range of tasks. However, in practical applications, the instability of the output format of these large models has become a problem that needs to be solved. In order to ensure that the output results conform to the expected format, existing methods mainly rely on two strategies: one is to design complex prompts to guide the model to generate output that meets the requirements; the other is to fine-tune the model to the required output format by fine-tuning the dataset of a specific task.

[0003] The first method requires large models with sufficient parameter scale to understand and respond to complex prompts, which not only increases the complexity of the model but also limits its application in resource-limited environments. Although the second method can improve the consistency of the output format, it requires more additional training data and computing resources, resulting in higher time and economic costs. This method is particularly inefficient, especially in cases of frequent updates or customization requirements. For application scenarios that want to reduce model maintenance costs while maintaining efficient and stable output formats, existing solutions have obvious limitations and shortcomings. Summary of the invention

[0004] In order to solve the above problems, the present application proposes a compensation method, device, equipment and medium for a large model output format, wherein the method includes:

[0005] Determine the output format of the target large model as the expected input format of the initial format conversion model; set a feature-aware gating unit before the linear activation layer of each Transformer decoder layer of the initial format conversion model to determine the activation probability of each neuron according to the input feature; obtain the expected output format of the target user, and obtain a training data set of the initial format conversion model based on the expected input format and the expected output format; train the initial format conversion model based on the training data set until the initial format conversion model converges to obtain a format conversion model, and deploy the format conversion model and the target large model in the same system; input the intermediate output content of the target large model into the format conversion model through the format conversion model to obtain the target output content in the expected output format, and present the target output content to the target user.

[0006] In one example, the initial format conversion model is trained based on the training data set, specifically including: determining the number of training iterations of the initial format conversion model during the training process; when the number of training iterations is lower than a preset threshold, increasing the output diversity of the initial format conversion model by increasing the temperature parameter of the initial format conversion model; as the number of training iterations increases, continuously reducing the temperature parameter of the initial format conversion model to increase the output stability of the initial format conversion model.

[0007] In one example, the obtaining of a training data set for the initial format conversion model based on the expected input format and the expected output format specifically includes: determining, in a preset database, a plurality of non-standard output variant samples related to the expected input format and the expected output format; the preset database stores a plurality of samples, each sample including a different output format of the same original input content, and each sample is annotated with a mapping relationship between the original input content and the different output formats; the types of the non-standard output variants include format difference variants, content structure change variants, semantic expression diversity variants, error variants, non-standard variants, special character variants, and multimodal data; obtaining the current remaining computing power of the server and the accuracy requirements of the target user, and selecting a corresponding number of training data samples from the non-standard output variants according to the remaining computing power and the accuracy requirements to form the training data set.

[0008] In one example, after inputting the intermediate output content of the target large model into the format conversion model to obtain the target output content in the expected output format, the method further includes: storing the intermediate output content and the activation neurons of the format conversion model based on the intermediate output content as a combination in an activation probability database; inputting the intermediate output content of the target large model into the format conversion model to obtain the target output content in the expected output format specifically includes: determining the content similarity between the intermediate output content and each historical input content of the same format conversion model in the activation probability database; and using the activation neurons corresponding to the historical input content whose content similarity is higher than a preset threshold as the activation neurons corresponding to the intermediate output content.

[0009] In one example, determining the content similarity between the intermediate output content and each historical input content of the same format conversion model in the activation probability database specifically includes: when the output format of the target large model is a language format, segmenting each sentence in the intermediate output content to obtain a plurality of phrases corresponding to each sentence; mapping the plurality of phrases to a high-dimensional space to obtain word vectors corresponding to each phrase; performing a first weighted calculation on the word vectors corresponding to each phrase to determine the sentence vector corresponding to each sentence; performing a second weighted calculation on the sentence vectors corresponding to each sentence to determine the content vector corresponding to the intermediate output content; determining the cosine similarity of the content vectors between the intermediate output content and each historical input content as the content similarity between the intermediate output content and each historical input content of the same format conversion model in the activation probability database.

[0010] In one example, the initial format conversion model is trained based on the training data set, specifically including: during the training of the format conversion model, recording the average activation probabilities corresponding to different neurons and the sequence activation probabilities of neuron connection sequences; removing neurons whose average activation probabilities and sequence activation probabilities are both lower than a preset threshold from the format conversion model; and solidifying the neuron connection sequences whose sequence activation probabilities are higher than the preset threshold, so that the neuron connection sequences remain activated during the operation of the format conversion model.

[0011] In one example, before inputting the intermediate output content of the target large model into the format conversion model, the method further includes: obtaining an expected answer label of the target user, the expected answer label including at least one of an answer breadth type and an answer depth type; based on the expected answer label, modifying the temperature parameter of the format conversion model so that the format conversion model can output an answer according to the target user's expected answer.

[0012] The present application also provides a compensation device for the output format of a large model, including: an input format determination module, which determines the output format of the target large model as the expected input format of the initial format conversion model; a feature-aware gating unit is provided before the linear activation layer of each Transformer decoder layer of the initial format conversion model, which is used to determine the activation probability of each neuron according to the input feature; a training data acquisition module, which obtains the expected output format of the target user, and obtains the training data set of the initial format conversion model based on the expected input format and the expected output format; a conversion model training module, which trains the initial format conversion model based on the training data set until the initial format conversion model converges to obtain a format conversion model, and deploys the format conversion model and the target large model in the same system; a content output module, which inputs the intermediate output content of the target large model into the format conversion model through the format conversion model to obtain the target output content in the expected output format, and presents the target output content to the target user.

[0013] The present application also provides a compensation device in a large model output format, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the method described in any one of the above examples.

[0014] The present application also provides a non-volatile computer storage medium storing computer executable instructions, characterized in that the computer executable instructions are configured to execute the steps of the method described in any one of the above examples.

[0015] The method proposed in this application can bring the following beneficial effects: This application provides a small model that can convert the output format. By combining the powerful expression ability of the large model and the efficient adjustment ability of the small model, effective calibration of the output format is achieved, avoiding the high resource consumption caused by complex prompt design and large-scale data fine-tuning, and can significantly reduce computing resource consumption and time cost. It is suitable for a variety of natural language processing tasks that require a stable output format. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0017] Figure 1 A schematic flow chart of a compensation method for a large model output format in an embodiment of the present application;

[0018] Figure 2 A schematic diagram of a dynamic routing activation mechanism in an embodiment of the present application;

[0019] Figure 3 It is a structural schematic diagram of a compensation device with a large model output format in an embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0021] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0022] Figure 1 A flowchart of a compensation method for a large model output format provided for one or more embodiments of this specification. The method can be applied to large language model output compensation in different business fields, such as Internet financial business field, e-commerce business field, instant messaging business field, game business field, official business field, etc. The process can be executed by a computing device in the corresponding field (for example, a risk control server or smart mobile terminal corresponding to a payment business, etc.), and some input parameters or intermediate results in the process allow manual intervention and adjustment to help improve accuracy.

[0023] The analysis method involved in the embodiments of the present application can be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For the convenience of understanding and description, the following embodiments are described in detail by taking a server as an example.

[0024] It should be noted that the server can be a single device or a system composed of multiple devices, that is, a distributed server, and this application does not make any specific limitations on this.

[0025] like Figure 1 As shown, the embodiment of the present application provides a compensation method for a large model output format, including:

[0026] S101: Determine the output format of the target large model as the expected input format of the initial format conversion model.

[0027] The target large model here refers to the large language model that needs to perform output format compensation. For any target large model, there is no need to pay attention to its input format. Only the output format is obtained as the expected input format of the initial format conversion model connected to the target large model.

[0028] The large model here is usually a basic model that has been pre-trained on a large-scale corpus. Such large models usually have hundreds of millions to hundreds of billions of parameters, strong generalization capabilities and a wide range of task adaptability. In actual application scenarios, the large model generates preliminary output results based on the input data. These outputs may contain text, classification labels, or other forms of data.

[0029] The expected input format here refers to all input formats of the initial format conversion model, that is, all types of output formats corresponding to the large language model. Among them, before the linear activation layer of each Transformer decoder layer of the initial format conversion model, a feature-aware gating unit is set to determine the activation probability of each neuron according to the input features. The feature-aware gating unit is set to optimize the information flow and enhance feature sensitivity. It receives the feature vector of the previous layer as input, generates the activation probability of each feature through a gating mechanism containing linear transformation and nonlinear activation, and then applies a threshold judgment to determine whether the feature participates in subsequent processing, and features below the threshold are suppressed. This mechanism not only reduces the computational burden and enhances the sparsity and generalization ability of the model, but also concentrates resources on the places that most affect the final output through dynamic routing, thereby simplifying the network structure and improving efficiency and expressiveness.

[0030] In one embodiment, when designing a format conversion model, a Decoder-only architecture is selected as the basis, and the total parameters are strictly controlled below 100 million to speed up the processing speed of the format conversion model. A dynamic routing activation mechanism is introduced in a specific key layer before the linear activation layer to accommodate more knowledge, avoid overfitting, and accelerate reasoning by selectively activating neurons. Compared with traditional capsule networks, the design of the format conversion model focuses on decoding generation in terms of architecture selection, emphasizes efficient computing in parameter control, and optimizes performance and generalization capabilities in routing mechanism design. At the same time, in terms of activation purposes, it can improve efficiency rather than just capturing entity attributes. This design aims to achieve efficient, compact, and high-performance model performance. Among them, the dynamic routing activation mechanism is as follows: Figure 2 shown.

[0031] S102: Acquire the expected output format of the target user, and acquire a training data set of the initial format conversion model based on the expected input format and the expected output format.

[0032] After determining all possible input formats of the initial format conversion model, it is necessary to obtain the expected output format of the target user, so as to obtain a training data set according to the expected input format and the expected output format to train the initial format conversion model. The above-mentioned training data set can be pre-stored in a storage device of a computer device, and when the initial format conversion model needs to be trained, the computer device can select the training data set from the storage device. Of course, the computer device can also obtain the training data set from other external devices. For example, the training data set is stored in the cloud, and when the initial format conversion model needs to be trained, the computer device can obtain the training data set from the cloud.

[0033] In one embodiment, when obtaining a training data set, multiple non-standard output variant samples related to the expected input format and the expected output format can be determined in a preset database. Here, multiple samples are stored in the preset database, each sample includes different output formats of the same original input content, and each sample is annotated with a mapping relationship between the original input content and the different output formats. The types of non-standard output variants here include format difference variants, content structure change variants, semantic expression diversity variants, error variants, non-standard variants, special character variants, and multimodal data. Then, based on the current remaining computing power of the server and the accuracy requirements of the target user, a corresponding number of training data samples can be selected from the non-standard output variants to form a training data set. By covering a wide range of variants and ensuring the accuracy and consistency of annotations, the data set will enable the format conversion model to cope with the diversity in practical applications and effectively learn how to convert non-standard outputs into a unified and standardized format, thereby improving its robustness and adaptability.

[0034] S103: Based on the training data set, the initial format conversion model is trained until the initial format conversion model converges to obtain a format conversion model, and the format conversion model and the target large model are deployed in the same system.

[0035] After obtaining the training data set, the initial format conversion model is trained using the training data set to obtain a format conversion model for output format compensation of the target large model. The convergence criterion of the initial format conversion model here can be that the loss function value is lower than a preset threshold in multiple consecutive iterations, or that the model parameter change value is lower than a preset threshold during multiple iterations.

[0036] After the format conversion model is trained, the format conversion model and the target large model are deployed in the same system and set after the target large model to receive the output of the target large model and obtain the expected output format of the target user.

[0037] In one embodiment, when the initial format conversion model is trained, the exploration and utilization behavior of the model during the training process can be influenced by adjusting the sharpness of the activation probability distribution, that is, its concentration. A higher temperature value is used in the early stage of model training to make the activation decision more random and gentle, encouraging extensive exploration; the temperature is gradually lowered as the training progresses, so that the activation mode becomes more certain and sharp, helping the model to gradually transition from extensive exploration to fine optimization. This mechanism ensures that the model can fully explore different feature combinations and focus on the most effective activation mode in the later stage by dynamically adjusting the temperature parameter, thereby improving the quality and consistency of the final decision. Specifically, it is necessary to determine the number of training iterations of the initial format conversion model during the training process. When the number of training iterations is lower than the preset threshold, the output diversity of the initial format conversion model is increased by increasing the temperature parameter of the initial format conversion model. As the number of training iterations increases, the temperature parameter of the initial format conversion model is continuously reduced to increase the output stability of the initial format conversion model.

[0038] In one embodiment, when training a training data set, in order to ensure that only necessary parts are activated during actual operation and to reduce unnecessary computational overhead, pruning techniques can be applied in the late stage of training or before deployment to remove those connections that are almost never activated and simplify the network structure. At the same time, by analyzing historical activation records, those paths that are frequently activated and contribute significantly to performance are solidified. Specifically, during the training of the format conversion model, the average activation probabilities corresponding to different neurons and the sequence activation probabilities of the neuron connection sequences can be recorded; neurons whose average activation probabilities and sequence activation probabilities are lower than a preset threshold are removed from the format conversion model; neuron connection sequences whose sequence activation probabilities are higher than a preset threshold are solidified, so that the neuron connection sequences remain activated during the operation of the format conversion model.

[0039] S104: Through the format conversion model, the intermediate output content of the target large model is input into the format conversion model to obtain the target output content in the expected output format, and the target output content is presented to the target user.

[0040] This application generates preliminary output intermediate output content through a pre-trained large model, designs and trains a format conversion model with a parameter scale controlled within 100 million to re-standardize these intermediate outputs, and integrates the two into the same system, so that the user's request is first generated by the large model for intermediate output content, and then the format is calibrated through the small model to obtain the target output content, and finally returns the result in the expected format.

[0041] In one embodiment, in order to efficiently process repeated or similar inputs, the activation probability of each neuron in the format conversion model can be pre-calculated and cached, and when encountering similar inputs, the cached results can be directly read to avoid repeated calculations. Specifically, the intermediate output content and the activated neurons of the format conversion model based on the intermediate output content can be stored as a combination in the activation probability database. When the intermediate output content of the target large model is input into the format conversion model, the content similarity between the intermediate output content and each historical input content of the same format conversion model in the activation probability database can be determined, and the activated neurons corresponding to the historical input content with the content similarity higher than the preset threshold are used as the activated neurons corresponding to the intermediate output content. When calculating the similarity, word embedding calculations can be used, such as using methods such as Word2Vec to map words to a high-dimensional space, representing the entire sentence through operations such as weighted averaging, and finally using cosine similarity for judgment. For example, in order to calculate the similarity of two sentences, we first use the pre-trained Word2Vec model to convert the words in each sentence into vectors in a high-dimensional space, and then integrate these word vectors through simple averaging or weighted averaging to generate a vector representation of the entire sentence. Next, using the cosine similarity formula to measure the cosine value of the angle between the two sentence vectors, where A and B represent the vectors of the two sentences respectively, and I is the cosine similarity between the two sentences. The closer the value is to 1, the more similar the two sentences are. For example, for sentences with similar content but slightly different wording, "I like running in the park" and "I enjoy jogging in the park", even if their vocabulary is not exactly the same, the cosine similarity calculated by the above method will be very high, reflecting that the meanings they express are very close. Set the similarity threshold according to specific needs to decide whether to read the activation probability from the cache. Choosing the appropriate method depends on the nature of the task, data type, and performance requirements, and it may be necessary to combine multiple methods to achieve the best results.

[0042] In one embodiment, when generating target output content through the format conversion model, the user's answer expectation can be determined through historical access records. For example, if the user wants to provide ideas, multiple answers can be generated at this time, but each answer can have less content. Specifically, it is necessary to obtain the target user's answer expectation label, where the answer expectation label includes at least one of the answer breadth type and the answer depth type; based on the answer expectation label, modify the temperature parameter of the format conversion model so that the format conversion model can output an answer according to the target user's answer expectation.

[0043] like Figure 3 As shown, the embodiment of the present application also provides a compensation device for a large model output format, including:

[0044] The input format determination module 301 determines the output format of the target large model as the expected input format of the initial format conversion model; a feature-aware gating unit is provided before the linear activation layer of each Transformer decoder layer of the initial format conversion model to determine the activation probability of each neuron according to the input feature.

[0045] The training data acquisition module 302 acquires the expected output format of the target user, and acquires a training data set of the initial format conversion model based on the expected input format and the expected output format.

[0046] The conversion model training module 303 trains the initial format conversion model based on the training data set until the initial format conversion model converges to obtain a format conversion model, and deploys the format conversion model and the target large model in the same system.

[0047] The content output module 304 inputs the intermediate output content of the target large model into the format conversion model through the format conversion model to obtain the target output content in the expected output format, and presents the target output content to the target user.

[0048] An embodiment of the present application also provides a compensation device in a large model output format, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any one of the above embodiments.

[0049] An embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the method described in any one of the above embodiments.

[0050] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0051] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0052] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0053] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0054] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0055] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0056] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0057] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0058] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory media such as modulated data signals and carrier waves.

[0059] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0060] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A compensation method for a large model output format, characterized in that: include: Determine the output format of the target large model as the expected input format of the initial format conversion model; before the linear activation layer of each Transformer decoder layer of the initial format conversion model, a feature-aware gating unit is provided to determine the activation probability of each neuron according to the input feature; Acquire the expected output format of the target user, and acquire a training data set of the initial format conversion model based on the expected input format and the expected output format; Based on the training data set, the initial format conversion model is trained until the initial format conversion model converges to obtain a format conversion model, and the format conversion model and the target large model are deployed in the same system; Through the format conversion model, the intermediate output content of the target large model is input into the format conversion model to obtain the target output content in the expected output format, and the target output content is presented to the target user.

2. The method according to claim 1, characterized in that: The training of the initial format conversion model based on the training data set specifically includes: Determining the number of training iterations of the initial format conversion model during training; When the number of training iterations is lower than a preset threshold, increasing the output diversity of the initial format conversion model by increasing a temperature parameter of the initial format conversion model; As the number of training iterations increases, the temperature parameter of the initial format conversion model is continuously reduced to increase the output stability of the initial format conversion model.

3. The method according to claim 1, characterized in that The acquiring a training data set of the initial format conversion model based on the expected input format and the expected output format specifically includes: In a preset database, a plurality of non-standard output variant samples related to the expected input format and the expected output format are determined; the preset database stores a plurality of samples, each sample includes a different output format of the same original input content, and each sample is annotated with a mapping relationship between the original input content and the different output formats; the types of the non-standard output variants include format difference variants, content structure change variants, semantic expression diversity variants, error variants, non-standard variants, special character variants, and multimodal data; The current remaining computing power of the server and the accuracy requirement of the target user are obtained, and according to the remaining computing power and the accuracy requirement, a corresponding number of training data samples are selected from the non-standard output variants to form the training data set.

4. The method according to claim 1, characterized in that: After inputting the intermediate output content of the target large model into the format conversion model to obtain the target output content in the expected output format, the method further includes: storing the intermediate output content and the activated neurons of the format conversion model based on the intermediate output content as a combination in an activation probability database; The step of inputting the intermediate output content of the target large model into the format conversion model to obtain the target output content in the expected output format specifically includes: Determine the content similarity between the intermediate output content and each historical input content of the same format conversion model in the activation probability database; The activated neurons corresponding to the historical input contents whose content similarity is higher than a preset threshold are used as the activated neurons corresponding to the intermediate output contents.

5. The method according to claim 4, characterized in that The determining of the content similarity between the intermediate output content and each historical input content of the same format conversion model in the activation probability database specifically includes: When the output format of the target large model is a language format, each sentence in the intermediate output content is segmented to obtain a plurality of phrases corresponding to each sentence; Mapping the multiple phrases to a high-dimensional space to obtain word vectors corresponding to each phrase; By performing a first weighted calculation on the word vectors corresponding to the phrases, respectively, to determine the sentence vectors corresponding to the sentences respectively; Determine a content vector corresponding to the intermediate output content by performing a second weighted calculation on the sentence vectors corresponding to the sentences; The cosine similarity of the content vectors between the intermediate output content and each of the historical input contents is determined as the content similarity between the intermediate output content and each of the historical input contents of the same format conversion model in the activation probability database.

6. The method according to claim 1, characterized in that The training of the initial format conversion model based on the training data set specifically includes: During the training of the format conversion model, the average activation probabilities corresponding to different neurons and the sequence activation probabilities of the neuron connection sequences are recorded; The neurons whose average activation probability and the activation probability of the corresponding sequence are both lower than a preset threshold are removed from the format conversion model; The neuron connection sequence whose sequence activation probability is higher than a preset threshold is solidified, so that the neuron connection sequence remains activated during the operation of the format conversion model.

7. The method according to claim 1, characterized in that Before inputting the intermediate output content of the target large model into the format conversion model, the method further includes: Acquire an expected answer label of the target user, where the expected answer label includes at least one of an answer breadth type and an answer depth type; Based on the answer expectation label, the temperature parameter of the format conversion model is modified so that the format conversion model can output an answer according to the answer expectation of the target user.

8. A compensation device for a large model output format, characterized in that: include: An input format determination module determines the output format of the target large model as the expected input format of the initial format conversion model; A feature-aware gating unit is provided before the linear activation layer of each Transformer decoder layer of the initial format conversion model, for determining the activation probability of each neuron according to the input feature; A training data acquisition module is used to acquire the expected output format of the target user, and based on the expected input format and the expected output format, acquire a training data set for the initial format conversion model; A conversion model training module, based on the training data set, trains the initial format conversion model until the initial format conversion model converges to obtain a format conversion model, and deploys the format conversion model and the target large model in the same system; The content output module inputs the intermediate output content of the target large model into the format conversion model through the format conversion model to obtain the target output content in the expected output format, and presents the target output content to the target user.

9. A compensation device with a large model output format, characterized in that: include: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform: the steps of the method according to any one of claims 1 to 7.

10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured to perform the steps of the method according to any one of claims 1-7.