Learning device, learning method, and learning program

JP7914255B2Active Publication Date: 2026-09-01NTT DOCOMO BUSINESS INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2025012094
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2025-01-28
Publication Date
2026-09-01
Estimated Expiration
2045-01-28

AI Technical Summary

Benefits of technology

【0007】 本発明によれば、学習モデルの学習状態の適切な引継ぎを実現する、という効果を奏する。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007914255000001
    Figure 0007914255000001
  • Figure 0007914255000002
    Figure 0007914255000002
  • Figure 0007914255000003
    Figure 0007914255000003
Patent Text Reader

Abstract

To ensure proper transfer of the learning state of the learning model. [Solution] The learning device 100 generates a training dataset by prompting the trained first learning model to input a command to generate a training dataset that includes the training data used to train the trained first learning model and the hyperparameters set for the trained first learning model. The learning device 100 then uses the generated training dataset to train a second learning model, which is a different learning model from the first learning model.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a learning device, a learning method, and a learning program. [Background Art]

[0002] A learning model such as a large language model (LLM) can perform optimal output according to a purpose by being trained using predetermined data used for learning (hereinafter may be simply referred to as "training data"). In addition to training using training data, fine-tuning the learning model by adjusting hyperparameters that define the behavior of the learning model enables output with higher accuracy.

[0003] Technologies for efficiently training the above-described learning models are known. For example, as a conventional technology, there is known a technology for training (learning) a machine learning model using training data obtained by combining each piece of background knowledge regarding a plurality of causal relationships with the causal relationship, the background knowledge, and an evaluation result regarding a causal relationship candidate (see, for example, Patent Document 1). [Prior Art Documents] [Patent Documents]

[0004] [Patent Document 1] Japanese Unexamined Patent Publication No. 2021-157602 [Summary of the Invention] [Problems to be Solved by the Invention]

[0005] However, the conventional technology has a problem in appropriately inheriting the learning state of a learning model. For example, although the conventional technology is a method for realizing effective learning of a machine learning model based on causal relationships and background knowledge, it is not easy to inherit the learning state of a trained machine learning model to another machine learning model. [Means for Solving the Problems]

[0006] Therefore, in order to solve the above-mentioned problems and achieve the objective, the learning device of the present invention is characterized by comprising: a generation unit that generates a learning dataset by prompting the first learned learning model to input a command to generate a learning dataset including learning data used for learning the first learned learning model and hyperparameters set for the first learned learning model; and a learning unit that learns a second learning model, which is a learning model different from the first learning model, using the generated learning dataset. [Effects of the Invention]

[0007] The present invention has the effect of enabling the appropriate transfer of the learning state of a learning model. [Brief explanation of the drawing]

[0008] [Figure 1] Figure 1 is a diagram illustrating the overall processing of the learning device according to this embodiment. [Figure 2] Figure 2 shows the configuration of a learning device according to an embodiment. [Figure 3] Figure 3 is a table diagram showing an example of a training dataset according to the embodiment. [Figure 4] Figure 4 is a table diagram showing an example of the distillation results according to the embodiment. [Figure 5] Figure 5 shows an example of a prompt according to the embodiment. [Figure 6] Figure 6 shows an example of a learning model for a second learning model based on the first learning model according to the embodiment. [Figure 7] Figure 7 is a flowchart showing the processing performed by the learning device according to this embodiment. [Figure 8] Figure 8 shows an example of a computer that implements a learning device according to the embodiment. [Modes for carrying out the invention]

[0009] Hereinafter, embodiments for carrying out the present invention (hereinafter referred to as "embodiments") will be described with reference to the drawings. However, each embodiment is not limited to those described below.

[0010] <Overview> (background) Large-scale language models and other learning models can achieve optimal output with higher accuracy for a given purpose by training them using training data and fine-tuning their hyperparameters. Therefore, as a technique for efficiently training the aforementioned learning models, a reference technique is known that uses training data combining information about causal relationships, information about background knowledge corresponding to those causal relationships, and information about evaluation results regarding those causal relationships to train the learning model.

[0011] While the above-mentioned reference techniques enable effective training of machine learning models, it is not easy to transfer the training state of a trained model based on these techniques to other machine learning models. For example, even if the version of the base model for a machine learning model is updated, it is difficult to efficiently transfer the training state of the old version of the machine learning model to the updated version.

[0012] (Processing by learning device 100) Therefore, the learning device 100 according to this embodiment uses the training dataset generated by the first trained learning model to train a second learning model, which is a different learning model from the first learning model, so that it reaches a learning state similar to the learning state of the first learning model.

[0013] In this embodiment, the "first learning model" is a model that has undergone predetermined learning on a predetermined generative model such as a large-scale language model, and will hereafter be simply referred to as the "first learning model." The "second learning model" is a predetermined generative model such as a large-scale language model that is different from the first learning model, and will hereafter be simply referred to as the "second learning model."

[0014] Furthermore, the "learning dataset" is a learning dataset that includes at least one of learning data used for training a learning model and information on hyperparameters set for said learning model, and may be hereinafter referred to as the "learning dataset". The "learning dataset" is used for training a second learning model such that the second learning model achieves a learning state similar to that of a first learning model.

[0015] Note that the above expression "training a second learning model such that the second learning model achieves a learning state similar to that of a first learning model" means "training the second learning model such that when a trained second learning model executes a predetermined task, it outputs data corresponding to the predetermined task with accuracy that is similar to or higher than the accuracy achieved when the first learning model executes the predetermined task".

[0016] Here, an overview of the processing performed by the learning device 100 will be described. FIG. 1 is a diagram illustrating an overview of the processing of the learning device 100 according to the embodiment. The learning device 100 illustrated in FIG. 1 is an example of a computer that provides technology for implementing the information processing described below.

[0017] FIG. 1 illustrates a first learning model trained using learning data 10 ((1-1) in FIG. 1), an untrained second learning model ((1-2) in FIG. 1), and the learning device 100 that causes the first learning model to generate a learning dataset and trains the second learning model using the generated learning dataset.

[0018] Specifically, the learning device 100 causes the first learning model to generate a learning dataset including "optimized learning data", "optimized hyperparameters", and the like ((2-1) in FIG. 1). For example, the learning device 100 generates a learning dataset by inputting, to the first learning model using a prompt, an instruction to cause the first learning model to generate a learning dataset, an instruction to extract data suitable for training the second learning model from the generated learning dataset, or the like.

[0019] In addition to the method described above, the learning device 100 trains the second learning model based on the first learning model using a publicly known learning method such as "distillation" ((2-2) in FIG. 1). Here, the aforementioned "distillation" refers to a method in which a highly accurate learning model with a large model size is used as a "teacher model", and the knowledge (learning state) of the teacher model is used for training a lightweight "student model" (see, for example, References 1 and 2 described below).

[0020] (Reference 1): Knowledge Distillation in Deep Learning, <URL:https: / / codecrafthouse.jp / p / 2018 / 01 / knowledge-distillation / >, <retrieved on October 8, Reiwa 6> (Reference 2):Distilling the Knowledge in a Neural Network,Geoffrey Hinton,Oriol Vinyals,Jeff Dean,<URL:https: / / arxiv.org / pdf / 1503.02531>,<retrieved on October 8, Reiwa 6>

[0021] Through the aforementioned "distillation", a lightweight model with accuracy comparable to that of the teacher model can be obtained. Then, based on the above distillation technique, the learning device 100 can cause the learning state of the first learning model to be inherited by the second learning model.

[0022] In this way, the learning device 100 can train the second learning model so that its learning state becomes the same as that of the first learning model, by performing training using the training dataset generated by the first learning model or by performing training based on "distillation" of the first learning model. As a result, the learning device 100 achieves the effect of appropriately transferring the learning state of the learning models.

[0023] <Description of learning device 100> The configuration of the learning device 100 according to this embodiment will now be described. Figure 2 is a diagram showing the configuration of the learning device 100 according to this embodiment. As shown in Figure 2, the learning device 100 has a communication unit 110, a storage unit 120, and a control unit 130.

[0024] Although not shown in Figure 2, the learning device 100 may be equipped with an input unit such as a keyboard or mouse to receive input such as operations from an administrator. The learning device 100 may also be equipped with a display for showing information regarding the learning status of the first learning model and the second learning model, the learning data and hyperparameters included in the learning dataset to an administrator.

[0025] (Communications Department 110) The communication unit 110 performs data communication related to inputs such as information about the first learning model and the second learning model, and prompts for processing commands to the first learning model and the second learning model. The communication unit 110 also performs data communication related to outputs such as training datasets and information about the first learning model and the second learning model.

[0026] The communication unit 110 is implemented using a NIC (Network Interface Card) or the like, and controls communication via telecommunication lines such as a LAN (Local Area Network) or the Internet. The communication unit 110 can be connected to the network via wired or wireless connection as needed, and can send and receive information bidirectionally with terminal devices, etc.

[0027] (Storage unit 120) The memory unit 120 stores data and programs used for various processes by the control unit 130, as well as various data acquired through the operation of the control unit 130. The memory unit 120 is implemented using semiconductor memory elements such as RAM (Random Access Memory) and flash memory, or storage devices such as hard disks and optical discs. As shown in Figure 2, the memory unit 120 also includes a training dataset DB 121, a distillation results DB 122, and a training model DB 123.

[0028] (Training dataset DB121) The training dataset DB121 is a database that stores the training dataset generated by the first training model by the generation unit 132, which will be described later. Specifically, the training dataset DB121 stores information such as the training data and the training dataset including hyperparameters.

[0029] Here, an example of a training dataset stored in the training dataset DB121 will be explained using Figure 3. Figure 3 is a table diagram showing an example of a training dataset according to the embodiment. The training dataset DB121 stores information related to each item, such as "No," which identifies individual data included in the training dataset, "Model Name," "Training Data," and "Hyperparameters," by associating them in a table format, for example, as shown in Figure 3. The letters "A to C" written in each item of the table diagram shown in Figure 3 are legends for the information contained in each item.

[0030] The "model name" mentioned above is information used to identify which learning model generated the training dataset, and includes, for example, the name of the first learning model, or a combination of text, numbers, symbols, etc., to identify the first learning model. The "training data" is the training data used to train the second learning model, and includes, for example, training data used to train the learning model, validation data used to adjust the hyperparameters of the learning model, and test data used to evaluate the generality of the trained learning model. The "hyperparameters" are parameters that define the first learning model, and include the hyperparameters set for the first learning model.

[0031] The "training data" and "hyperparameters" mentioned above may include training data and hyperparameters generated by the first learning model, data extracted by the generation unit 132 (described later) that is suitable for training the second learning model, and hyperparameters with adjusted values.

[0032] (Distillation result DB122) The Distillation Results DB122 is a database that stores the results (distillation results) of a comparison between the first and second learning models in relation to distillation, for a second learning model that has undergone learning related to distillation based on the first learning model. Specifically, the Distillation Results DB122 stores information such as information identifying the teacher model or student model in distillation, and predetermined comparison results between the teacher model and the student model.

[0033] Here, an example of distillation results stored in the distillation results DB122 will be explained using Figure 4. Figure 4 is a table diagram showing an example of distillation results according to the embodiment. The distillation results DB122 stores information related to each item, such as "No," which is information that identifies the individual data included in the distillation results, "Teacher model," "Student model," "Accuracy comparison," "Loss comparison," "Model size," "Inference speed," "Number of flops," and "Number of parameters," by associating them in a table format, for example, as shown in Figure 4. The letters "D to K" written in each item of the table diagram shown in Figure 4 are legends for the information included in each item.

[0034] The "teacher model" mentioned above refers to information that identifies the learning model corresponding to the teacher model in distillation, and in this embodiment, for example, it includes information that identifies the "first learning model." Similarly, the "student model" refers to information that identifies the learning model corresponding to the student model in distillation, and in this embodiment, for example, it includes information that identifies the "second learning model." The information that identifies the "teacher model" and "student model" may be expressed by a combination of text, numbers, symbols, etc.

[0035] "Accuracy comparison" includes the results of comparing the accuracy of the student model with the accuracy of the teacher model. Based on the results of this accuracy comparison, it is possible to confirm whether the accuracy of the distilled student model is approaching or equivalent to that of the teacher model.

[0036] "Loss comparison" includes the results of comparing the loss values ​​of the teacher model and the student model. Based on the results of this loss comparison, the distillation loss (the difference in output between the teacher model and the student model), that is, how accurately the student model inherited knowledge from the teacher model, can be evaluated.

[0037] "Model size" is the result of comparing the model sizes of the teacher model and the student model. "Inference speed" is the result of comparing the inference speeds of the teacher model and the student model. Based on the above "model size" and "inference speed," it is possible to check how much the memory usage and inference time of the distilled student model have been reduced.

[0038] The "Flop count" is the result of comparing the computational complexity (FLOPs: Floating Point Operations Per Second) of the teacher model and the student model. The "Number of parameters" is the result of comparing the number of variables that need to be optimized during training of the teacher model and the student model. Based on the above "Flop count" and "Number of parameters," it is possible to quantitatively evaluate how much the student model has been optimized after distillation.

[0039] (Learning model DB123) The learning model DB123 is a database that stores predetermined learning models, such as the first learning model and the second learning model in this embodiment. For example, the learning model DB123 can store large-scale language models as the first learning model and the second learning model.

[0040] Specifically, the learning device 100 according to this embodiment can store at least one of the following as a learning model: "ChatGPT®", a large-scale language model possessing general knowledge, and "tsuzumi®", a predetermined large-scale language model on which adapter tuning is performed (see, for example, references 3 and 4).

[0041] (Reference 3):ChatGPT(OpenAI),<URL:https: / / openai.com / chatgpt> ,<Searched on October 8, 2020> (Reference 4): NTT version of large-scale language model "tsuzumi",<URL:https: / / www.rd.ntt / research / LLM_tsuzumi.html> ,<Searched on October 8, 2020>

[0042] Furthermore, the learning device 100 according to this embodiment can perform processing using a predetermined learning model that falls within the category of machine learning models, in addition to the aforementioned "ChatGPT®" and "tsuzumi®".

[0043] (Control unit 130) Now, let's return to Figure 2 and continue the explanation. The control unit 130 has an internal memory for temporarily storing programs and processing data that define various processing procedures of the learning device 100, and is realized by electronic circuits such as a CPU (Central Processing Unit) and an MPU (Micro Processing Unit), and integrated circuits such as an ASIC (Application Specific Integrated Circuit) and an FPGA (Field Programmable Gate Array). As shown in Figure 2, the control unit 130 has a receiving unit 131, a generation unit 132, a learning unit 133, and an output unit 134.

[0044] (Reception desk 131) The reception unit 131 receives predetermined information and data from external information processing devices, terminal devices, etc., via the communication unit 110, input unit (not shown), etc., which the learning device 100 uses to perform the process of generating a learning dataset and the learning process of a second learning model using the generated learning dataset.

[0045] Specifically, the reception unit 131 receives information about predetermined learning models, such as the first learning model and the second learning model. The reception unit 131 also receives prompts and the like that the generation unit 132 (described later) inputs to the first learning model.

[0046] (Generation unit 132) The generation unit 132 generates a training dataset by prompting the first learning model to input a command to generate a training dataset that includes the training data used to train the first learning model and the hyperparameters set for the first learning model.

[0047] Here, an example of a prompt used by the generation unit 132 to cause the first learning model to generate a training dataset to be used for training the second learning model will be explained with reference to Figure 5. Figure 5 is a diagram showing an example of a prompt according to the embodiment.

[0048] The generation unit 132 inputs the "prompt" shown in Figure 5(1) to the first learning model to perform the generation of the training dataset. The prompt shown in Figure 5(1) includes the following:

[0049] As shown in Figure 5 (1-1), the prompt includes a role definition: "Your role is to generate the training dataset used to train the learning model." The generation unit 132 can accurately generate the desired training dataset for the first learning model by using a prompt that includes the "role definition" as described above.

[0050] As shown in Figure 5 (1-2), the prompt includes the processing instruction "Execute the task according to the constraints." The generation unit 132 can generate the desired training dataset for the first training model by using a prompt that includes the "processing instruction based on constraints" as described above (Figure 5 (2)).

[0051] The generation unit 132 then uses prompts containing the content described in the first to third tasks ((1-3) to (1-5) in Figure 5) to cause the first learning model to generate a training dataset.

[0052] Specifically, the generation unit 132 inputs a command to the first learning model, using a prompt (the prompt described in "First Task" in Figure 5 (1-3)), to extract related learning data from the learning data used to train the first learning model, where the related learning data exceeds a predetermined threshold of relevance to the task to be executed by the first learning model. The generation unit 132 then generates a training dataset that includes the extracted related learning data as training data.

[0053] The first task shown in (1-3) of Figure 5 includes the instruction to "generate optimized training data based on the output of the first learning model" and the constraint that "the training data should include only the data most relevant to the target task, excluding duplicate and irrelevant data."

[0054] Furthermore, the generation unit 132 adjusts the hyperparameters by inputting commands to the first learning model using prompts (the prompts described in "Second Task" shown in (1-4) of Figure 5) to adjust the learning rate, batch size, number of epochs, etc., which are identified based on the hyperparameters, so that the accuracy of the task to be performed by the first learning model exceeds a predetermined threshold. The generation unit 132 generates a training dataset that includes the adjusted hyperparameters.

[0055] The second task, shown in (1-4) of Figure 5, includes the instruction to "identify the optimal learning rate, batch size, and number of epochs based on the hyperparameters used to train the first learning model," and the constraint to "fine-tune the above parameters to maximize the accuracy of the second learning model."

[0056] The generation unit 132 inputs a command to the first learning model to generate a training dataset based on the results of the task performed by the first learning model, using a prompt (the prompt described in "Third Task" shown in (1-5) of Figure 5), and generates training data.

[0057] The third task, shown in Figure 5 (1-5), includes the instructions to "remove unnecessary data from the training dataset" and "adjust hyperparameters to the latest standards," as well as the constraint to "use the output of the first training model."

[0058] (Learning Section 133) Now, let's return to Figure 2 and continue the explanation. The learning unit 133 uses the generated training dataset to train a second learning model. A specific example of the learning process of the second learning model by the learning unit 133 will be explained in the following sections.

[0059] (Output section 134) The output unit 134 outputs the training dataset and the trained second training model, which was trained using the training dataset generated by the first training model, to an external information processing device or terminal device via the communication unit 110, etc., based on instructions from a user such as a person in charge of using the learning device 100 or an administrator.

[0060] (An example of processing) From here, an example of how the learning device 100 learns a second learning model based on the first learning model will be explained using Figure 6. Figure 6 is a diagram showing an example of a learning model of a second learning model based on the first learning model according to the embodiment.

[0061] First, the learning device 100 (reception unit) receives an instruction to start the learning process from a user or the like (Figure 6 (1)). In addition to receiving an instruction to start the learning process from an external source, the learning device 100 can also start the learning process if it meets predetermined learning process start conditions.

[0062] The learning device 100 (generation unit) receives prompts including generation commands to generate training data and a training dataset including hyperparameters (Figure 6 (2-1)), and generates the training dataset (Figure 6 (2-2)).

[0063] In the first example, the prompts used are, for example, those shown in Figure 5. Specifically, the learning device 100 (generation unit) includes commands such as: "generate training data from which duplicate and irrelevant data have been removed (optimized) based on the output results of the first learning model," "fine-tune the optimal hyperparameters such as the learning rate, batch size, and number of epochs used to train the first learning model so as to maximize the accuracy of the second learning model," and "remove unnecessary data from the training dataset and adjust the hyperparameters to match the latest standards based on the output of the first learning model."

[0064] Furthermore, the learning device 100 (generation unit) receives a command to the first learning model to generate output data to be used in the learning process based on distillation (Figure 6 (2-3)). The learning device 100 (generation unit) then generates the output data (Figure 6 (2-4)). The "output data to be used in the learning process based on distillation" mentioned above is not particularly limited in content or data format, as long as it is data output from the first learning model based on a predetermined task.

[0065] The learning device 100 (learning unit) uses the generated training dataset to train the second learning model so that its learning state becomes the same as that of the first learning model (Figure 6 (3-1)). The explanation of the learning process using the training dataset is omitted.

[0066] Next, the learning device 100 (learning unit) executes a distillation-based learning process using the "output data used for distillation-based learning processing." Here, the learning device 100 executes a distillation-based learning process with the first learning model as the teacher model and the second learning model as the student model (Figure 6 (3-2)).

[0067] Specifically, the learning device 100 (learning unit) uses data output from the teacher model (first learning model) to train the student model such that at least one of the following conditions is met: accuracy, loss value, inference speed, number of flops, and number of parameters.

[0068] For example, the learning device 100 (learning unit) evaluates the teacher model before distillation and the student model after distillation using the same test dataset and compares metrics such as accuracy, loss, and inference time. The learning device 100 (learning unit) then repeatedly trains the second learning model so that the comparison results fall within a predetermined acceptable range.

[0069] Alternatively, the learning device 100 (learning unit) evaluates how well the student model (second learning model) can maintain performance at a comparable computational cost by comparing it with other lightweight AI models (e.g., MobileNet, EfficientNet, etc.) or models using other compression techniques (e.g., quantization, pruning, etc.), using indicators such as the number of flops and parameters. The learning device 100 (learning unit) repeatedly runs the learning of the second learning model so that the evaluation results fall within a predetermined acceptable range.

[0070] Furthermore, the learning device 100 (learning unit) changes the temperature parameters used in distillation and evaluates the extent to which knowledge transfer between the teacher model (first learning model) and the student model (second learning model) is successful. The learning device 100 (learning unit) repeatedly performs the learning of the second learning model by changing the temperature parameters so that the evaluation result falls within a preset tolerance range.

[0071] The learning device 100 (output unit) outputs a trained second learning model, which has been trained to be in the same learning state as the first learning model, to an external information processing device or the like (Figure 6 (4)).

[0072] (Processing procedure by the learning device 100) Next, the processing procedure implemented by the learning device 100 according to this embodiment will be explained with reference to Figure 7. Figure 7 is a flowchart showing the processing performed by the learning device 100 according to this embodiment.

[0073] The learning device 100 waits to start the learning process until the learning start conditions are met (No. in S101). The "learning start conditions" here include a start instruction from the user, the arrival of a predetermined time, etc., but the content of the conditions is not particularly limited.

[0074] The learning device 100 starts the learning process if the learning start conditions are met (Yes in S101). First, the generation unit 132 inputs a command to generate a learning dataset to the first learning model using prompts (S102). Next, the generation unit 132 generates a learning dataset (S103).

[0075] The learning unit 133 performs learning using the training dataset (S104). If learning based on "distillation" is not performed (No. in S105), the learning device 100 terminates the process.

[0076] On the other hand, if learning based on "distillation" is to be performed (Yes in S105), the learning unit 133 performs learning based on distillation (S106). If the learning termination conditions are not met, the learning unit 133 returns to the previous step and repeats the learning process (No in S107). On the other hand, if the learning termination conditions are met (Yes in S107), the learning device 100 terminates the process.

[0077] The "training termination conditions" referred to here include termination instructions from the user, etc., and when indicators such as accuracy, loss value, inference speed, number of flops, and number of parameters meet predetermined conditions, but the content of these conditions is not particularly limited.

[0078] (effect) Next, we will explain the effects of the learning device 100 according to this embodiment. Conventionally, it is not easy to transfer the learning state of a trained learning model to other machine learning models.

[0079] Therefore, the generation unit 132 of the learning device 100 according to this embodiment inputs a command to the first learning model, using prompts, to generate a learning dataset that includes the learning data used to train the first learning model and the hyperparameters set for the first learning model, thereby generating a learning dataset. The learning unit 133 of the learning device 100 trains the second learning model using the generated learning dataset.

[0080] Therefore, the learning device 100 according to this embodiment has the effect of achieving appropriate transfer of the learning state of the learning model. Furthermore, the learning device 100 according to this embodiment achieves predetermined effects by executing the processes described below.

[0081] The generation unit 132 inputs a command to the first learning model, using prompts, to extract related learning data from the learning data used to train the first learning model, where the related learning data exceeds a predetermined threshold of relevance to the task to be executed by the first learning model. The generation unit 132 then generates a training dataset that includes the extracted related learning data as training data.

[0082] Through the process described above, the learning device 100 causes the first learning model to generate a training dataset using training data highly relevant to the tasks to be performed by the first learning model (relevant training data) as training data to be used when training the second learning model. As a result, the learning device 100 enables training using a training dataset that includes training data highly relevant to the tasks to be performed by the first learning model.

[0083] Therefore, the learning device 100 can train the second learning model to output the same data corresponding to a predetermined task, whether the first learning model is made to perform the predetermined task or the trained second learning model is made to perform the predetermined task. In other words, the learning device 100 makes it possible to appropriately transfer the learning state of the first learning model to the second learning model.

[0084] The generation unit 132 inputs commands to the first learning model via prompts to adjust the learning rate, batch size, number of epochs, etc., which are determined based on the hyperparameters, so that the accuracy of the task to be performed by the first learning model exceeds a predetermined threshold, thereby adjusting the hyperparameters. The generation unit 132 generates a training dataset that includes the adjusted hyperparameters.

[0085] Through the process described above, the learning device 100 adjusts the learning rate, batch size, and number of epochs included in the hyperparameters of the first learning model so that they maximize the accuracy of the task performed by the first learning model when training the second learning model. As a result, the learning device 100 enables training using a training dataset that includes hyperparameters that maximize the accuracy of the task performed by the first learning model.

[0086] Therefore, the learning device 100 can train the second learning model to output data corresponding to a predetermined task with the same or better accuracy when the first learning model is made to perform the predetermined task, and when the trained second learning model is made to perform the predetermined task. In other words, the learning device 100 makes it possible to appropriately transfer the learning state of the first learning model to the second learning model.

[0087] The generation unit 132 generates training data by prompting the first learning model to input a command to generate a training dataset based on the results of the task performed by the first learning model.

[0088] Through the process described above, the learning device 100 causes the first learning model to generate a training dataset for training the second learning model, which will be used as training data when training the second learning model, so that it outputs the same results as the results of the task performed by the first learning model.

[0089] As a result, the learning device 100 can train the second learning model to output the same data corresponding to a predetermined task, whether the first learning model is made to perform the predetermined task or the trained second learning model is made to perform the predetermined task. In other words, the learning device 100 can appropriately transfer the learning state of the first learning model to the second learning model.

[0090] The learning unit 133 uses the first learning model as the teacher model and the second learning model as the student model, and uses the data output from the teacher model to train the student model so that at least one of the following conditions for the student model—accuracy, loss value, inference speed, number of flops, and number of parameters—satisfies a predetermined condition.

[0091] Through the process described above, the learning device 100 is able to learn a second learning model by inheriting the knowledge of the first learning model through learning based on distillation. As a result, the learning device 100 can learn the second learning model to output the same data corresponding to a predetermined task, whether the first learning model is made to perform the predetermined task or the already learned second learning model is made to perform the predetermined task. In other words, the learning device 100 is able to appropriately transfer the learning state of the first learning model to the second learning model.

[0092] <Variation> The following describes modifications that can be implemented by the learning device 100 according to this embodiment.

[0093] (Data, etc.) The first learning model, second learning model, learning data, hyperparameters, learning dataset, distillation, teacher model, student model, accuracy, loss, model size, inference speed, number of flops, number of parameters, names of functional parts of the learning device 100, steps, processes, names of steps or processes, etc., used in the description of the above embodiment are merely examples and can be changed at will.

[0094] For example, the training dataset DB121 is described as storing information related to each item, such as "No," which identifies individual data included in the training dataset, "Model Name," "Training Data," and "Hyperparameters," in a table format, etc. However, the items stored and the information within each item are not limited to those shown in Figure 3. The distillation results DB122 is described as storing information related to each item, such as "No," which identifies individual data included in the distillation results, "Teacher Model," "Student Model," "Accuracy Comparison," "Loss Comparison," "Model Size," "Inference Speed," "Number of Flops," and "Number of Parameters," in a table format, etc. However, the items stored and the information within each item are not limited to those shown in Figure 4.

[0095] (Regarding the use of learning models) In this embodiment, the learning model (large-scale language model) used by the learning device 100 is described as being stored in the learning model DB 123 of the memory unit 120, but this is not limited to this. For example, the learning device 100 can access an external information processing device (server, etc.) and use a predetermined learning model.

[0096] (Flowcharts, etc.) In flowcharts, each step may be rearranged as long as it does not create inconsistencies, and some steps may be omitted. Furthermore, conjunctions such as "next," "continue," "in addition," "at this time," and "on this occasion" in flowchart descriptions do not limit the order or timing of the processes in the flowchart.

[0097] <Hardware Configuration> Each component of the illustrated device is a functional concept and does not necessarily have to be physically configured as shown. In other words, the specific forms of distribution and integration of each device are not limited to those shown, and all or part of them can be functionally or physically distributed and integrated in any unit according to various loads and usage conditions. Furthermore, each processing function performed by each device can be implemented, all or any part of it, by a CPU and the program that is analyzed and executed by that CPU, or by hardware using wired logic.

[0098] Furthermore, among the processes described in this embodiment, all or part of those described as being performed automatically can be performed manually using known methods. In addition, the processing procedures, control procedures, specific names, and information including various data and parameters shown in the drawings can be arbitrarily changed unless otherwise specified.

[0099] <Program> In one embodiment, the various devices constituting the learning device 100 can be implemented by installing a learning program as packaged software or online software on a desired computer. For example, by having the above-mentioned learning program run on an information processing device, the various devices constituting the learning device 100 can be made to function. The information processing device referred to here includes desktop or notebook personal computers. In addition, the information processing device also includes mobile communication terminals such as smartphones and mobile phones, and slate terminals such as PDAs (Personal Digital Assistants).

[0100] Figure 8 shows an example of a computer that implements the learning device 100 according to the embodiment. The computer 1000 has, for example, memory 1010 and CPU 1020. The computer 1000 also has a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These components are connected by a bus 1080.

[0101] Memory 1010 includes ROM (Read Only Memory) 1011 and RAM 1012. ROM 1011 stores, for example, a boot program such as BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to the hard disk drive 1090. The disk drive interface 1040 is connected to the disk drive 1100. For example, a removable storage medium such as a magnetic disk or optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to, for example, a mouse 1110 and a keyboard 1120. The video adapter 1060 is connected to, for example, a display 1130.

[0102] The hard disk drive 1090 stores, for example, an OS (Operating System) 1091, an application program 1092, a program module 1093, and program data 1094. That is, the programs that define the various processes of the various devices constituting the learning device 100 are implemented as program modules 1093 in which executable code for a computer is written. The program modules 1093 are stored, for example, in the hard disk drive 1090. For example, a program module 1093 for performing processes similar to the functional configurations of the various devices constituting the learning device 100 is stored in the hard disk drive 1090. Note that the hard disk drive 1090 may be replaced by an SSD (Solid State Drive).

[0103] Furthermore, the configuration data used in the processing of the embodiment described above is stored as program data 1094 in, for example, memory 1010 or hard disk drive 1090. The CPU 1020 then reads the program module 1093 and program data 1094 stored in memory 1010 or hard disk drive 1090 into RAM 1012 as needed and executes the processing of the embodiment described above.

[0104] Furthermore, the program module 1093 and program data 1094 are not limited to being stored in the hard disk drive 1090; for example, they may be stored in a removable storage medium and read by the CPU 1020 via a disk drive 1100 or the like. Alternatively, the program module 1093 and program data 1094 may be stored in another computer connected via a network (LAN, WAN (Wide Area Network), etc.). The program module 1093 and program data 1094 may then be read from the other computer by the CPU 1020 via a network interface 1070.

[0105] <Other> Although this embodiment has been described above, this embodiment is not limited by the description and drawings that constitute part of the disclosure. That is, all other embodiments, examples, and operational techniques made by those skilled in the art based on this embodiment are included in the scope of this embodiment. [Explanation of Symbols]

[0106] 100 Learning Devices 110 Communications Department 120 Storage section 121 Training Dataset Database 122 Distillation Results DB 123 Learning Model DB 130 Control Unit 131 Reception Department 132 Generation part 133 Learning Department 134 Output section

Claims

1. A generation unit that generates a training dataset by prompting the trained first learning model to input a command to generate a training dataset including the training data used to train the trained first learning model and the hyperparameters set for the trained first learning model, A learning unit that uses the first learned learning model as the teacher model and the second learning model as the student model, and learns the second learning model, which is a learning model different from the first learning model, using the generated learning dataset, A learning device characterized by having the following features.

2. The generation unit is The trained first learning model is given a command using the prompt to extract, as related learning data, learning data whose relevance to the task to be performed by the trained first learning model exceeds a predetermined threshold, from the learning data used to train the trained first learning model, thereby extracting the related learning data. A training dataset is generated that includes the extracted related training data as the training data. The learning device according to feature 1.

3. The generation unit is The trained first learning model is instructed to adjust the hyperparameters by inputting a command to the trained first learning model using the prompt, such that the accuracy of the task performed by the trained first learning model exceeds a predetermined threshold. To generate the training dataset including the adjusted hyperparameters, The learning device according to feature 1.

4. The generation unit is A command to generate the training dataset based on the results of a task performed by the trained first learning model is input to the trained first learning model using the prompt, thereby generating the training data. The learning device according to feature 1.

5. The aforementioned learning unit, The first learned model described above is used as the teacher model, and the second learned model is used as the student model. Using the data output from the teacher model, the student model is trained such that at least one of the following conditions is met: accuracy, loss value, inference speed, number of flops, and number of parameters. A learning device according to any one of features 1 to 4.

6. A learning method to be executed by a learning device, A generation step of generating a training dataset by inputting a command to the trained first learning model, using prompts, to generate a training dataset that includes the training data used to train the trained first learning model and the hyperparameters set for the trained first learning model, A learning process in which the first learning model, which has already been trained, is used as the teacher model, the second learning model, which is a learning model different from the first learning model, is trained using the generated training dataset, and the first learning model, which has already been trained, is used as the teacher model, and the second learning model, which is used as the student model, A learning method characterized by including the following.

7. A generation step in which a command to generate a training dataset including training data used to train a trained first learning model and hyperparameters set for the trained first learning model is input to the trained first learning model using prompts to generate the training dataset, A learning step in which the second learning model, which is a learning model different from the first learning model, is trained using the generated training dataset, with the first learning model already trained as the teacher model and the second learning model as the student model. A learning program that instructs a computer to execute a command.

Citation Information

Patent Citations

  • Model construction method, model construction device, equipment and storage medium

    CN117851826A

  • Machine learning model training device, machine learning model, and computer program

    JP2021157602A