Version management method and device for large model, equipment and medium

By recording the order of prompt word data during the fine-tuning of the big model, the problem of inconvenient large model version management in the existing technology is solved, and the fine management and optimization of the big model is realized.

CN119272852APending Publication Date: 2025-01-07BAIDU (CHINA) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411328710.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing large-model version management methods fail to effectively record the fine-tuning process and related information of the large-model, resulting in difficulty in optimization.

Method used

By obtaining multiple prompt word data and verification data, the order of usage of prompt word data is recorded, and using these data to fine-tune and test the big model, achieving a complete record of the fine-tune and test process of the big model.

Benefits of technology

It realizes fine management of large model versions, improves the controllability and optimization effect of model training, and facilitates the version management and rollback of large model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119272852A_ABST
    Figure CN119272852A_ABST
Patent Text Reader

Abstract

The invention provides a version management method and device for a large model, equipment and a medium, relates to the technical field of artificial intelligence, in particular to the technical fields of machine learning, deep learning and the like, and can be used for application scenes such as generative search, document intelligent editing, intelligent assistants, virtual assistants, intelligent e-commerce and the like. The method comprises the steps that multiple pieces of cue word data and verification data are obtained, each piece of cue word data comprises a preset question and a true value answer, and the verification data are used for testing answers of a large model to multiple preset questions included in the multiple pieces of cue word data; numbering the plurality of prompt word data to obtain sequence information; according to the sequence information, performing fine tuning on the large model of the current version by using the plurality of cue word data in sequence to obtain a fine-tuned large model; testing the fine-tuned large model by using the verification data to obtain score information; recording a plurality of prompt word data, sequence information, score information and version information of the fine-tuned large model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, especially to technical fields such as machine learning and deep learning, and can be used in application scenarios such as generative search, intelligent document editing, intelligent assistants, virtual assistants, and intelligent e-commerce. It specifically relates to a version management method for large models, a version management device for large models, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include natural language processing technology, computer vision technology, speech recognition technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0003] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention

[0004] The present disclosure provides a version management method for a large model, a version management device for a large model, an electronic device, a computer-readable storage medium, and a computer program product.

[0005] According to one aspect of the present disclosure, a version management method for a large model is provided, comprising: obtaining a plurality of prompt word data and verification data, wherein each prompt word data includes a preset question and a true value answer, and the verification data is used to test the answers of the large model to the plurality of preset questions included in the plurality of prompt word data; numbering the plurality of prompt word data to obtain sequence information; according to the sequence information, sequentially using the plurality of prompt word data to fine-tune the current version of the large model to obtain the fine-tuned large model; using the verification data to test the fine-tuned large model to obtain score information; and recording the plurality of prompt word data, sequence information, score information and version information of the fine-tuned large model.

[0006] According to another aspect of the present disclosure, a version management device for a large model is provided, comprising: an acquisition unit, configured to acquire multiple prompt word data and verification data, wherein each prompt word data includes a preset question and a true value answer, and the verification data is used to test the answers of the large model to the multiple preset questions included in the multiple prompt word data; a numbering unit, configured to number the multiple prompt word data to obtain sequence information; a fine-tuning unit, configured to fine-tune the current version of the large model using the multiple prompt word data in sequence according to the sequence information to obtain the fine-tuned large model; a testing unit, configured to test the fine-tuned large model using the verification data to obtain score information; and a recording unit, configured to record the multiple prompt word data, sequence information, score information and version information of the fine-tuned large model.

[0007] According to another aspect of the present disclosure, an electronic device is provided, 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 to enable the at least one processor to execute the above method.

[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above method.

[0009] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the above method when executed by a processor.

[0010] According to one or more embodiments of the present disclosure, the present disclosure obtains multiple prompt word data for fine-tuning a large model and verification data for testing. While using the multiple prompt word data to fine-tune the large model, the use order of these prompt word data is recorded, thereby achieving a complete record of the large model fine-tuning and testing process, and facilitating version management of the large model.

[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0013] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;

[0014] Figure 2 A flowchart of a version management method for a large model according to an embodiment of the present disclosure is shown;

[0015] Figure 3 A flowchart of testing a fine-tuned large model using verification data according to an embodiment of the present disclosure is shown;

[0016] Figure 4 A flowchart of recording multiple prompt word data, sequence information, score information, and version information of a fine-tuned large model according to an embodiment of the present disclosure is shown;

[0017] Figure 5 A flowchart of a version management method for a large model according to an embodiment of the present disclosure is shown;

[0018] Figure 6 A structural block diagram of a version management device for a large model according to an embodiment of the present disclosure is shown; and

[0019] Figure 7 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0021] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.

[0022] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.

[0023] In the related art, the existing version management method of the large model does not well record the fine-tuning process of the large model or information related to the fine-tuning process, which is not convenient for optimizing the large model.

[0024] To solve the above problems, the present invention obtains multiple prompt word data for fine-tuning the large model and verification data for testing. While using multiple prompt word data to fine-tune the large model, the usage order of these prompt word data is recorded, thereby achieving a complete record of the large model fine-tuning and testing process, which is convenient for version management of the large model.

[0025] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0026] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.

[0027] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable execution of the methods of the present disclosure.

[0028] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0029] exist Figure 1In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.

[0030] The user can use client devices 101, 102, 103, 104, 105 and / or 106 to perform human-computer interaction. The client device can provide an interface that enables the user of the client device to interact with the client device. The client device can also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.

[0031] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.

[0032] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0033] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0034] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0035] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and / or 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and / or 106.

[0036] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.

[0037] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.

[0038] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.

[0039] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.

[0040] According to one aspect of the present disclosure, a version management method for a large model is provided. Figure 2 As shown, the method includes: step S201, obtaining multiple prompt word data and verification data, wherein each prompt word data includes a preset question and a true value answer, and the verification data is used to test the answers of the large model to the multiple preset questions included in the multiple prompt word data; step S202, numbering the multiple prompt word data to obtain sequence information; step S203, according to the sequence information, using the multiple prompt word data in turn to fine-tune the current version of the large model to obtain the fine-tuned large model; step S204, using the verification data to test the fine-tuned large model to obtain score information; and step S205, recording the multiple prompt word data, sequence information, score information and version information of the fine-tuned large model.

[0041] Therefore, by obtaining multiple prompt word data for fine-tuning the large model and verification data for testing, the usage order of these prompt word data is recorded while using multiple prompt word data to fine-tune the large model, thereby achieving a complete record of the large model fine-tuning and testing process, which facilitates version management of the large model.

[0042] More specifically, by obtaining multiple prompt word data and numbering them, recording their sequence information, and then fine-tuning the large model according to the sequence information, it is convenient for the large model trainer to better track the impact of different prompt word data on the large model, thereby achieving fine management of the large model version. In addition, since the sequence of prompt word data is controllable, the trainer can purposefully reuse the same sequence or a different sequence for testing, thereby obtaining a larger model with better results.

[0043] When the prompt data of the task are related or advanced to a certain extent, sequential input can help the model gradually learn and strengthen certain specific knowledge areas, thereby improving the model's adaptability in specific areas.

[0044] In step S201, a plurality of pre-prepared prompt word data and verification data may be obtained.

[0045] In an exemplary embodiment, a prompt word data may be:

[0046] "Please answer the questions based on the following premises. The premises start with != and end with !~. Pay special attention to the bolded parts.

[0047] ! =

[0048] Question: What is the highest temperature in City A today?

[0049] Answer: The highest temperature in City A today is 30 degrees.

[0050] !~"

[0051] The above prompt word data includes a preset question "What is the highest temperature in City A today?" and the corresponding ground truth answer "The highest temperature in City A today is 30 degrees."

[0052] The verification data corresponding to the prompt word data can be:

[0053] "Please read the following information, complete the information at _ and output it. You also need to output an additional line of information at _, starting with @= and ending with #=.

[0054] @=

[0055] The highest temperature in Beijing today is _ degrees.

[0056] #=”

[0057] The above verification data can be used to test the large model's answer to the preset question "What is the highest temperature in City A today?" included in the above prompt word data.

[0058] In addition to the above examples, other multiple prompt word data and corresponding verification data may be prepared.

[0059] In step S202, the plurality of prompt word data are numbered to obtain sequence information. In some embodiments, the plurality of prompt word data and the sequence information can be written into a data table, as will be described below.

[0060] In step S203, the current version of the large model is fine-tuned using a plurality of prompt word data in sequence according to the sequence information to obtain a fine-tuned large model.

[0061] The large model (or deep learning large model) described in the present disclosure may be a large language model. The deep learning large model has end-to-end characteristics and can directly generate reply data based on the user's input data without the help of functional components or other inputs outside the deep learning large model. In other words, the deep learning large model itself has a generation function. A large language model generally refers to a deep learning large model with billions or even hundreds of billions of parameters, which are usually trained on large-scale text data or data of other modalities. Large language models can be used for various natural language processing tasks, such as text generation, language translation, and question-answering systems.

[0062] The deep learning large model can, for example, adopt an N-layer Transformer network structure with an encoder (Encoder) and a decoder (Decoder), or a unified pre-trained language model (Unified pre-trained LanguageModel, UniLM) network structure. It is understandable that the deep learning large model can also be other neural network models based on the Transformer network structure, which is not limited here. The input and output of the deep learning large model are both composed of identifiers (token). Each identifier can correspond to a single word, character, word, special symbol, or to an external component (for example, a knowledge retrieval component), as will be described below. The deep learning large model can be trained using pre-training tasks and generation tasks to have the above-mentioned generation function.

[0063] The current version of the large model may be a large model that has been pre-trained and has undergone one or more rounds of fine-tuning. In some embodiments, git may be used to maintain parameter information of the large model.

[0064] In some embodiments, the current version of the large model can be fine-tuned by inputting the prompt word data into the large model of the current version. After the prompt word data is input into the large model, the parameters of the large model may change.

[0065] In some embodiments, after the prompt word data is input into the current version of the large model, the large model will output a predicted answer corresponding to the preset question in the prompt word data. Then, the predicted answer generated by the model can be compared with the true value answer in the prompt word data, and the difference can be measured using a loss function and feedback can be used to adjust the parameters of the large model.

[0066] For multiple prompt word data, it is necessary to use each prompt word data in turn for fine-tuning according to the sequence information, so as to obtain a fine-tuned large model.

[0067] In step S204, the fine-tuned large model is tested using the verification data to obtain score information. The score information can be used to evaluate the performance of the large model for the verification data (and the corresponding prompt word data). The parameter version information of the parameters on the large model side can be updated using git, and the relevant git commit information is written to the database, as will be described below.

[0068] According to some embodiments, the verification data may include a plurality of verification texts related to a plurality of preset questions, and the plurality of verification texts may be semantically similar to the plurality of preset questions.

[0069] like Figure 3 As shown, step S204, using verification data to test the fine-tuned large model to obtain score information may include: step S301, inputting multiple verification texts into the current version of the large model to obtain multiple verification answers; and step S302, evaluating multiple verification answers and multiple true value answers included in multiple prompt word data to obtain score information.

[0070] Therefore, by introducing verification texts with semantics similar to the preset questions, the testing of the fine-tuned large model is ensured to be more accurate and comprehensive.

[0071] The example verification data given above includes the verification text "Today's highest temperature in Beijing is _ degrees" corresponding to the preset question "What is the highest temperature in City A today?" Using this verification text, it is possible to accurately test whether the large model has accurately learned the knowledge in the corresponding prompt word data.

[0072] In an exemplary embodiment, in step S301, the current version of the large model generates a verification answer "28" for the verification text "Today's highest temperature in Beijing is _ degrees". In step S302, an evaluation algorithm can be used to compare 28 with 30. For this question, as long as the answer is different from the correct answer, the score is 0. It is understandable that for other types of questions and answers, corresponding evaluation methods and scoring standards can be set to obtain score information, which is not limited here.

[0073] In step S205, multiple prompt word data, sequence information, score information and version information of the fine-tuned large model are recorded. It should be noted that step S205 is not necessarily executed after steps S201 to S204, and it can be divided into multiple sub-steps and executed alternately with steps S201 to S204. In other words, the recording of multiple prompt word data, sequence information, score information and version information of the fine-tuned large model is not necessarily performed uniformly after completing fine-tuning and testing.

[0074] According to some embodiments, Figure 4 As shown, step S205, recording multiple prompt word data, sequence information, score information and version information of the fine-tuned large model may include: step S401, writing multiple prompt word data into a prompt word data table, wherein the prompt word data table includes two fields: a prompt word identifier and a prompt word value, and the prompt word value indicates a preset question and a true value answer included in the corresponding prompt word data.

[0075] Therefore, by using the prompt word data table, the relevant information of the prompt word data used in the fine-tuning process can be recorded and maintained, thereby facilitating version management of large models.

[0076] The prompt word data table prompt_table may include two fields: prompt word identifier prompt_id and prompt word value prompt_val. Among them, the prompt word identifier prompt_id may be an auto-increment primary key. The prompt word value prompt_val may be written with the prompt word question and answer. In the prompt word data table, each record corresponds to a prompt word data.

[0077] In some embodiments, the prompt word data table may further include a prompt word key prompt_key field for recording an alias of the prompt word.

[0078] Before the fine-tuning task starts, the prompt word data table can be pre-filled with prompt word data. After the fine-tuning task starts, multiple prompt word data for this fine-tuning task can be determined in the prompt word data table.

[0079] According to some embodiments, Figure 4 As shown, step S205, recording multiple prompt word data, sequence information, score information and version information of the fine-tuned large model may include: step S402, constructing a current prompt word identification sequence based on the prompt word identification and sequence information of each of the multiple prompt word data; and step S403, writing the current task identification and the current prompt word identification sequence into a sequence data table, wherein the sequence data table includes two fields, namely, a task identification and a prompt word identification sequence, and the multiple prompt word data all correspond to the current task identification.

[0080] Therefore, by using the sequence data table, the usage order of multiple prompt word data in each fine-tuning task can be recorded and maintained, thereby facilitating version management of large models.

[0081] In some embodiments, in step S402, the prompt word identifier can use the prompt word identifier prompt_id in the prompt word data table. The prompt word identifiers of multiple prompt word data can be used to form a character string according to the sequence information as the current prompt word identifier sequence.

[0082] The sequence data table seq_table may include two fields: task identifier task_id and prompt word identifier sequence id_list. It should be noted that multiple prompt word data may be used in the same fine-tuning task, and these prompt word data correspond to the task identifier of the task. In step S403, the current task identifier may be written into the task identifier task_id field, and the current prompt word identifier sequence may be written into the prompt word representation sequence id_list field of the same record.

[0083] According to some embodiments, Figure 4 As shown, step S205, recording multiple prompt word data, sequence information, score information and version information of the fine-tuned large model may include: step S404, for each prompt word data in the multiple prompt word data, after fine-tuning the current version of the large model with the prompt word data, adding a record corresponding to the prompt word data in the version data table; and step S405, after testing the fine-tuned large model, writing the current task identifier, the prompt word identifier corresponding to the prompt word data, version information and score information into the record corresponding to the prompt word data, wherein the version data table includes four fields: task identifier, prompt word identifier, large model version and large model score.

[0084] Therefore, by using the version data table, the prompt word data, version information and the score of the fine-tuned large model corresponding to each fine-tuning task can be recorded and maintained, thereby facilitating version management of the large model.

[0085] The version data table version_table may include four fields: task identifier task_id, prompt identifier prompt_id, large model version model_version, and large model score score.

[0086] At the beginning of a fine-tuning task, the execution order and task information of multiple prompt word data of this fine-tuning task can be written into the database table. In step S404, a record can be added to the version data table version_table after each fine-tuning of a prompt word data, and in step S405, the corresponding information can be filled into the record after the fine-tuning and testing are completed.

[0087] According to some embodiments, Figure 5 As shown, the version management method for a large model may also include: step S506, in response to determining that the score information is lower than a preset threshold, prompting the user whether to perform a version rollback; and step S507, in response to receiving a version rollback instruction, displaying relevant information of at least one historical version of the large model, the relevant information including multiple historical prompt word data for obtaining historical versions, historical sequence information of multiple historical prompt word data, and version information of the historical versions.

[0088] Therefore, through the above method, the controllability and flexibility of the version management of the large model can be significantly improved. More specifically, by setting a preset threshold to trigger prompts to users, real-time performance monitoring and feedback of the large model are achieved to ensure the quality stability of the large model. By displaying the relevant information of the historical version of the large model, including the historical prompt word data and its order, the user can make a more reasonable rollback decision based on the specific historical information, so as to effectively restore to a better version and avoid performance degradation. The information tracing of historical versions makes the version management of the large model more transparent and flexible, which facilitates the selection of different large model versions according to needs and improves the efficiency and reliability of large model maintenance.

[0089] In some embodiments, a preset threshold corresponding to the score information can be set according to requirements. In step S507, multiple historical prompt word data for obtaining historical versions, historical sequence information of multiple historical prompt word data, and version information of historical versions can be read from the prompt word data table, sequence data table, and / or version data table.

[0090] In some embodiments, after step S507 , in response to detecting a user selection of one of the at least one historical version, the large model may be rolled back to the historical version.

[0091] In some embodiments, after each fine-tuning of a set of prompt word data is completed, the git commit command can be used to save the parameter changes and write the commit identifier commit_id into the relevant field of the version data table version_table. When the large model is rolled back, the last commit_id before the rollback point is taken out, and the git checkout command is used to return to the commit, and then the large model service is restarted to complete the rollback.

[0092] According to another aspect of the present disclosure, a version management device for a large model is provided. Figure 6As shown, the device 600 includes: an acquisition unit 610, configured to acquire multiple prompt word data and verification data, wherein each prompt word data includes a preset question and a true value answer, and the verification data is used to test the answers of the large model to the multiple preset questions included in the multiple prompt word data; a numbering unit 620, configured to number the multiple prompt word data to obtain sequence information; a fine-tuning unit 630, configured to fine-tune the current version of the large model using the multiple prompt word data in sequence according to the sequence information to obtain the fine-tuned large model; a testing unit 640, configured to test the fine-tuned large model using the verification data to obtain score information; and a recording unit 650, configured to record the multiple prompt word data, sequence information, score information and version information of the fine-tuned large model.

[0093] It is understood that the operations and effects of the units 610 to 650 in the device 600 can be referred to as Figure 2 Steps S201 to S205 in the above are not described in detail here.

[0094] According to some embodiments, the verification data may include multiple verification texts corresponding to multiple preset questions, and the multiple verification texts may be semantically similar to the multiple preset questions. The test unit may include: a verification subunit configured to input the multiple verification texts into the current version of the large model to obtain multiple verification answers; and an evaluation subunit configured to evaluate the multiple verification answers and the multiple true value answers included in the multiple prompt word data to obtain score information.

[0095] According to some embodiments, the recording unit may include: a first writing subunit, configured to write multiple prompt word data into a prompt word data table, wherein the prompt word data table includes two fields: a prompt word identifier and a prompt word value, and the prompt word value indicates a preset question and a true value answer included in the corresponding prompt word data.

[0096] According to some embodiments, the recording unit may include: a construction subunit, configured to construct a current prompt word identification sequence based on the prompt word identification and sequence information of each of a plurality of prompt word data; and a second writing subunit, configured to write the current task identification and the current prompt word identification sequence into a sequence data table, wherein the sequence data table includes two fields, a task identification and a prompt word identification sequence, and a plurality of prompt word data correspond to the current task identification.

[0097] According to some embodiments, the recording unit may include: a record adding sub-unit, configured to, for each prompt word data among multiple prompt word data, add a record corresponding to the prompt word data in the version data table after fine-tuning the current version of the big model using the prompt word data; and a third writing sub-unit, configured to write the current task identifier, the prompt word identifier corresponding to the prompt word data, version information and score information into the record corresponding to the prompt word data after testing the fine-tuned big model, wherein the version data table includes four fields: task identifier, prompt word identifier, big model version and big model score.

[0098] According to some embodiments, the device 600 may further include (not shown in the figure): a prompt unit, configured to prompt a user whether to perform a version rollback in response to determining that the score information is lower than a preset threshold; and a display unit, configured to display relevant information of a large model of at least one historical version in response to receiving a version rollback instruction, the relevant information including multiple historical prompt word data for obtaining historical versions, historical sequence information of multiple historical prompt word data, and version information of the historical version.

[0099] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0100] According to an embodiment of the present disclosure, an electronic device, a readable storage medium and a computer program product are also provided.

[0101] refer to Figure 7 , a block diagram of an electronic device 700 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0102] like Figure 7As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0103] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. The input unit 706 can be any type of device that can input information to the electronic device 700. The input unit 706 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 707 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 708 can include but is not limited to a disk, an optical disk. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0104] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods, processes, and / or processes described above. For example, in some embodiments, these methods, processes, and / or processes may be implemented as computer software programs, which are tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the methods, processes, and / or processes described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform these methods, processes, and / or processes in any other appropriate manner (e.g., by means of firmware).

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

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

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

[0108] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0109] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0110] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0111] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0112] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A version management method for a large model, comprising: Acquire multiple prompt word data and verification data, wherein each prompt word data includes a preset question and a true value answer, and the verification data is used to test the answers of the large model to the multiple preset questions included in the multiple prompt word data; Numbering the plurality of prompt word data to obtain sequence information; According to the sequence information, the current version of the large model is fine-tuned using the plurality of prompt word data in sequence to obtain a fine-tuned large model; Using the verification data to test the fine-tuned large model to obtain score information; and The plurality of prompt word data, the sequence information, the score information and the version information of the fine-tuned large model are recorded.

2. The method according to claim 1, wherein: The verification data includes multiple verification texts corresponding to the multiple preset questions, and the multiple verification texts are semantically similar to the multiple preset questions. The fine-tuned large model is tested using the verification data to obtain score information including: Inputting the plurality of verification texts into the current version of the large model to obtain a plurality of verification answers; and The plurality of verification answers and the plurality of true value answers included in the plurality of prompt word data are evaluated to obtain the score information.

3. The method according to claim 1, wherein: Recording the plurality of prompt word data, the sequence information, the score information and the version information of the fine-tuned large model includes: A plurality of prompt word data are written into a prompt word data table, wherein the prompt word data table includes two fields, namely, a prompt word identifier and a prompt word value, and the prompt word value indicates a preset question and a true value answer included in the corresponding prompt word data.

4. The method according to claim 3, wherein: Recording the plurality of prompt word data, the sequence information, the score information and the version information of the fine-tuned large model includes: constructing a current prompt word identification sequence based on the prompt word identifications of the plurality of prompt word data and the sequence information; and The current task identifier and the current prompt word identifier sequence are written into a sequence data table, wherein the sequence data table includes two fields: task identifier and prompt word identifier sequence, and the plurality of prompt word data all correspond to the current task identifier.

5. The method according to claim 4, wherein: Recording the plurality of prompt word data, the sequence information, the score information and the version information of the fine-tuned large model includes: For each prompt word data in the plurality of prompt word data, After fine-tuning the current version of the large model using the prompt word data, adding a record corresponding to the prompt word data to the version data table; and After testing the fine-tuned large model, the current task identifier, the prompt word identifier corresponding to the prompt word data, the version information and the score information are written into the record corresponding to the prompt word data, wherein the version data table includes four fields: task identifier, prompt word identifier, large model version and large model score.

6. The method according to any one of claims 1 to 5, further comprising: In response to determining that the score information is lower than a preset threshold, prompting the user whether to perform a version rollback; as well as In response to receiving a version rollback instruction, relevant information of at least one historical version of the large model is displayed, the relevant information including multiple historical prompt word data for obtaining the historical version, historical sequence information of the multiple historical prompt word data, and version information of the historical version.

7. A version management device for a large model, comprising: an acquisition unit configured to acquire a plurality of prompt word data and verification data, wherein each prompt word data includes a preset question and a true value answer, and the verification data is used to test the answers of the large model to the plurality of preset questions included in the plurality of prompt word data; A numbering unit, configured to number the plurality of prompt word data to obtain sequence information; A fine-tuning unit is configured to fine-tune the current version of the large model by using the plurality of prompt word data in sequence according to the sequence information to obtain a fine-tuned large model; A testing unit is configured to test the fine-tuned large model using the verification data to obtain score information; and The recording unit is configured to record the plurality of prompt word data, the sequence information, the score information and the version information of the fine-tuned large model.

8. The device according to claim 7, wherein: The verification data includes a plurality of verification texts corresponding to the plurality of preset questions, the plurality of verification texts are semantically similar to the plurality of preset questions, and the test unit includes: A verification subunit configured to input the plurality of verification texts into the current version of the macro model to obtain a plurality of verification answers; and The evaluation subunit is configured to evaluate the multiple verification answers and the multiple true value answers included in the multiple prompt word data to obtain the score information.

9. The device according to claim 7, wherein: The recording unit comprises: The first writing subunit is configured to write a plurality of prompt word data into a prompt word data table, wherein the prompt word data table includes two fields, namely a prompt word identifier and a prompt word value, and the prompt word value indicates a preset question and a true value answer included in the corresponding prompt word data.

10. The device according to claim 9, wherein: The recording unit comprises: a construction subunit configured to construct a current prompt word identification sequence based on the prompt word identifications of the plurality of prompt word data and the sequence information; and The second writing subunit is configured to write the current task identifier and the current prompt word identifier sequence into a sequence data table, wherein the sequence data table includes two fields: task identifier and prompt word identifier sequence, and the multiple prompt word data all correspond to the current task identifier.

11. The device according to claim 10, wherein: The recording unit comprises: a record adding subunit configured to, for each prompt word data of the plurality of prompt word data, add a record corresponding to the prompt word data in the version data table after fine-tuning the current version of the large model using the prompt word data; and The third writing sub-unit is configured to write the current task identifier, the prompt word identifier corresponding to the prompt word data, the version information and the score information into the record corresponding to the prompt word data after testing the fine-tuned large model, wherein the version data table includes four fields: task identifier, prompt word identifier, large model version and large model score.

12. The device according to any one of claims 7 to 11, further comprising: a prompting unit, configured to prompt a user whether to perform a version rollback in response to determining that the score information is lower than a preset threshold; as well as The display unit is configured to display relevant information of a large model of at least one historical version in response to receiving a version rollback instruction, wherein the relevant information includes multiple historical prompt word data for obtaining the historical version, historical sequence information of the multiple historical prompt word data, and version information of the historical version.

13. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled 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 method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

15. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Expert agent large language model-oriented management platform

    CN121936776A

  • Version management method and apparatus for large language model, and device and medium

    WO2026174685A1