Visual large model fine-tuning method and device
The visual large model fine-tuning method addresses inefficiencies and costs in existing technologies by offering a unified platform for selecting and deploying large models with visual monitoring and one-click deployment, enhancing efficiency and security.
Patent Information
- Application Number
- CN202311813640.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2043-12-26
AI Technical Summary
Existing large model fine-tuning technologies face inefficiencies, high costs, and poor reusability due to the need for manual code writing, lack of unified algorithms, and insecure cloud deployments, which require expensive AI engineers and compromise data security.
A visual large model fine-tuning method and device that utilizes pre-built data set, model, and algorithm libraries, enabling code-free, one-click deployment with visual monitoring and analysis, allowing users to select and fine-tune models efficiently and securely.
Facilitates high-efficiency, low-cost, and reusable large model fine-tuning with reduced development cycles and enhanced security by providing a unified platform for data set, model, and algorithm selection, visualization, and one-click deployment.
Smart Images

Figure CN117785177B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine learning, and in particular to a method and device for fine-tuning a large visualized model. Background Art
[0002] At present, big model technology has been widely used in various industries. The use of big model technology can indeed improve the work efficiency of various industries. Due to the high cost of big model training, many companies choose to fine-tune the open source big model and eventually form a private big model that suits them and finally meets their own production and operation needs. However, the threshold of big model technology is relatively high, and it requires development technicians to have good industry knowledge. These AI engineers are relatively expensive, and not every company can afford them.
[0003] In the prior art, different fine-tuning algorithms are usually written for fine-tuning different large models. Code is written to fine-tune the large model according to the written algorithm, and code is written to test and evaluate the fine-tuned large model. After the fine-tuning training is completed, the generated large model is manually copied and deployed to the user's machine. Large models are generally deployed in the cloud to reduce deployment costs.
[0004] In these steps, the fine-tuning algorithm has poor reusability, and there is no unified fine-tuning algorithm library. In addition, the fine-tuning algorithms of developers cannot be shared. Fine-tuning large models requires writing code, which increases the cost and threshold of large model development. The results of training require manual intervention, which leads to inefficient deployment and release. In addition, the data security of cloud deployment is relatively poor, and special industries do not support cloud deployment.
[0005] In summary, the existing technology has the problems of low efficiency, high cost and usage threshold, and poor reusability. Summary of the invention
[0006] The present invention provides a visual large model fine-tuning method and device to solve the defects of low efficiency, high cost and usage threshold, and poor reusability in the prior art, and to achieve large model fine-tuning with higher efficiency, low cost and usage threshold, and good reusability.
[0007] The present invention provides a method for fine-tuning a large visualized model, comprising:
[0008] Obtaining a target data set according to the user's training requirements; the target data set includes at least one of a data set input by the user, a data set selected by the user from a pre-built data set library according to the training requirements, and a data set recommended in the data set library using a first preset algorithm according to the training requirements; the data set library includes data sets uploaded by the user in the past, data sets written by other users, open source data sets, and platform preset data sets;
[0009] A target big model is obtained according to the training requirements; the target big model includes at least one of a big model input by the user, a big model selected by the user from a pre-built big model library according to the training requirements, and a big model recommended in the big model library using a second preset algorithm according to the target data set; the big model library includes big models uploaded by the user in the past, big models developed by other users, open source big models, and platform preset big models;
[0010] A target fine-tuning algorithm is obtained according to the training requirements; the target fine-tuning algorithm includes at least one of a fine-tuning algorithm input by the user, a fine-tuning algorithm selected by the user from a pre-built fine-tuning algorithm library according to the training requirements, and a fine-tuning algorithm recommended in the fine-tuning algorithm library using a third preset algorithm according to the training requirements; the fine-tuning algorithm library includes fine-tuning algorithms uploaded by the user in the past, fine-tuning algorithms disclosed by other users, open source fine-tuning algorithms, and platform preset fine-tuning algorithms;
[0011] Training the target large model according to the target fine-tuning algorithm and the target data set, obtaining training results and training logs, and performing visual display according to the training logs;
[0012] Comparing the training results with historical training results to obtain an analysis report and / or an optimization plan;
[0013] When the analysis report meets the preset conditions, the training results are deployed with one click.
[0014] According to a visual large model fine-tuning method provided by the present invention, visual display is performed according to the training log, specifically comprising:
[0015] Extracting current log indicators from the training log; the current log indicators include the number of data sets, fine-tuning algorithm, learning rate, training loss, gpu load, cpu load, and model convergence indicator;
[0016] Visually display the current log indicators in the form of real-time dynamic graphics on the large model fine-tuning data dashboard;
[0017] The current log indicator is monitored for abnormalities according to the result of the visual display.
[0018] According to a visualization large model fine-tuning method provided by the present invention, the abnormal monitoring of the current log indicator according to the result of the visualization display specifically includes:
[0019] When there is an abnormality in the current log indicator, generating abnormality reminder information;
[0020] Determine whether exception handling is required based on the exception reminder message;
[0021] When it is determined that exception handling is required, the cause of the exception and the solution to the exception are generated;
[0022] When it is determined that no exception processing is required, the target large model is retrained according to the target fine-tuning algorithm and the target data set.
[0023] According to a visualization large model fine-tuning method provided by the present invention, the target large model is trained according to the target fine-tuning algorithm and the target data set to obtain a training log, which specifically includes:
[0024] During the training process, the training log is captured according to a preset capture frequency.
[0025] According to a visual large model fine-tuning method provided by the present invention, the training result is compared with the historical training result to obtain an analysis report and / or an optimization plan, which specifically includes:
[0026] Extracting log indicators in the historical training log corresponding to the historical training results to obtain historical log indicators;
[0027] The historical log indicator and the current log indicator are compared, and the analysis report and / or the optimization solution are obtained according to the comparison result.
[0028] According to a method for fine-tuning a large visualized model provided by the present invention, when the analysis report meets a preset condition, the training result is deployed with one click, specifically comprising:
[0029] Generate a web project for reasoning chat based on the training results; wherein the web project integrates the reasoning interface of the training results;
[0030] The web project and the training results are exported as images to a CD, and the CD is used for one-click installation and deployment.
[0031] According to a visual large model fine-tuning method provided by the present invention, the training result is compared with the historical training result to obtain an analysis report and / or an optimization plan, and then the following is further included:
[0032] When the analysis report does not satisfy the preset condition, the target large model is retrained according to the optimization scheme.
[0033] The present invention also provides a visual large model fine-tuning device, comprising:
[0034] A data set selection unit, configured to obtain a target data set according to the user's training requirements; the target data set includes at least one of a data set input by the user, a data set selected by the user from a pre-built data set library according to the training requirements, and a data set recommended in the data set library using a first preset algorithm according to the training requirements; the data set library includes data sets uploaded by the user in the past, data sets written by other users, open source data sets, and platform preset data sets;
[0035] A big model selection unit, used to obtain a target big model according to the training requirements; the target big model includes at least one of the big model input by the user, the big model selected by the user from a pre-built big model library according to the training requirements, and the big model recommended in the big model library using a second preset algorithm according to the target data set; the big model library includes the big models uploaded by the user in the past, big models developed by other users, open source big models, and platform preset big models;
[0036] A fine-tuning algorithm selection unit, configured to obtain a target fine-tuning algorithm according to the training requirements; the target fine-tuning algorithm includes at least one of a fine-tuning algorithm input by the user, a fine-tuning algorithm selected by the user from a pre-built fine-tuning algorithm library according to the training requirements, and a fine-tuning algorithm recommended in the fine-tuning algorithm library using a third preset algorithm according to the training requirements; the fine-tuning algorithm library includes fine-tuning algorithms uploaded by the user in the past, fine-tuning algorithms disclosed by other users, open source fine-tuning algorithms, and platform preset fine-tuning algorithms;
[0037] A model training unit, used to train the target large model according to the target fine-tuning algorithm and the target data set, obtain training results and training logs, and perform visual display according to the training logs;
[0038] A result comparison unit, used to compare the training result with the historical training result to obtain an analysis report and / or an optimization plan;
[0039] The model deployment unit is used to deploy the training results with one click when the analysis report meets the preset conditions.
[0040] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for fine-tuning a large visualized model as described above is implemented.
[0041] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for fine-tuning a large visualized model as described in any one of the above is implemented.
[0042] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for fine-tuning a large visualized model.
[0043] The visualization big model fine-tuning method and device provided by the present invention obtain a target data set according to the user's training needs; the target data set includes the data set input by the user, the data set selected by the user from a pre-built data set library according to the training needs, and at least one of the data sets recommended in the data set library using a first preset algorithm according to the training needs; the data set library includes the data sets uploaded by the user in the past, data sets written by other users, open source data sets, and platform preset data sets; the target big model is obtained according to the training needs; the target big model includes the big model input by the user, the big model selected by the user from a pre-built big model library according to the training needs, and at least one of the big models recommended in the big model library using a second preset algorithm according to the target data set; the big model library includes the big models uploaded by the user in the past, data sets written by other users, open source data sets, and platform preset data sets The target big model, open source big model and platform preset big model are input by the user, the open source big model and the platform preset big model are used; the target fine-tuning algorithm is obtained according to the training requirements; the target fine-tuning algorithm includes the fine-tuning algorithm input by the user, the fine-tuning algorithm selected by the user from the pre-built fine-tuning algorithm library according to the training requirements, and at least one of the fine-tuning algorithms recommended in the fine-tuning algorithm library based on a third preset algorithm according to the training requirements; the fine-tuning algorithm library includes the fine-tuning algorithms historically uploaded by the user, the fine-tuning algorithms disclosed by other users, the open source fine-tuning algorithms and the platform preset fine-tuning algorithms; the target big model is trained according to the target fine-tuning algorithm and the target data set, and the training results and training logs are obtained, and visual display is performed according to the training logs; the training results are compared with the historical training results to obtain an analysis report and / or optimization plan; when the analysis report meets the preset conditions, the training results are deployed with one click.
[0044] Based on the built-in data set library, large model library and fine-tuning algorithm library, the present invention supports code-free online fine-tuning, thereby quickly completing model construction and training, visualizing the training process, further lowering the usage threshold, and shortening the project development cycle. The present invention has high efficiency in large model fine-tuning, low cost and usage threshold, and good reusability. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 It is one of the flow charts of the visual large model fine-tuning method provided by the present invention;
[0047] Figure 2 This is the second flow chart of the visual large model fine-tuning method provided by the present invention;
[0048] Figure 3 The third flow chart of the method for fine-tuning a large visualized model provided by the present invention;
[0049] Figure 4 It is a structural schematic diagram of the visual large model fine-tuning device provided by the present invention;
[0050] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention.
[0051] Reference numerals:
[0052] 410: Dataset selection unit; 420: Large model selection unit; 430: Fine-tuning algorithm selection unit; 440: Model training unit; 450: Result comparison unit; 460: Model deployment unit. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Combine the following Figure 1-Figure 3 Describe the visual large model fine-tuning method of the present invention, Figure 1 This is one of the flow charts of the visualization large model fine-tuning method provided by the present invention, such as Figure 1 As shown, the method includes:
[0055] Step 110: Obtain a target data set according to the user's training requirements; the target data set includes at least one of a data set input by the user, a data set selected by the user from a pre-built data set library according to the training requirements, and a data set recommended in the data set library using a first preset algorithm according to the training requirements; the data set library includes data sets uploaded by the user in the past, data sets compiled by other users, open source data sets, and platform preset data sets.
[0056] It should be noted that training requirements include data set requirements, large model requirements,
[0057] First, you need to select a data set to obtain the target data set. The data set is selected by the user according to the training requirements. The scope of data set selection includes data sets entered by the user, data sets written by other users, open source data sets, platform preset data sets, and platform recommended data sets. Among them, the data sets uploaded by the user in the past, data sets written by other users, open source data sets, and platform preset data sets are summarized in the pre-built data set library. In other words, users can select the target data set from the data sets entered by the user, the pre-built data set library, and the data sets recommended by the platform according to their own training requirements.
[0058] Furthermore, the data set recommended by the platform is a data set recommended from the data set library using a first preset algorithm based on training requirements. In some embodiments, the first preset algorithm includes a collaborative filtering recommendation algorithm based on deep learning, a rule-based recommendation algorithm, a content-based recommendation algorithm, etc. It can be understood that the first preset algorithm mainly recommends the best matching data set to the user based on the description of the task text entered by the user, the user's historical preferences, the evaluation and use of the data set in the current system, and other information, and provides the basis for using this data set.
[0059] It should be noted that, for the data set recommended from the data set library using the first preset algorithm, the user can download it, modify it, and then upload it as the target data set.
[0060] In a specific embodiment, if the training requirement is to train a large model for the medical industry, then a data set for the medical industry needs to be selected so that the model can better understand the relevant business in the medical field. At this time, the user can select a high-quality data set for his or her business from the data set entered by the user, the pre-built data set library, and the data set recommended by the platform.
[0061] Furthermore, the composition of the data set includes (instruction: instruction, input: input (this data set is empty), output: output, etc.).
[0062] The present invention combines high-quality vertical industry data to establish a standard and unified public data set for users to choose from. At the same time, it can also automatically recommend high-quality data sets that are closer to user needs based on the user's data set needs.
[0063] Step 120: Obtain a target big model according to the training requirements; the target big model includes the big model input by the user, the big model selected by the user from a pre-built big model library according to the training requirements, and at least one of the big models recommended in the big model library using a second preset algorithm based on the target data set; the big model library includes the big models uploaded by the user in the past, big models developed by other users, open source big models and platform preset big models.
[0064] After that, the big model is selected to obtain the target big model. The selection of the big model is made by the user according to the training requirements. The scope of big model selection includes big models input by the user, big models developed by other users, open source big models, platform preset big models and big models recommended by the platform. Among them, the big models uploaded by the user in the past, the big models developed by other users, open source big models, and platform preset big models are summarized in the pre-built big model library. In other words, the user can select the target big model from the big models input by the user, the pre-built big model library and the big models recommended by the platform according to their own training needs.
[0065] Furthermore, the big model recommended by the platform is a big model recommended from the big model library using a second preset algorithm based on the target data set, and the platform recommends the best big model that matches the target data set. Specifically, the big model is recommended by combining the feature information of the target data set with the second preset algorithm. In some embodiments, the second preset algorithm includes a collaborative filtering recommendation algorithm based on deep learning, a cosine similarity matching algorithm, a K-nearest neighbor algorithm, and the like. It can be understood that the second preset algorithm mainly uses the second preset algorithm to recommend the best big model to the user through data such as the correlation between the data set and the model, historical evaluation information of other users, and the personal preferences of the current user, and provides the basis for using this model.
[0066] The present invention combines high-quality big models to form a rich vertical field big model library, giving more users choices. At the same time, it can also recommend the most suitable big model to the user in combination with the characteristic information of the data set selected by the user. The present invention can reduce the cost of users selecting big models.
[0067] Step 130: Obtain a target fine-tuning algorithm according to the training requirements; the target fine-tuning algorithm includes a fine-tuning algorithm input by the user, a fine-tuning algorithm selected by the user from a pre-built fine-tuning algorithm library according to the training requirements, and at least one of a fine-tuning algorithm recommended in the fine-tuning algorithm library using a third preset algorithm according to the training requirements; the fine-tuning algorithm library includes fine-tuning algorithms historically uploaded by the user, fine-tuning algorithms disclosed by other users, open source fine-tuning algorithms, and platform preset fine-tuning algorithms.
[0068] After that, the fine-tuning algorithm is selected to obtain the target fine-tuning algorithm. The fine-tuning algorithm is selected by the user according to the training requirements. The scope of fine-tuning algorithm selection includes the fine-tuning algorithm input by the user himself, the fine-tuning algorithms disclosed by other users, the open source fine-tuning algorithms, the platform preset fine-tuning algorithms, and the fine-tuning algorithms recommended by the platform. Among them, the fine-tuning algorithms uploaded by the user in the past, the fine-tuning algorithms disclosed by other users, the open source fine-tuning algorithms, and the platform preset fine-tuning algorithms are summarized in the pre-built fine-tuning algorithm library. In other words, the user can select the target fine-tuning algorithm from the fine-tuning algorithms input by the user himself, the pre-built fine-tuning algorithm library, and the fine-tuning algorithms recommended by the platform according to his own training needs.
[0069] Furthermore, the fine-tuning algorithm recommended by the platform is a fine-tuning algorithm recommended from the fine-tuning algorithm library using a third preset algorithm based on the target large model, and the platform recommends the best fine-tuning algorithm that matches the target large model. Specifically, the fine-tuning algorithm is recommended by combining the advantages of the target large model with the scene and other features through the third preset algorithm. In some embodiments, the third preset algorithm includes a collaborative filtering recommendation algorithm based on deep learning, a cosine similarity matching algorithm, a K-nearest neighbor algorithm, a heuristic search algorithm, and an empirical algorithm. It can be understood that the third preset algorithm mainly uses the third preset algorithm to recommend the best fine-tuning algorithm to the user through factors such as the correlation between the fine-tuning algorithm and the model, the historical experience results of fine-tuning, and personal preferences, and provides the basis for using this fine-tuning algorithm and the expected fine-tuning results.
[0070] The present invention combines high-quality fine-tuning algorithms to form a public unified fine-tuning algorithm library, reducing the cost of users selecting fine-tuning algorithms and developing fine-tuning algorithms. At the same time, it can also combine the advantages of the large model selected by the user and the characteristics of the scene to recommend the fine-tuning algorithm that best matches the large model to the user. The present invention can reduce the cost of users selecting large models, improve the efficiency of large model fine-tuning, lower the threshold of large model fine-tuning, and thus shorten the development cycle of large model projects.
[0071] Step 140: Train the target large model according to the target fine-tuning algorithm and the target data set, obtain training results and training logs, and perform visual display based on the training logs.
[0072] After the target data set, the target large model, and the target fine-tuning algorithm are selected, the target large model is trained using the target data set according to the target fine-tuning algorithm to obtain a training result, wherein the training result includes the trained target large model.
[0073] At the same time, during the training process, the training log is captured, and a visual display of the training process is performed based on the training log. Further, in some embodiments, the target large model is trained according to the target fine-tuning algorithm and the target data set to obtain the training log, which specifically includes:
[0074] During the training process, the training log is captured according to a preset capture frequency.
[0075] Specifically, the logs generated by fine-tuning the target large model are monitored using a preset capture frequency, i.e., a corresponding timed task, to obtain a training log. In a specific embodiment, the preset frequency is set to 60s, that is, the logs generated by fine-tuning are captured once every 60 seconds.
[0076] In another specific embodiment, an open source distributed timed task framework such as SchedulerX is used to perform timed capture of training logs.
[0077] Furthermore, after obtaining the training log, the log generated by the target large model in real time is read, the indicator information in the log is analyzed and extracted, and then visualized.
[0078] In some embodiments, performing a visual display based on the training log specifically includes:
[0079] Extracting current log indicators from the training log; the current log indicators include the number of data sets, fine-tuning algorithm, learning rate, training loss, gpu load, cpu load, and model convergence indicator;
[0080] Visually display the current log indicators in the form of real-time dynamic graphics on the large model fine-tuning data dashboard;
[0081] The current log indicator is monitored for abnormalities according to the result of the visual display.
[0082] Specifically, the current log indicators are extracted from the training log. Among them, the current log indicators include the number of data sets, fine-tuning algorithms, learning rates, training losses, GPU (Graphics Processing Unit, graphics processing unit) load, CPU (Central Processing Unit, central processing unit) load, model convergence indicators, etc. Afterwards, the extracted current log indicators are processed, analyzed and stored. In some embodiments, the current log indicators are processed, analyzed and stored using technologies such as Logstash, ElasticSearch, and Kibana.
[0083] Finally, by reading the corresponding current log indicators stored, using real-time dynamic drawing software such as Python, the current log indicators are displayed in the large model fine-tuning data dashboard in the form of real-time dynamic graphics. The dashboard content includes the number of processed data sets, GPU load, model convergence curve, learning rate curve, training loss curve, etc.
[0084] like Figure 2As shown, the result of the visual display can be used to monitor the current log indicator for abnormalities. In some embodiments, monitoring the current log indicator for abnormalities according to the result of the visual display specifically includes:
[0085] When there is an abnormality in the current log indicator, generating abnormality reminder information;
[0086] Determine whether exception handling is required based on the exception reminder message;
[0087] When it is determined that exception handling is required, the cause of the exception and the solution to the exception are generated;
[0088] When it is determined that no exception processing is required, the target large model is retrained according to the target fine-tuning algorithm and the target data set.
[0089] Specifically, Figure 3 As shown, if it is judged that the control is abnormal, proceed to the next step. If it is judged that the monitoring is abnormal, an asynchronous message is sent, and the asynchronous message includes abnormal reminder information. Then the asynchronous message is consumed to determine whether the abnormal situation needs to be handled. If the abnormal situation needs to be handled, the abnormal cause information and the abnormal solution are generated. Among them, the abnormal cause information is used to inform the user of the cause of the abnormality, and the abnormal solution includes recommended solutions, including adjusting the fine-tuning algorithm, optimizing the data set, adjusting the gpu resources, adjusting the learning rate step size, adjusting the loss function, etc. If it is judged that no abnormal handling is required, the target large model is retrained according to the target fine-tuning algorithm and the target data set.
[0090] Furthermore, when an abnormal situation needs to be processed, abnormal cause information and abnormal solution are generated, and then the target large model is retrained according to the abnormal solution.
[0091] It should be noted that according to the content displayed on the large model fine-tuning data dashboard, the log data generated by the system, such as exception logs, error logs, model convergence logs, etc., is monitored to determine whether there are any exceptions. It should be pointed out that the alarm thresholds of various indicators can be manually configured, such as jitter indicators at the minute level and abnormal number indicators at the minute level. Furthermore, an alarm phone can be configured. When the indicator reaches the alarm threshold, an alarm message is generated and the system sends the alarm message to the telephone contact.
[0092] The present invention can realize zero-code visual fine-tuning and shorten the project development cycle.
[0093] Step 150: Compare the training results with historical training results to obtain an analysis report and / or optimization plan.
[0094] After obtaining the training results, check the fine-tuning results of the target large model according to the training results, and compare the training results with the historical training results. You can also display the results and get an analysis report. If the current training results are worse than the historical training results, you need to provide an optimization plan.
[0095] In some embodiments, comparing the training results with historical training results to obtain an analysis report and / or an optimization solution specifically includes:
[0096] Extracting log indicators in the historical training log corresponding to the historical training results to obtain historical log indicators;
[0097] The historical log indicator and the current log indicator are compared, and the analysis report and / or the optimization solution are obtained according to the comparison result.
[0098] Specifically, the data comparison between the training results and the historical training results is mainly to compare with the results of the previous fine-tuning. Further, observe the results of this fine-tuning. If the fine-tuning result is not as high as the last time, you can go back to the parameter configuration of the last fine-tuning. It can be understood that when comparing the training results with the historical training results, the training results and the historical training results are obtained by training and fine-tuning based on the same data set and the same model, and the difference lies in different parameters and fine-tuning algorithms. In a specific embodiment, the historical training uses the AdaLoRA fine-tuning algorithm, and the current training uses the QLoRA fine-tuning algorithm. If the quality of this training result is not as high as the last time, I can use the last AdaLoRA fine-tuning algorithm for the next fine-tuning, or choose other fine-tuning algorithms.
[0099] The log indicators in the historical training log corresponding to the historical training results are extracted to obtain the historical log indicators. It should be noted that in this embodiment, the main extracted log indicators mainly include model convergence status, learning rate, training loss, etc.
[0100] Based on the comparison between historical log indicators and current log indicators, analyze which fine-tuning algorithm strategy is better for large model fine-tuning and form an analysis report. If the various log indicators of historical training perform better, some improvement suggestions need to be generated while generating the analysis report to obtain an optimization plan. It should be noted that the optimization plan includes adjusting the fine-tuning algorithm, optimizing the data set, adjusting the GPU resources, adjusting the learning rate step size, adjusting the loss function, etc.
[0101] Furthermore, in some embodiments, the training result is compared with the historical training result to obtain an analysis report and / or an optimization solution, and then the following is further included:
[0102] When the analysis report does not satisfy the preset condition, the target large model is retrained according to the optimization scheme.
[0103] Specifically, Figure 3 As shown, if the analysis report meets the expected or preset conditions, proceed to the next step. If the analysis report does not meet the expected or preset conditions, retrain the target large model according to the optimization plan.
[0104] The present invention can automatically analyze the fine-tuning result information and provide a professional improvement and optimization solution.
[0105] Step 160: When the analysis report meets the preset conditions, the training results are deployed with one click.
[0106] Specifically, if the training results meet the requirements according to the analysis report, the training results can also be deployed with one click to reduce usage and operating costs.
[0107] In some embodiments, when the analysis report meets a preset condition, the training result is deployed with one click, specifically including:
[0108] Generate a web project for reasoning chat based on the training results; wherein the web project integrates the reasoning interface of the training results;
[0109] The web project and the training results are exported as images to a CD, and the CD is used for one-click installation and deployment.
[0110] Specifically, the one-click deployment includes a web project that automatically generates an inference chat based on the training results, wherein the web project integrates the inference interface of the target large model that has been trained, including the training results.
[0111] One-click deployment also includes using technologies such as docker and k8s to export the web project and the training results, including the completed target large model, to a CD. The resulting CD can be used to install and deploy the large model on the client computer with one click and use it.
[0112] The deployment performed in this embodiment is a private deployment, which can further ensure the security of user data.
[0113] Based on the defects of the prior art, the present invention proposes a zero-code visual fine-tuning large model solution to meet the urgent needs of enterprises to use AI technology to improve production efficiency. It can also improve the ability of companies with AI capabilities to fine-tune large models. At the same time, it supports third-party individuals and companies to upload and publish their own fine-tuning algorithms and training data sets, and they can choose whether to make them public or private when uploading. For large models that have been fine-tuned, the fine-tuning results can be published publicly with one click.
[0114] The visualization big model fine-tuning method provided by the present invention obtains a target data set according to the user's training needs; the target data set includes the data set input by the user, the data set selected by the user from a pre-built data set library according to the training needs, and at least one of the data sets recommended in the data set library using a first preset algorithm according to the training needs; the data set library includes the data sets uploaded by the user in the past, data sets written by other users, open source data sets, and platform preset data sets; the target big model is obtained according to the training needs; the target big model includes the big model input by the user, the big model selected by the user from a pre-built big model library according to the training needs, and at least one of the big models recommended in the big model library using a second preset algorithm according to the target data set; the big model library includes the big models uploaded by the user in the past, data sets developed by other users large model, open source large model and platform preset large model; obtain the target fine-tuning algorithm according to the training requirements; the target fine-tuning algorithm includes the fine-tuning algorithm input by the user, the fine-tuning algorithm selected by the user from the pre-built fine-tuning algorithm library according to the training requirements, and at least one of the fine-tuning algorithms recommended in the fine-tuning algorithm library based on the third preset algorithm according to the training requirements; the fine-tuning algorithm library includes the fine-tuning algorithms uploaded by the user in history, the fine-tuning algorithms disclosed by other users, the open source fine-tuning algorithms and the platform preset fine-tuning algorithms; train the target large model according to the target fine-tuning algorithm and the target data set, obtain the training results and training logs, and perform visual display according to the training logs; compare the training results with the historical training results to obtain an analysis report and / or optimization plan; if the analysis report meets the preset conditions, deploy the training results with one click. The present invention is based on the built-in data set library, large model library and fine-tuning algorithm library, supports code-free online fine-tuning, so as to quickly complete model construction and training, visualize the training process, further reduce the use threshold, and shorten the project development cycle. The large model of the present invention has high fine-tuning efficiency, low cost and usage threshold, and good reusability.
[0115] The following is a description of the visualization large model fine-tuning device provided by the present invention. The visualization large model fine-tuning device described below and the visualization large model fine-tuning method described above can refer to each other. Figure 4Schematic diagram of the structure of the visual large model fine-tuning device provided by the present invention. Figure 4 As shown, the device comprises:
[0116] The data set selection unit 410 is used to obtain a target data set according to the user's training requirements; the target data set includes at least one of a data set input by the user, a data set selected by the user from a pre-built data set library according to the training requirements, and a data set recommended based on the data set library using a first preset algorithm according to the training requirements; the data set library includes data sets uploaded by the user in the past, data sets written by other users, open source data sets, and platform preset data sets;
[0117] A big model selection unit 420 is used to obtain a target big model according to the training requirements; the target big model includes at least one of the big model input by the user, the big model selected by the user from a pre-built big model library according to the training requirements, and the big model recommended in the big model library using a second preset algorithm according to the target data set; the big model library includes the big models uploaded by the user in the past, big models developed by other users, open source big models, and platform preset big models;
[0118] A fine-tuning algorithm selection unit 430 is used to obtain a target fine-tuning algorithm according to the training requirements; the target fine-tuning algorithm includes at least one of a fine-tuning algorithm input by the user, a fine-tuning algorithm selected by the user from a pre-built fine-tuning algorithm library according to the training requirements, and a fine-tuning algorithm recommended in the fine-tuning algorithm library using a third preset algorithm according to the training requirements; the fine-tuning algorithm library includes fine-tuning algorithms uploaded by the user in the past, fine-tuning algorithms disclosed by other users, open source fine-tuning algorithms, and platform preset fine-tuning algorithms;
[0119] A model training unit 440 is used to train the target large model according to the target fine-tuning algorithm and the target data set, obtain training results and training logs, and perform visual display according to the training logs;
[0120] A result comparison unit 450 is used to compare the training result with the historical training result to obtain an analysis report and / or an optimization plan;
[0121] The model deployment unit 460 is used to deploy the training results with one click when the analysis report meets the preset conditions.
[0122] Based on the above embodiment, in the device, visual display is performed according to the training log, specifically including:
[0123] Extracting current log indicators from the training log; the current log indicators include the number of data sets, fine-tuning algorithm, learning rate, training loss, gpu load, cpu load, and model convergence indicator;
[0124] Visually display the current log indicators in the form of real-time dynamic graphics on the large model fine-tuning data dashboard;
[0125] The current log indicator is monitored for abnormalities according to the result of the visual display.
[0126] Based on the above embodiment, in the device, the abnormal monitoring of the current log indicator according to the result of the visual display specifically includes:
[0127] When there is an abnormality in the current log indicator, generating abnormality reminder information;
[0128] Determine whether exception handling is required based on the exception reminder message;
[0129] When it is determined that exception handling is required, the cause of the exception and the solution to the exception are generated;
[0130] When it is determined that no exception processing is required, the target large model is retrained according to the target fine-tuning algorithm and the target data set.
[0131] Based on the above embodiment, in the device, the target large model is trained according to the target fine-tuning algorithm and the target data set to obtain a training log, which specifically includes:
[0132] During the training process, the training log is captured according to a preset capture frequency.
[0133] Based on the above embodiment, in the device, comparing the training result with the historical training result to obtain an analysis report and / or an optimization plan specifically includes:
[0134] Extracting log indicators in the historical training log corresponding to the historical training results to obtain historical log indicators;
[0135] The historical log indicator and the current log indicator are compared, and the analysis report and / or the optimization solution are obtained according to the comparison result.
[0136] Based on the above embodiment, in the device, when the analysis report meets the preset conditions, the training result is deployed with one click, specifically including:
[0137] Generate a web project for reasoning chat based on the training results; wherein the web project integrates the reasoning interface of the training results;
[0138] The web project and the training results are exported as images to a CD, and the CD is used for one-click installation and deployment.
[0139] Based on the above embodiment, in the device, the training result is compared with the historical training result to obtain an analysis report and / or an optimization plan, and then further includes:
[0140] When the analysis report does not satisfy the preset condition, the target large model is retrained according to the optimization scheme.
[0141] The visualization big model fine-tuning device provided by the present invention obtains a target data set according to the user's training needs; the target data set includes the data set input by the user, the data set selected by the user from a pre-built data set library according to the training needs, and at least one of the data sets recommended in the data set library using a first preset algorithm according to the training needs; the data set library includes the data sets uploaded by the user in the past, data sets written by other users, open source data sets, and platform preset data sets; a target big model is obtained according to the training needs; the target big model includes the big model input by the user, the big model selected by the user from a pre-built big model library according to the training needs, and at least one of the big models recommended in the big model library using a second preset algorithm according to the target data set; the big model library includes the big models uploaded by the user in the past, data sets developed by other users big model, open source big model and platform preset big model; obtain a target fine-tuning algorithm according to the training requirements; the target fine-tuning algorithm includes the fine-tuning algorithm input by the user, the fine-tuning algorithm selected by the user from a pre-built fine-tuning algorithm library according to the training requirements, and at least one of the fine-tuning algorithms recommended in the fine-tuning algorithm library based on a third preset algorithm according to the training requirements; the fine-tuning algorithm library includes the fine-tuning algorithms uploaded by the user in the past, the fine-tuning algorithms disclosed by other users, the open source fine-tuning algorithms and the platform preset fine-tuning algorithms; train the target big model according to the target fine-tuning algorithm and the target data set, obtain training results and training logs, and perform visual display according to the training logs; compare the training results with historical training results to obtain an analysis report and / or optimization plan; and deploy the training results with one click when the analysis report meets the preset conditions.
[0142] Based on the built-in data set library, large model library and fine-tuning algorithm library, the present invention supports code-free online fine-tuning, thereby quickly completing model construction and training, visualizing the training process, further lowering the usage threshold, and shortening the project development cycle. The present invention has high efficiency in large model fine-tuning, low cost and usage threshold, and good reusability.
[0143] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the visualization large model fine-tuning method, which includes: obtaining a target data set according to the user's training needs; the target data set includes at least one of the data set input by the user, the data set selected by the user from the pre-built data set library according to the training needs, and the data set recommended by the first preset algorithm based on the training needs in the data set library; the data set library includes the data set uploaded by the user in history, the data set written by other users, the open source data set and the platform preset data set; obtaining a target large model according to the training needs; the target large model includes the large model input by the user, the large model selected by the user from the pre-built large model library according to the training needs, and the large model recommended by the second preset algorithm based on the target data set; the large model library includes the data set uploaded by the user in history, the data set written by other users, the open source data set and the platform preset data set; obtaining a target large model according to the training needs; the target large model includes at least one of the large model input by the user, the large model selected by the user from the pre-built large model library according to the training needs, and the large model recommended by the second preset algorithm based on the large model library according to the target data set; the large model library includes the data set uploaded by the user in history, ... The target large model uploaded by the user, the large model developed by other users, the open source large model and the platform preset large model; obtain the target fine-tuning algorithm according to the training requirements; the target fine-tuning algorithm includes the fine-tuning algorithm input by the user, the fine-tuning algorithm selected by the user from the pre-built fine-tuning algorithm library according to the training requirements, and at least one of the fine-tuning algorithms recommended in the fine-tuning algorithm library based on a third preset algorithm according to the training requirements; the fine-tuning algorithm library includes the fine-tuning algorithms historically uploaded by the user, the fine-tuning algorithms disclosed by other users, the open source fine-tuning algorithms and the platform preset fine-tuning algorithms; train the target large model according to the target fine-tuning algorithm and the target data set, obtain the training results and training logs, and perform visual display according to the training logs; compare the training results with the historical training results to obtain an analysis report and / or optimization plan; and if the analysis report meets the preset conditions, deploy the training results with one click.
[0144] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0145] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the visualization large model fine-tuning method provided by the above-mentioned methods, which method includes: obtaining a target data set according to the user's training needs; the target data set includes the data set input by the user, the data set selected by the user from a pre-built data set library according to the training needs, and at least one of the data sets recommended in the data set library based on the training needs using a first preset algorithm; the data set library includes the data sets uploaded by the user in the past, data sets written by other users, open source data sets and platform preset data sets; obtaining a target large model according to the training needs; the target large model includes the large model input by the user, the large model selected by the user from a pre-built large model library according to the training needs, and the large model selected by the user from a pre-built large model library according to the training needs using a second preset algorithm based on the target data set At least one of the big models recommended in the big model library; the big model library includes the big models uploaded by the user in the past, the big models developed by other users, the open source big models and the platform preset big models; the target fine-tuning algorithm is obtained according to the training requirements; the target fine-tuning algorithm includes the fine-tuning algorithm input by the user, the fine-tuning algorithm selected by the user from the pre-built fine-tuning algorithm library according to the training requirements, and at least one of the fine-tuning algorithms recommended in the fine-tuning algorithm library using a third preset algorithm according to the training requirements; the fine-tuning algorithm library includes the fine-tuning algorithms uploaded by the user in the past, the fine-tuning algorithms disclosed by other users, the open source fine-tuning algorithms and the platform preset fine-tuning algorithms; the target big model is trained according to the target fine-tuning algorithm and the target data set, and the training results and training logs are obtained, and the training logs are visualized; the training results are compared with the historical training results to obtain an analysis report and / or an optimization plan; when the analysis report meets the preset conditions, the training results are deployed with one click.
[0146] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the visualization big model fine-tuning method provided by the above-mentioned methods, the method comprising: obtaining a target data set according to the user's training requirements; the target data set comprises a data set input by the user, a data set selected by the user from a pre-built data set library according to the training requirements, and at least one of a data set recommended in the data set library using a first preset algorithm according to the training requirements; the data set library comprises data sets uploaded by the user in the past, data sets written by other users, open source data sets, and platform preset data sets; obtaining a target big model according to the training requirements; the target big model comprises a big model input by the user, a big model selected by the user from a pre-built big model library according to the training requirements, and at least one of a big model recommended in the big model library using a second preset algorithm according to the target data set A method according to the present invention; the large model library includes the large models uploaded by the user in the past, the large models developed by other users, the open source large models and the platform preset large models; the target fine-tuning algorithm is obtained according to the training requirements; the target fine-tuning algorithm includes the fine-tuning algorithm input by the user, the fine-tuning algorithm selected by the user from the pre-built fine-tuning algorithm library according to the training requirements, and at least one of the fine-tuning algorithms recommended in the fine-tuning algorithm library based on a third preset algorithm according to the training requirements; the fine-tuning algorithm library includes the fine-tuning algorithms uploaded by the user in the past, the fine-tuning algorithms disclosed by other users, the open source fine-tuning algorithms and the platform preset fine-tuning algorithms; the target large model is trained according to the target fine-tuning algorithm and the target data set, and the training results and training logs are obtained, and the training logs are visualized; the training results are compared with the historical training results to obtain an analysis report and / or an optimization plan; when the analysis report meets the preset conditions, the training results are deployed with one click.
[0147] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0148] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A visual large model fine-tuning method, characterized in that: include: Obtain the target data set according to the user's training requirements; The target data set includes at least one of a data set input by the user, a data set selected by the user from a pre-built data set library according to the training requirements, and a data set recommended by the data set library using a first preset algorithm according to the training requirements; the data set library includes data sets uploaded by the user in the past, data sets written by other users, open source data sets, and platform preset data sets; The first preset algorithm is used to recommend the best matching dataset to the user based on at least one of the description of the task text input by the user, the user's historical preferences, the evaluation of the dataset in the current system, and the purpose, and provide the basis for using this dataset; A target big model is obtained according to the training requirements; the target big model includes at least one of the big model input by the user, the big model selected by the user from a pre-built big model library according to the training requirements, and the big model recommended in the big model library using a second preset algorithm according to the target data set; the big model library includes the big models uploaded by the user in the past, big models developed by other users, open source big models, and platform preset big models; the second preset algorithm is used to recommend the best big model to the user according to at least one of the correlation between the data set and the model, historical evaluation information of other users, and personal preferences of the current user, and provide a basis for using this model; A target fine-tuning algorithm is obtained according to the training requirements; the target fine-tuning algorithm includes at least one of a fine-tuning algorithm input by the user, a fine-tuning algorithm selected by the user from a pre-built fine-tuning algorithm library according to the training requirements, and a fine-tuning algorithm recommended in the fine-tuning algorithm library using a third preset algorithm according to the training requirements; the fine-tuning algorithm library includes fine-tuning algorithms uploaded by the user in the past, fine-tuning algorithms disclosed by other users, open source fine-tuning algorithms, and platform preset fine-tuning algorithms; the third preset algorithm is used to recommend the best fine-tuning algorithm to the user according to at least one of the correlation between the fine-tuning algorithm and the model, the historical experience results of fine-tuning, and personal preferences, and provides the basis for using this fine-tuning algorithm and the expected fine-tuning results; Training the target large model according to the target fine-tuning algorithm and the target data set, obtaining training results and training logs, and performing visual display according to the training logs; Comparing the training results with historical training results to obtain an analysis report and / or an optimization plan; When the analysis report meets the preset conditions, the training results are deployed with one click; The target large model is trained according to the target fine-tuning algorithm and the target data set to obtain a training log, which specifically includes: During the training process, the training log is captured according to a preset capture frequency.
2. The method for fine-tuning a large visualized model according to claim 1, characterized in that: Perform visual display based on the training log, specifically including: Extracting current log indicators from the training log; the current log indicators include the number of data sets, fine-tuning algorithm, learning rate, training loss, gpu load, cpu load, and model convergence indicator; Visually display the current log indicators in the form of real-time dynamic graphics on the large model fine-tuning data dashboard; The current log indicator is monitored for abnormalities according to the result of the visual display.
3. The method for fine-tuning a large visualized model according to claim 2, characterized in that: The abnormal monitoring of the current log indicator according to the result of the visual display specifically includes: When there is an abnormality in the current log indicator, generating abnormality reminder information; Determine whether exception handling is required based on the exception reminder message; When it is determined that exception handling is required, the cause of the exception and the solution to the exception are generated; When it is determined that no exception processing is required, the target large model is retrained according to the target fine-tuning algorithm and the target data set.
4. The method for fine-tuning a large visualized model according to claim 2, characterized in that: The comparing the training results with the historical training results to obtain an analysis report and / or an optimization plan specifically includes: Extracting log indicators in the historical training log corresponding to the historical training results to obtain historical log indicators; The historical log indicator and the current log indicator are compared, and the analysis report and / or the optimization solution are obtained according to the comparison result.
5. The method for fine-tuning a large visualized model according to claim 1, characterized in that: When the analysis report meets the preset conditions, the training result is deployed with one click, specifically including: Generate a web project for reasoning chat based on the training results; wherein the web project integrates the reasoning interface of the training results; The web project and the training results are exported as images to a CD, and the CD is used for one-click installation and deployment.
6. The method for fine-tuning a large visualized model according to claim 1, characterized in that: The training result is compared with the historical training result to obtain an analysis report and / or an optimization plan, and then further includes: When the analysis report does not satisfy the preset condition, the target large model is retrained according to the optimization scheme.
7. A visual large model fine-tuning device, characterized in that: include: A data set selection unit, used to obtain a target data set according to the user's training requirements; The target data set includes at least one of a data set input by the user, a data set selected by the user from a pre-built data set library according to the training requirements, and a data set recommended by the data set library using a first preset algorithm according to the training requirements; the data set library includes data sets uploaded by the user in the past, data sets written by other users, open source data sets, and platform preset data sets; The first preset algorithm is used to recommend the best matching dataset to the user based on at least one of the description of the task text input by the user, the user's historical preferences, the evaluation of the dataset in the current system, and the purpose, and provide the basis for using this dataset; A big model selection unit, used to obtain a target big model according to the training requirements; the target big model includes at least one of the big model input by the user, the big model selected by the user from a pre-built big model library according to the training requirements, and the big model recommended in the big model library using a second preset algorithm based on the target data set; the big model library includes the big models uploaded by the user in the past, big models developed by other users, open source big models, and platform preset big models; the second preset algorithm is used to recommend the best big model to the user according to at least one of the correlation between the data set and the model, historical evaluation information of other users, and personal preferences of the current user, and provide a basis for using this model; A fine-tuning algorithm selection unit, configured to obtain a target fine-tuning algorithm according to the training requirements; the target fine-tuning algorithm includes at least one of a fine-tuning algorithm input by the user, a fine-tuning algorithm selected by the user from a pre-built fine-tuning algorithm library according to the training requirements, and a fine-tuning algorithm recommended in the fine-tuning algorithm library using a third preset algorithm according to the training requirements; the fine-tuning algorithm library includes fine-tuning algorithms uploaded by the user in the past, fine-tuning algorithms disclosed by other users, open source fine-tuning algorithms, and platform preset fine-tuning algorithms; the third preset algorithm is used to recommend the best fine-tuning algorithm to the user according to at least one of the correlation between the fine-tuning algorithm and the model, the historical experience results of fine-tuning, and personal preferences, and provide the basis for using this fine-tuning algorithm and the expected fine-tuning results; A model training unit, used to train the target large model according to the target fine-tuning algorithm and the target data set, obtain training results and training logs, and perform visual display according to the training logs; A result comparison unit, used to compare the training result with the historical training result to obtain an analysis report and / or an optimization plan; A model deployment unit, configured to deploy the training result with one click if the analysis report meets a preset condition; The target large model is trained according to the target fine-tuning algorithm and the target data set to obtain a training log, which specifically includes: During the training process, the training log is captured according to a preset capture frequency.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for fine-tuning a large visualized model as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for fine-tuning a large visualized model as claimed in any one of claims 1 to 6 is implemented.
