Large language model updating method and device and electronic equipment
By performing vectorized encoding and feature extraction on large language models and dynamically adjusting hyperparameters based on historical hyperparameters, the problem of insufficient balance in the quality and diversity of results generated by large language models in human-computer dialogue scenarios is solved, achieving output that better meets user needs.
Patent Information
- Application Number
- CN202510621220.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-09-16
AI Technical Summary
Large language models are difficult to adapt to the needs of various dialogue scenarios in human-computer dialogue scenarios, and the balance between the quality and diversity of the generated results is insufficient, which affects their practical application.
By vectorizing and extracting features from the input text, generating target hyperparameters based on the intermediate vectors and historical hyperparameters, and dynamically adjusting the hyperparameters of the large language model, output results that meet user needs are generated.
It improves the adaptability of large language models in different dialogue scenarios, generates output results that better meet user expectations, and improves user satisfaction.
Smart Images

Figure CN120654807A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and in particular to a large language model updating method, device, and electronic device. Background Art
[0002] Large Language Models (LLMs) offer unique advantages in text understanding, especially in generative applications. In practical applications, to optimize generative performance, hyperparameters can be adjusted to control the performance of LLMs. Commonly used hyperparameters include temperature, top-k, and top-p.
[0003] Currently, the hyperparameters of most large language models are set before generation begins, typically using a fixed set of values. However, this approach is not optimal in practical applications and is difficult to adapt to the needs of various conversational scenarios. Some conversational scenarios expect the model to provide accurate, high-quality responses, while others require diverse and fluent answers. Using fixed values to determine hyperparameters can lead to an imbalance between the quality and diversity of generated results, failing to achieve ideal results in human-computer conversation scenarios and hindering the practical application of large language models. Summary of the Invention
[0004] The embodiments of the present application provide a large language model updating method, device, and electronic device, which can at least solve the problem of difficulty in adapting to the needs of various dialogue scenarios.
[0005] In order to solve the above technical problems, this application is implemented as follows: In a first aspect, an embodiment of the present application provides a large language model updating method, the method comprising: performing vectorized encoding on a target text input into a large language model to obtain a text vector corresponding to the target text; performing feature extraction on the text vector to obtain an intermediate vector corresponding to the text vector, wherein the intermediate vector is used to indicate the text features corresponding to the target text; obtaining target hyperparameters corresponding to the large language model when processing the target text based on historical hyperparameters corresponding to the intermediate vector and historical text, wherein the historical text is historical data corresponding to the target text; updating the hyperparameters of the large language model to the target hyperparameters, and using the updated large language model to generate an output result corresponding to the target text.
[0006] In a second aspect, an embodiment of the present application provides a large language model updating device, which includes: a first acquisition module, used to vectorize and encode the target text input into the large language model to obtain a text vector corresponding to the target text; a second acquisition module, used to perform feature extraction on the text vector to obtain an intermediate vector corresponding to the text vector, wherein the intermediate vector is used to indicate the text features corresponding to the target text; a third acquisition module, used to obtain the target hyperparameters corresponding to the large language model when processing the target text based on the historical hyperparameters corresponding to the intermediate vector and the historical text, wherein the historical text is the historical data corresponding to the target text; a generation module, used to update the hyperparameters of the large language model to the target hyperparameters, and use the updated large language model to generate an output result corresponding to the target text.
[0007] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect above are implemented.
[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect above are implemented.
[0009] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer performs the steps of the method described in the first aspect above.
[0010] The technical solution provided by this application may have the following beneficial effects: In an embodiment of the present application, the target text input into the large language model can be vectorized and encoded to obtain a text vector corresponding to the target text; then, feature extraction is performed on the text vector to obtain an intermediate vector indicating the text features of the target text; and then, based on the intermediate vector and the historical hyperparameters corresponding to the historical text, the target hyperparameters corresponding to the above-mentioned large language model when processing the target text can be obtained, and finally, the hyperparameters of the above-mentioned large language model can be updated to the target hyperparameters, and the updated large language model can be used to generate an output result corresponding to the target text. In this way, for each target text input into the large language model, the target hyperparameters corresponding to the above-mentioned large language model when processing the target text can be obtained based on the text features of the target text and the historical hyperparameters corresponding to the historical text, and then the large language model after using the updated hyperparameters can be used to generate an output result corresponding to the target text. In this way, the hyperparameters of the large language model can be adjusted in a targeted manner according to the needs of the dialogue scenario to obtain output results that better meet user needs, which helps to improve user satisfaction.
[0011] In the embodiments of the present application, it should be understood that the above general description and the following detailed description are merely exemplary and explanatory and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0013] Figure 1 A flow chart of a large language model updating method provided in an embodiment of the present application is shown; Figure 2 A schematic diagram of a target hyperparameter prediction model for a large language model provided in an embodiment of the present application is shown; Figure 3 A schematic diagram of a retrieval process and a generation enhancement process provided by an embodiment of the present application is shown; Figure 4 A schematic diagram of a reordering model provided in an embodiment of the present application is shown; Figure 5 A schematic diagram of an agent-driven home-customer integrated adjustment and maintenance system provided in an embodiment of the present application is shown; Figure 6 A schematic diagram showing the overall structure of a home-guest integrated coordination intelligent agent provided in an embodiment of the present application is shown; Figure 7 A schematic diagram of the structure of a large language model updating device provided in an embodiment of the present application is shown; Figure 8A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown; Figure 9 A schematic structural diagram of another electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0014] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0015] A token, or word unit, usually refers to a discrete text unit in a large language model. It can be a word, punctuation mark, number, or other language element. These elements are used as the basic unit for training and generating text.
[0016] Temperature sampling controls the randomness of generated text by adjusting the temperature coefficient of the probability distribution. Higher temperature values may increase the sampling chance of low-probability tokens, thereby improving the diversity of the text.
[0017] Top-k sampling is an optimization of greedy sampling (selecting the token with the highest probability from all tokens). Its parameter K represents the number of tokens to be selected. K can be set by the user and is usually a positive integer. When K=1, Top-K sampling is greedy sampling. Specifically, the first K tokens are selected from the results of the descending probability sort, and a random selection from these K tokens is used as the output. Although this sampling method is simple and efficient, it may result in insufficient diversity in the generated text.
[0018] Top-p sampling selects tokens by percentage from the results of descending probability sorting. Its parameter P is equivalent to a cumulative probability threshold. P is greater than or equal to 0 and less than or equal to 1, and P is usually set to a relatively high value. Specifically, in the descending probability sorting results, starting with the token with the highest probability, the cumulative probability of the first L tokens is calculated. Then, a token is randomly selected as the output from the minimum set whose cumulative probability is greater than or equal to probability P (that is, the set including the first L tokens when the first L tokens are greater than or equal to P for the first time). L is a natural number. This sampling strategy can increase the diversity of the text while maintaining a certain level of accuracy.
[0019] In summary, temperature sampling can adjust the randomness and creativity of generated text. High values promote diversity but may reduce coherence, while low values enhance certainty and coherence at the expense of diversity. Top-k sampling randomly selects from the K most likely words, introducing randomness while maintaining quality. Top-p sampling selects a subset of words with a cumulative probability exceeding P, adapting to changes in the probability distribution and improving text quality.
[0020] Large language models suffer from hallucinations and lack of interpretability. A common approach to alleviating these hallucinations is to incorporate domain knowledge bases to improve the factuality and rationality of generated content. Retrieval-augmented generation (RAG) is a cutting-edge technology that combines retrieval and generation. It retrieves text snippets or information related to the input from a corpus or knowledge base and uses them as additional input or reference for the generative model, guiding the model to produce more accurate and rich natural language output.
[0021] There are some challenges in the implementation of retrieval enhancement generation technology, mainly manifested in the problem of insufficient retrieval accuracy. The multiple document blocks retrieved contain content that is irrelevant to the user's question, affecting the quality of the final response content.
[0022] With the rapid development of the digital economy, the number of home broadband users has exceeded 560 million and continues to grow. This achievement is inseparable from the tacit cooperation and unremitting efforts of the installation and maintenance team and the support team. Together, they have laid a solid foundation for creating an intelligent and efficient home broadband network environment.
[0023] The basic process for home broadband installation and maintenance is as follows: Upon receiving a user's installation and maintenance work order, the installation and maintenance personnel will visit the user's site to install or maintain the broadband network. During this process, they will need to obtain installation and maintenance information or perform related operations to assist in the execution of the installation and maintenance, such as resetting the user's broadband password, querying the device's optical power, and reassigning the work order. The installation and maintenance personnel will send a text message to the backend support personnel through the mobile app. The support personnel will perform operations on the integrated coordination system based on the text content and then return the query or execution results to the installation and maintenance user through the app frontend to assist the installation and maintenance personnel in their on-site work, thus completing a closed-loop support loop for the integrated installation and maintenance.
[0024] In related solutions, a large language model is used to replace installation and maintenance personnel to provide installation and maintenance support. The large language model can perform deep semantic understanding based on user input text, analyze user intentions and extract key entity information in the text, retrieve relevant knowledge with the help of the domain knowledge base or drive the comprehensive coordination system to execute automatic tool calls to generate user reply information, and build a more automated and intelligent home broadband installation and maintenance support system.
[0025] The application of large language models in the field of integrated home customer service and maintenance still faces some challenges, mainly manifested in the following aspects: (1) Large language models have unique advantages in text understanding, especially generation. However, the balance between the quality and diversity of the generated results is insufficient, and they cannot achieve ideal results in human-computer dialogue scenarios, which restricts the practical application of large language models.
[0026] (2) Large language models lack domain knowledge capabilities and suffer from severe hallucinations, making them incapable of handling professional knowledge dialogue scenarios. Although there are currently solutions for enhancing the generation of retrieval from application domain knowledge bases, intelligent question-and-answer scenarios for home maintenance and maintenance involve a large number of knowledge documents. Directly applying existing retrieval enhancement methods can lead to problems such as incomplete document information retrieval and insufficient retrieval accuracy.
[0027] In response to the problems in the related technology, the embodiment of the present application proposes a large language model update solution to solve at least one of the above-mentioned technical problems. The technical solution provided by the embodiment of the present application is described below in conjunction with the accompanying drawings.
[0028] Figure 1 The flowchart of a large language model updating method provided by an exemplary embodiment of the present application is shown, and the method can be executed by an electronic device. The electronic device can be a terminal such as a mobile phone or a computer. Figure 1 As shown, the method mainly includes the following steps: S101: Perform vector encoding on the target text input into the large language model to obtain a text vector corresponding to the target text.
[0029] In an embodiment of the present application, the target text input into a large language model can be vectorized and encoded, thereby obtaining a text vector corresponding to the target text. Text vectorization (text vectorization) is the process of converting text into a numerical vector and is a fundamental technology in natural language processing. Through text vectorization, the target text can be represented in a form that can be processed by a computer, facilitating subsequent analysis and mining.
[0030] Common text vectorization methods include one-hot encoding, bag-of-words, term frequency–inverse document frequency (TF-IDF), word2vec, and doc2vec. In one-hot encoding, each word is represented as a vector with n elements, where only one element in the word vector is 1 and all other elements are 0. The positions of the 0 elements vary from word to word, where n is the total number of unique words in the entire corpus. The bag-of-words model is a text vectorization method that uses words as the basic processing unit. It treats text as a collection of words, ignoring word order and grammatical structure. TF-IDF is a statistical method based on word frequency that is used to assess the importance of a word to a document collection or a document in a corpus. word2vec is an open-source toolkit for obtaining word vectors. It can determine the similarity between words by training on large corpora. doc2vec is an extension of word2vec that can represent sentences, paragraphs, or entire articles as vectors. Text vectorization is a fundamental task in natural language processing, and its quality directly affects the performance of the entire natural language processing system.
[0031] In practical applications, appropriate methods and parameters can be selected, and necessary optimization and adjustments can be made to vectorize the target text input into the large language model to achieve better encoding results. The specific implementation process is not specifically limited in the embodiments of this application.
[0032] In practical applications, the large language model described above can be used in the field of integrated home customer service and installation and maintenance, which can solve problems such as delayed manual feedback and effectively improve installation and maintenance efficiency. It can also be used in other fields, and this application embodiment does not specifically limit it.
[0033] S102: Perform feature extraction on the text vector to obtain an intermediate vector corresponding to the text vector.
[0034] The intermediate vector is used to indicate the text feature corresponding to the target text.
[0035] In an embodiment of the present application, feature extraction can be performed on the text vector to obtain an intermediate vector for indicating the text features corresponding to the target text. The above-mentioned text features can reflect the user's preference for answer diversity and / or generation quality in the current dialogue scenario. For example, some text features of the target text can reflect that the user expects the large language model to give accurate and high-quality replies, and some text features can reflect that the user expects the large language model to give answers with strong diversity and high fluency. For example, the user is a maintenance worker engaged in the home broadband installation and maintenance industry, and the input target text is "What are the causes of a certain home broadband installation and maintenance failure?" Through the above-mentioned feature extraction process, the intermediate vector of the target text can be obtained, reflecting that the user expects the large language model to give answers with strong diversity, and then check the causes one by one. If the input target text is "What is the solution to a specific error?", the intermediate vector of the target text can be obtained, which further reflects that the user expects the large language model to give more accurate and high-quality answers to solve the error more quickly.
[0036] In practical applications, the BERT model (Bidirectional Encoder Representation from Transformers) can be used to extract text features. This model is based on the Transformer architecture, can provide two-way context understanding capabilities, and can significantly improve the performance of complex tasks. The advantages of this model are strong semantic representation and strong adaptability; the disadvantages are high computing resource consumption and a large model. In practical applications, other models, such as the bag-of-words model and the TF-IDF model, can also be used for feature extraction. Of course, the n-gram model or some deep learning models can also be used for feature extraction to fully mine text information. The specific feature extraction method is not specifically limited in the embodiments of this application.
[0037] S103: Obtain target hyperparameters corresponding to the large language model when processing the target text based on the intermediate vector and the historical hyperparameters corresponding to the historical text.
[0038] The historical text is the historical data corresponding to the target text.
[0039] In this embodiment of the present application, the target hyperparameters corresponding to the large language model when processing the target text can be obtained based on the historical hyperparameters corresponding to the intermediate vector and the historical text of the target text. In practical applications, the historical text is generally the previous historical data of the user who input the target text. Of course, it can also be the previous previous historical data of the previous previous input, which is not specifically limited in this embodiment of the present application.
[0040] This allows the user's current preferences for answer diversity and / or generation quality to be combined with historical hyperparameters to generate the target hyperparameters required by the large language model when processing the current target text. For example, if the user expects diverse answers and the large language model uses temperature sampling, the generated temperature value should be relatively high, as a higher temperature value increases the chance of sampling low-probability tokens, thereby improving text diversity. If the user expects highly deterministic answers, the generated temperature value should be relatively low.
[0041] S104: Updating the hyperparameters of the large language model to the target hyperparameters, and using the updated large language model to generate an output result corresponding to the target text.
[0042] In an embodiment of the present application, the hyperparameters of the large language model can be updated to the above-mentioned target hyperparameters, and then the updated large language model can be used to generate an output result corresponding to the target text.
[0043] The embodiment of the present application can analyze each target text input by the user to obtain the user's preference for answer diversity and / or generation quality in the current dialogue scenario, and then obtain more targeted target hyperparameters, and then use the above target hyperparameters to update the hyperparameters of the large language model, and then use the updated large language model to generate output results corresponding to the target text. Compared with the related art, a set of fixed values are used as the hyperparameters of the large language model to obtain the output results of the input text. The embodiment of the present application updates the hyperparameters of the large language model by using target hyperparameters that meet the expectations of the target text input into the large language model, and then uses the updated large language model to obtain output results corresponding to the target text. This can solve the problem that the related art is difficult to adapt to the needs of various dialogue scenarios and meet the needs of different dialogue scenarios.
[0044] In an embodiment of the present application, the target text input into the large language model can be vectorized and encoded to obtain a text vector corresponding to the target text; then, feature extraction is performed on the text vector to obtain an intermediate vector indicating the text features of the target text; and then, based on the intermediate vector and the historical hyperparameters corresponding to the historical text, the target hyperparameters corresponding to the above-mentioned large language model when processing the target text can be obtained, and finally, the hyperparameters of the above-mentioned large language model can be updated to the target hyperparameters, and the updated large language model can be used to generate an output result corresponding to the target text. In this way, for each target text input into the large language model, the target hyperparameters corresponding to the above-mentioned large language model when processing the target text can be obtained based on the text features of the target text and the historical hyperparameters corresponding to the historical text, and then the large language model after using the updated hyperparameters can be used to generate an output result corresponding to the target text. In this way, the hyperparameters of the large language model can be adjusted in a targeted manner according to the needs of the dialogue scenario to obtain output results that meet user needs, which helps to improve user satisfaction.
[0045] In an optional implementation, the performing feature extraction on the text vector to obtain the intermediate vector corresponding to the text vector may include: The text vector is input into a bidirectional long short-term memory model to obtain an intermediate vector corresponding to the text vector, wherein the bidirectional long short-term memory model is used to extract features from the text vector.
[0046] In this embodiment, to reduce generation latency, a Bidirectional Long Short-Term Memory (BiLSTM) model with fewer parameters can be used instead of the complex BERT model for feature extraction from text vectors. In practical applications, a text vector can be input into the Bidirectional Long Short-Term Memory model to obtain the corresponding intermediate vector, thus balancing inference performance and time consumption.
[0047] In an optional implementation, obtaining target hyperparameters corresponding to the large language model when processing the target text based on the historical hyperparameters corresponding to the intermediate vector and the historical text may include: The intermediate vector and the historical hyperparameters corresponding to the historical text are input into a deep neural network to obtain target hyperparameters, wherein the deep neural network is used to generate the target hyperparameters according to the intermediate vector and the historical hyperparameters.
[0048] In practical applications, deep neural networks (DNNs) are a complex form of machine learning, falling within the broader category of artificial neural networks (ANNs). DNNs mimic the processing methods of the human brain, processing data through a multi-layered (or "deep") neural architecture to solve a variety of complex data-driven problems. These networks connect input and output layers through multiple hidden layers, each containing multiple neurons that process signals through activation functions. A key feature of DNNs is their ability to learn and identify patterns in data through multiple levels of abstraction, enabling them to perform complex tasks such as classification and prediction. DNNs have strong feature learning capabilities, enabling them to capture complex nonlinear relationships in data with high accuracy, excellent generalization performance, and high computational efficiency.
[0049] In the embodiment of the present application, the intermediate vector and the historical hyperparameters corresponding to the historical text can be input into the deep neural network to obtain the target hyperparameters. In this way, the target hyperparameters with high accuracy can be obtained, which helps to meet the user's needs for the target text.
[0050] In an optional implementation, the target hyperparameter includes at least one of the following: a target temperature hyperparameter, a target top-k hyperparameter, and a target top-p hyperparameter; the deep neural network includes at least one of the following: a first deep neural network, a second deep neural network, and a third deep neural network.
[0051] In an embodiment of the present application, the large language model may use at least one of temperature sampling, top-k sampling, and top-p sampling for sampling and decoding. Correspondingly, the target hyperparameters may include target temperature hyperparameters, target top-k hyperparameters, and target top-p hyperparameters. Furthermore, the first deep neural network, the second deep neural network, and the third deep neural network may be used to process the intermediate vector. It should be noted that the deep neural networks are independent of each other, that is, one deep neural network can generate one target hyperparameter.
[0052] In an optional implementation, obtaining target hyperparameters corresponding to the large language model when processing the target text based on the intermediate vector and the historical hyperparameters corresponding to the historical text may include at least one of the following three situations: In the first case, when the target hyperparameters include target temperature hyperparameters, the intermediate vector and the historical temperature hyperparameters corresponding to the historical text are input into the first deep neural network to obtain the target temperature hyperparameters corresponding to the large language model when processing the target text, wherein the first deep neural network is used to generate the target temperature hyperparameters based on the intermediate vector and the historical temperature hyperparameters.
[0053] In an embodiment of the present application, when the large language model adopts temperature sampling for sampling, that is, when the target hyperparameter includes a target temperature hyperparameter, the intermediate vector and the historical temperature hyperparameter corresponding to the historical text can be input into the first deep neural network to obtain the target temperature hyperparameter corresponding to the large language model when processing the target text. In this way, the target temperature hyperparameter corresponding to the large language model when processing the target text can be obtained, and then the above-mentioned large language model adopts the target temperature hyperparameter for sampling instead of a fixed value, which can meet the user's demand for answer diversity.
[0054] In the second case, when the target hyperparameters include target top-k hyperparameters, the intermediate vector and the historical top-k hyperparameters corresponding to the historical text are input into the second deep neural network to obtain the target top-k hyperparameters corresponding to the large language model when processing the target text, wherein the second deep neural network is used to generate the target top-k hyperparameters based on the intermediate vector and the historical top-k hyperparameters.
[0055] In an embodiment of the present application, when the large language model adopts a top-k sampling method for sampling, that is, when the target hyperparameters include target top-k hyperparameters, the intermediate vector and the historical top-k hyperparameters corresponding to the historical text can be input into the second deep neural network to obtain the target top-k hyperparameters corresponding to the large language model when processing the target text. In this way, the target top-k hyperparameters corresponding to the large language model when processing the target text can be obtained, and then the large language model adopts the target top-k hyperparameters for sampling instead of fixed values, which can meet the user's requirements for answer quality and randomness.
[0056] In a third case, when the target hyperparameters include target top-p hyperparameters, the intermediate vector and the historical top-p hyperparameters corresponding to the historical text are input into the third deep neural network to obtain the target top-p hyperparameters corresponding to the large language model when processing the target text, wherein the third deep neural network is used to generate the target top-p hyperparameters based on the intermediate vector and the historical top-p hyperparameters.
[0057] In an embodiment of the present application, when the large language model uses top-p sampling for sampling, that is, when the target hyperparameters include target top-p hyperparameters, the intermediate vector and the historical top-p hyperparameters corresponding to the historical text can be input into a third deep neural network to obtain the target top-p hyperparameters corresponding to the large language model when processing the target text. In this way, the target top-p hyperparameters corresponding to the large language model when processing the target text can be obtained. The large language model can use the above target top-p hyperparameters for sampling rather than fixed values, thereby meeting the user's requirements for text quality.
[0058] In practical applications, a schematic diagram of a target hyperparameter prediction model (sampling parameter prediction model) for a large language model is shown below: Figure 2 As shown in the figure, the user input text is first vectorized and encoded to obtain a text vector, and then processed using the BiLSTM model to obtain an intermediate vector. Finally, the intermediate vector and the sampling parameter values of the previous round are input into each independent DNN network to generate the corresponding target hyperparameters.
[0059] It should be noted that the target hyperparameters obtained above are the initial values of the large language model during the decoding process, that is, the hyperparameters during the first decoding process. Whether the values of the hyperparameters in the subsequent decoding process of the large language model are consistent with the above target hyperparameters is not specifically limited in this embodiment of the application.
[0060] In related technologies, the probability distribution of the next token is given by the normalized exponential function ( softmax ) is calculated, and the specific process is shown in the following formula for example:
[0061] in, The first k tokens, l is the logical value vector output by the large language model ( logit s), p is the predicted probability distribution of the next token.
[0062] In order to better balance the quality and diversity of the generated results, in an embodiment of the present application, when the large language model adopts temperature sampling, that is, when the target hyperparameter includes the target temperature hyperparameter, dynamic temperature adjustment can be used for decoding. The above-mentioned dynamic temperature adjustment acts on each token generation link. The temperature coefficient of the traditional decoding process is usually fixed. However, in most cases, a fixed temperature value is not the best choice, and the probability distribution of the large language model fluctuates during the decoding process. Therefore, a dynamic temperature adjustment mechanism is particularly necessary.
[0063] In an optional implementation, updating the hyperparameters of the large language model to the target hyperparameters and using the updated large language model to generate an output result corresponding to the target text may include the following steps: Step 1: When the target hyperparameter includes a target temperature hyperparameter, obtain the target temperature coefficient corresponding to the second word-gram based on the entropy value of the probability distribution of the first word-gram, the mean and variance of the probability distribution of the first word-gram, and the original temperature coefficient of the first word-gram, wherein the first word-gram is the current word-gram generated by the large language model according to the target text, and the second word-gram is the next word-gram generated by the large language model according to the first word-gram.
[0064] In the embodiment of the present application, the degree of dispersion can be calculated based on the original predicted probability distribution, and the temperature coefficient can be adjusted to recalibrate the predicted probability distribution. The specific process can be seen in the following formula:
[0065]
[0066] in, Entropy To pass the original probability distribution p The calculated entropy value (the entropy value of the probability distribution of the first word), are the mean and variance of the probability distribution, The temperature sample value (original temperature coefficient) when the previous token (first word) was generated. 、 is a configurable hyperparameter, The entropy value describes the confidence level of the original probability distribution, while the ratio of the variance to the mean describes the degree of dispersion of the original probability distribution. These two components are weighted together to adaptively adjust the original temperature coefficient, allowing for a more reasonable temperature coefficient to be obtained in subsequent decoding steps.
[0067] Step 2: Update the hyperparameter of the large language model when obtaining the probability distribution of the second word to the target temperature coefficient, and use the updated large language model to generate an output result corresponding to the target text.
[0068] In an embodiment of the present application, the hyperparameters of the large language model when obtaining the probability distribution of the second word can be updated to the target temperature coefficient, and the updated large language model can be used to generate an output result corresponding to the target text.
[0069] Exemplarily, the calculation process of the probability distribution of the second word is as follows:
[0070] Through the above method, the temperature coefficient can be adaptively adjusted so that the large language model can obtain output results that are more in line with user expectations.
[0071] In an optional implementation, before vectorizing and encoding the target text input into the large language model to obtain a text vector corresponding to the target text, the method further includes the following steps: Step 1: Search the target text to obtain N relevant documents corresponding to the target text, where N is an integer greater than 1.
[0072] In an embodiment of the present application, a target text can be searched to obtain N related documents corresponding to the target text. In practical applications, sparse search, dense search, and image-text search can be used for retrieval. Sparse search can retrieve similar code snippets in terms of syntax, dense search can retrieve similar code snippets in terms of semantics, and image-text search can store key-value pairs in the form of images and text, and obtain the corresponding text value after similarity matching based on the image. Combining the three types of search results can obtain richer search content.
[0073] Step 2: Reorder the N relevant documents to obtain M relevant documents, where M is an integer greater than 1 and N is greater than or equal to M. In this embodiment of the present application, the results obtained by the above retrieval (N relevant documents) can be further reordered to obtain better retrieval results.
[0074] Figure 3 The above-mentioned retrieval process and generation enhancement process are shown. The reranking process is between recall retrieval and enhanced generation. After obtaining the retrieved text, a new prompt word is constructed in combination with the original input. This can guide the large language model to answer questions based on background information and generate more professional answers.
[0075] In an optional implementation, for the above step 2, obtaining M relevant documents by reordering the N relevant documents may include the following steps: Step 21 : Obtain semantic dimension features of the target text and the N related documents by performing dense vector encoding on the target text and the N related documents.
[0076] Semantic dimension features are features at the semantic level. In practical applications, the BERT module can be used to perform dense vector encoding on the target text input by the user and the text content of related documents to obtain the semantic dimension features of the text, and then obtain the similarity between the target text and N related documents at the semantic level, which can maintain a balance between inference latency and effect.
[0077] Step 22: Obtain syntactic dimension similarity features of the target text and the N related documents by performing sparse vector encoding on the target text and the N related documents.
[0078] The syntactic dimension similarity feature is a vocabulary-level feature, that is, the frequency of the keywords in the user question appearing in related documents. In practical applications, the TF-IDF module can be used to perform sparse vector encoding on the text content of the target text and related documents to obtain the syntactic dimension similarity feature.
[0079] Step 23: Obtain prediction scores of the N related documents based on the semantic dimension features, the syntactic dimension similarity features, and the basic features of the N related documents, wherein the prediction scores are used to indicate the degree of similarity between the related documents and the target text.
[0080] In an embodiment of the present application, the basic features of the relevant documents include the document type, keywords, etc. of the relevant documents. After the above multi-dimensional features are spliced, they can be input into a multi-layer deep neural network module for calculation to obtain the predicted scores corresponding to each relevant document. In actual applications, in the process of calculating the predicted scores, combining some basic attributes of the relevant documents can effectively assist in improving the accuracy of the relevance score calculation. In order to prevent the inference delay from being too large, in actual applications, a simple three-layer DNN network can be used to transform all features, and the initial relevance score (the predicted score of N relevant documents) can be calculated through a sigmoid function.
[0081] Step 24 : Based on the predicted scores of the N related documents, M related documents having predicted scores greater than a preset value are selected from the N related documents.
[0082] In this embodiment of the present application, based on the predicted scores of the N relevant documents, M relevant documents with predicted scores greater than a preset value can be selected from the N relevant documents. The M relevant documents thus obtained have a high degree of relevance, or similarity, to the target text, thereby improving the accuracy of the retrieval.
[0083] In the embodiment of the present application, the above steps can be used to re-rank the retrieved content to obtain the most relevant documents (M relevant documents) to improve the accuracy of the retrieval results. In practical applications, the schematic diagram of the re-ranking model is as follows Figure 4 shown.
[0084] In practical applications, the large language model updating method proposed in the embodiment of this application can be applied to the field of home broadband installation and maintenance. The overall process of the home customer integrated adjustment and maintenance system driven by the intelligent agent is as follows: Figure 5As shown, the installation and maintenance personnel send a text message of their needs, and the home customer installation and maintenance comprehensive coordination assistant automatically intercepts the text message, recognizes the user's intention, and automatically calls the comprehensive coordination system function to perform the corresponding query or operation function, or retrieves relevant information based on the domain knowledge base. The comprehensive coordination assistant response engine generates the corresponding results and returns them to the installation and maintenance personnel to assist in completing the home broadband installation and maintenance work. The main functions are: (1) Function scheduling of the integrated coordination system: The home broadband installation and maintenance assistant performs semantic understanding and analysis based on the text input by the user, accurately identifies the user's intention and extracts key information, calls the integrated coordination system function to execute the query or operation function, obtains the execution or query results, and realizes the closed loop of the entire process of automatic tool calling for home broadband installation and maintenance.
[0085] (2) Intelligent Q&A of Installation and Maintenance Knowledge: The large language model has powerful text generation capabilities, but it suffers from serious hallucinations in installation and maintenance domain knowledge Q&A scenarios. The installation and maintenance Q&A function introduces retrieval enhancement generation technology to improve the Q&A effect. Based on the user input text, relevant background knowledge information is retrieved from the domain knowledge base. The large language model then combines this background knowledge to generate more accurate responses. When frontline installation and maintenance personnel, especially those who lack experience, encounter unhandled installation and maintenance problems, they can ask the comprehensive coordination assistant for some installation and maintenance cases and solutions to guide the installation and maintenance work smoothly.
[0086] (3) Diagnosis, Identification and Troubleshooting: Fault diagnosis and analysis are performed based on on-site images, and preliminary diagnostic conclusions are given to assist maintenance personnel in quickly diagnosing and troubleshooting. Intent analysis is performed based on user input text, and OCR capabilities are used to extract text information from the input image data. The large language model then understands and analyzes the recognized text data, and generates diagnostic results in combination with the domain knowledge base or external tools.
[0087] The overall structure of the home-guest integrated intelligent agent is as follows Figure 6 As shown in the figure, the home-customer coordination agent is built around the LLM. When a user makes a request, the agent perceives the environment, forms memories, and plans and makes decisions. Its implementation is strongly related to large language model technology, and its performance depends on the large language model itself.
[0088] Planning: Breaking down large, complex tasks into smaller, manageable sub-goals allows for efficient handling of complex tasks. Self-criticism and self-reflection on past actions, learning from mistakes and making improvements for future steps, thereby improving the quality of the final outcome.
[0089] Memory: Multi-round dialogue information is learned as context into short-term memory, and external vector storage and fast retrieval are used as long-term memory.
[0090] Tools: Build comprehensive coordination system API tool components that support intelligent agents to perform and operate various tasks, helping intelligent agents to achieve various complex functions.
[0091] Execution: The agent calls the corresponding tools for specific execution based on its planning and thinking.
[0092] The integrated coordination intelligent body drives the installation and maintenance system to automatically arrange scheduling, installation and maintenance knowledge Q&A, intelligent diagnosis and troubleshooting, etc., quickly respond to home customers' installation and maintenance demands, reduce the workload of the integrated coordination center personnel, and help front-line installation and maintenance personnel improve the efficiency of home broadband operation delivery.
[0093] The large language model updating method provided in the embodiment of the present application can be executed by a large language model updating device. In the embodiment of the present application, the large language model updating device executing the large language model updating method is used as an example to illustrate the large language model updating device provided in the embodiment of the present application.
[0094] Figure 7 The schematic diagram of the structure of a large language model updating device provided by an exemplary embodiment of the present application is shown. The large language model updating device can implement the following Figure 1 In the embodiment shown, all or part of the content, the large language model updating device includes: a first acquisition module 701 , a second acquisition module 702 , a third acquisition module 703 and a generation module 704 .
[0095] In an embodiment of the present application, a first acquisition module 701 is used to vectorize and encode the target text input into the large language model to obtain a text vector corresponding to the target text; a second acquisition module 702 is used to perform feature extraction on the text vector to obtain an intermediate vector corresponding to the text vector, wherein the intermediate vector is used to indicate the text features corresponding to the target text; a third acquisition module 703 is used to obtain the target hyperparameters corresponding to the large language model when processing the target text based on the intermediate vector and the historical hyperparameters corresponding to the historical text, wherein the historical text is the historical data corresponding to the target text; a generation module 704 is used to update the hyperparameters of the large language model to the target hyperparameters, and use the updated large language model to generate an output result corresponding to the target text.
[0096] In an optional implementation, the second acquisition module 702 is configured to perform feature extraction on the text vector to obtain an intermediate vector corresponding to the text vector, including: The text vector is input into a bidirectional long short-term memory model to obtain an intermediate vector corresponding to the text vector, wherein the bidirectional long short-term memory model is used to extract features from the text vector.
[0097] In an optional implementation, the third acquisition module 703 is configured to obtain target hyperparameters corresponding to the large language model when processing the target text based on the historical hyperparameters corresponding to the intermediate vector and the historical text, including: The intermediate vector and the historical hyperparameters corresponding to the historical text are input into a deep neural network to obtain target hyperparameters, wherein the deep neural network is used to generate the target hyperparameters according to the intermediate vector and the historical hyperparameters.
[0098] In an optional implementation, the target hyperparameter includes at least one of the following: a target temperature hyperparameter, a target top-k hyperparameter, and a target top-p hyperparameter; the deep neural network includes at least one of the following: a first deep neural network, a second deep neural network, and a third deep neural network; In an optional implementation, the third acquisition module 703 is configured to obtain target hyperparameters corresponding to the large language model when processing the target text based on the historical hyperparameters corresponding to the intermediate vector and the historical text, including: In a case where the target hyperparameter includes a target temperature hyperparameter, inputting the intermediate vector and the historical temperature hyperparameter corresponding to the historical text into the first deep neural network to obtain the target temperature hyperparameter corresponding to the large language model when processing the target text, wherein the first deep neural network is used to generate the target temperature hyperparameter based on the intermediate vector and the historical temperature hyperparameter; and / or, In a case where the target hyperparameters include target top-k hyperparameters, inputting the intermediate vector and the historical top-k hyperparameters corresponding to the historical text into the second deep neural network to obtain the target top-k hyperparameters corresponding to the large language model when processing the target text, wherein the second deep neural network is used to generate the target top-k hyperparameters based on the intermediate vector and the historical top-k hyperparameters; and / or In a case where the target hyperparameters include target top-p hyperparameters, the intermediate vector and the historical top-p hyperparameters corresponding to the historical text are input into the third deep neural network to obtain the target top-p hyperparameters corresponding to the large language model when processing the target text, wherein the third deep neural network is used to generate the target top-p hyperparameters based on the intermediate vector and the historical top-p hyperparameters.
[0099] In an optional implementation, the generation module 704 is configured to update the hyperparameters of the large language model to the target hyperparameters, and use the updated large language model to generate an output result corresponding to the target text, including: When the target hyperparameter includes a target temperature hyperparameter, obtaining a target temperature coefficient corresponding to a second word-gram based on an entropy value of a probability distribution of a first word-gram, a mean and a variance of the probability distribution of the first word-gram, and an original temperature coefficient of the first word-gram, wherein the first word-gram is a current word-gram generated by the large language model based on the target text, and the second word-gram is a next word-gram generated by the large language model based on the first word-gram; Updating the hyperparameter of the large language model when obtaining the probability distribution of the second word to the target temperature coefficient, and using the updated large language model to generate an output result corresponding to the target text, In an optional implementation, the device further includes a retrieval module configured to search the target text and obtain N related documents corresponding to the target text, where N is an integer greater than 1; In an optional implementation, the apparatus further includes a reordering module configured to obtain M relevant documents by reordering the N relevant documents, wherein M is an integer greater than 1, and N is greater than or equal to M.
[0100] In an optional implementation, the reordering module, configured to obtain M relevant documents by reordering the N relevant documents, includes: Obtaining semantic dimension features of the target text and the N related documents by performing dense vector encoding on the target text and the N related documents; Obtaining syntactic dimension similarity features of the target text and the N related documents by performing sparse vector encoding on the target text and the N related documents; Obtaining prediction scores for the N related documents based on the semantic dimension features, the syntactic dimension similarity features, and the basic features of the N related documents, wherein the prediction scores are used to indicate the degree of similarity between the related documents and the target text; According to the predicted scores of the N relevant documents, M relevant documents having predicted scores greater than a preset value are selected from the N relevant documents.
[0101] The large language model updating device in the embodiments of the present application can be an electronic device or a component of an electronic device, such as an integrated circuit or chip. The electronic device can be a terminal or other device other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. It can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc., and the embodiments of the present application are not specifically limited.
[0102] The large language model updating device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0103] The large language model updating device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented in the method embodiment are not described here.
[0104] Alternatively, as Figure 8 As shown, the embodiment of the present application further provides an electronic device 800, including a processor 801 and a memory 802, wherein the memory 802 stores a program or instruction that can be run on the processor 801, and when the program or instruction is executed by the processor 801, the above Figure 1 The various steps of the large language model updating method shown in the figure can achieve the same technical effect. To avoid repetition, they will not be described here.
[0105] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0106] Figure 9The following is a block diagram of another electronic device 900 according to an exemplary embodiment of the present application. The electronic device 900 can be implemented as a smartphone, tablet computer, laptop computer, desktop computer, smartwatch, television, etc. The electronic device 900 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
[0107] Typically, the electronic device 900 includes a processor 901 and a memory 902 .
[0108] Processor 901 may include one or more processing cores, such as an octa-core processor or a decitalic processor. Processor 901 may be implemented in hardware using at least one of the following: a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), or a PLA (Programmable Logic Array). Processor 901 may also include a main processor and a coprocessor. The main processor is used to process data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 901 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing content displayed on the display screen. In some embodiments, processor 901 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0109] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one instruction, which is used to be executed by the processor 901 to implement all or part of the steps in the large language model update method shown in the method embodiment of the present application.
[0110] In some embodiments, electronic device 900 may optionally include a peripheral device interface 903 and at least one peripheral device. The processor 901, memory 902, and peripheral device interface 903 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 903 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 904, a display screen 905, a camera assembly 906, an audio circuit 907, and a power supply 908.
[0111] In some embodiments, the electronic device 900 further includes one or more sensors 909 , including but not limited to: an acceleration sensor 910 , a gyroscope sensor 911 , a pressure sensor 912 , an optical sensor 913 , and a proximity sensor 914 .
[0112] Those skilled in the art will understand that Figure 9 The structure shown in the figure does not constitute a limitation on the electronic device 900, and the electronic device 900 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0113] An embodiment of the present application also provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned large language model updating method are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0114] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0115] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned large language model updating method, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0116] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0117] An embodiment of the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the steps of the above-mentioned large language model updating method are implemented and the same technical effects can be achieved. To avoid repetition, they are not repeated here.
[0118] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered merely as exemplary, and the true scope and spirit of the present application are indicated by the claims.
[0119] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A large language model updating method, characterized in that: include: Vectorizing and encoding the target text input into the large language model to obtain a text vector corresponding to the target text; Performing feature extraction on the text vector to obtain an intermediate vector corresponding to the text vector, wherein the intermediate vector is used to indicate text features corresponding to the target text; Obtaining target hyperparameters corresponding to the large language model when processing the target text based on the intermediate vector and historical hyperparameters corresponding to historical texts, wherein the historical texts are historical data corresponding to the target text; The hyperparameters of the large language model are updated to the target hyperparameters, and the updated large language model is used to generate an output result corresponding to the target text.
2. The method according to claim 1, characterized in that The feature extraction of the text vector to obtain an intermediate vector corresponding to the text vector includes: The text vector is input into a bidirectional long short-term memory model to obtain an intermediate vector corresponding to the text vector, wherein the bidirectional long short-term memory model is used to extract features from the text vector.
3. The method according to claim 1, characterized in that Obtaining target hyperparameters corresponding to the large language model when processing the target text based on the intermediate vector and the historical hyperparameters corresponding to the historical text includes: The intermediate vector and the historical hyperparameters corresponding to the historical text are input into a deep neural network to obtain target hyperparameters, wherein the deep neural network is used to generate the target hyperparameters according to the intermediate vector and the historical hyperparameters.
4. The method according to claim 3, characterized in that The target hyperparameter includes at least one of the following: a target temperature hyperparameter, a target top-k hyperparameter, and a target top-p hyperparameter; the deep neural network includes at least one of the following: a first deep neural network, a second deep neural network, and a third deep neural network; Obtaining target hyperparameters corresponding to the large language model when processing the target text based on the intermediate vector and the historical hyperparameters corresponding to the historical text includes: In a case where the target hyperparameter includes a target temperature hyperparameter, inputting the intermediate vector and the historical temperature hyperparameter corresponding to the historical text into the first deep neural network to obtain the target temperature hyperparameter corresponding to the large language model when processing the target text, wherein the first deep neural network is used to generate the target temperature hyperparameter based on the intermediate vector and the historical temperature hyperparameter; and / or, In a case where the target hyperparameters include target top-k hyperparameters, inputting the intermediate vector and the historical top-k hyperparameters corresponding to the historical text into the second deep neural network to obtain the target top-k hyperparameters corresponding to the large language model when processing the target text, wherein the second deep neural network is used to generate the target top-k hyperparameters based on the intermediate vector and the historical top-k hyperparameters; and / or In a case where the target hyperparameters include target top-p hyperparameters, the intermediate vector and the historical top-p hyperparameters corresponding to the historical text are input into the third deep neural network to obtain the target top-p hyperparameters corresponding to the large language model when processing the target text, wherein the third deep neural network is used to generate the target top-p hyperparameters based on the intermediate vector and the historical top-p hyperparameters.
5. The method according to claim 4, characterized in that Updating the hyperparameters of the large language model to the target hyperparameters, and using the updated large language model to generate an output result corresponding to the target text, includes: When the target hyperparameter includes a target temperature hyperparameter, obtaining a target temperature coefficient corresponding to a second word-gram based on an entropy value of a probability distribution of a first word-gram, a mean and a variance of the probability distribution of the first word-gram, and an original temperature coefficient of the first word-gram, wherein the first word-gram is a current word-gram generated by the large language model based on the target text, and the second word-gram is a next word-gram generated by the large language model based on the first word-gram; The hyperparameter of the large language model when obtaining the probability distribution of the second word is updated to the target temperature coefficient, and the updated large language model is used to generate an output result corresponding to the target text.
6. The method according to claim 1, characterized in that Before vectorizing and encoding the target text input into the large language model to obtain a text vector corresponding to the target text, the method further includes: Searching the target text to obtain N relevant documents corresponding to the target text, where N is an integer greater than 1; M relevant documents are obtained by reordering the N relevant documents, where M is an integer greater than 1 and N is greater than or equal to M.
7. The method according to claim 1, characterized in that The obtaining of M relevant documents by reordering the N relevant documents includes: Obtaining semantic dimension features of the target text and the N related documents by performing dense vector encoding on the target text and the N related documents; Obtaining syntactic dimension similarity features of the target text and the N related documents by performing sparse vector encoding on the target text and the N related documents; Obtaining prediction scores for the N related documents based on the semantic dimension features, the syntactic dimension similarity features, and the basic features of the N related documents, wherein the prediction scores are used to indicate the degree of similarity between the related documents and the target text; According to the predicted scores of the N relevant documents, M relevant documents having predicted scores greater than a preset value are selected from the N relevant documents.
8. A large language model updating device, characterized in that: include: A first acquisition module is used to vectorize and encode the target text input into the large language model to obtain a text vector corresponding to the target text; A second acquisition module is configured to perform feature extraction on the text vector to obtain an intermediate vector corresponding to the text vector, wherein the intermediate vector is used to indicate text features corresponding to the target text; a third acquisition module, configured to obtain target hyperparameters corresponding to the large language model when processing the target text based on the intermediate vector and historical hyperparameters corresponding to historical texts, wherein the historical texts are historical data corresponding to the target text; A generation module is used to update the hyperparameters of the large language model to the target hyperparameters, and use the updated large language model to generate an output result corresponding to the target text.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Temperature sampling method and electronic equipment
CN121597834A