A generative large model training method for software engineering

Through the generative large-scale model training method for software engineering, the collaborative work between the Agent server and the training server is used to realize multiple rounds of training of intelligent task scheduling and deep learning models, solving the problem of time-consuming and resource-consuming traditional software development methods, and realizing the ability to generate high-quality code and adapt to different programming languages ​​and fields.

CN118966385BActive Publication Date: 2025-03-14HI-THINK TECH CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411448896.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-03-14
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

Traditional software development methods rely on manual operations, consume a lot of time and resources, and are difficult to deal with complex programming needs, and have limited generalization capabilities, so they cannot adapt to the needs of different programming languages ​​or cross-domain fields.

Method used

A generative large-model training method for software engineering is designed. Through the collaborative work between the Agent server and the training server, multiple rounds of training strategies for intelligent task scheduling, distributed computing resource management and deep learning models are realized, and a multi-round training strategy for automated management and efficient execution of model training tasks are implemented.

Benefits of technology

It realizes the generation of high-quality, complex code and documents, adapts to the needs of different programming languages ​​and fields, reduces the cost of training models, and improves the quality of training models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118966385B_ABST
    Figure CN118966385B_ABST
Patent Text Reader

Abstract

The invention discloses a generative large model training method for software engineering, comprising the following specific steps: step A: an Agent server accesses a to-be-executed task queue of a training server once per minute, and the Agent service matches the carried training server IP with the task training server at the head of the queue, and if the IPs are the same, obtains the training task information; if they are not the same, continues to match with the IP of the next training task in the queue until a task with the same server IP is found; step B: after obtaining the to-be-executed training task, it is necessary to determine whether the task is a multi-round training task, and if so: execute step G; if not, execute step C; the invention relates to the technical field of software engineering, and the invention has the beneficial effect of providing a generative large model training method, characterized in that the Agent service monitors the to-be-executed tasks of the training server in real time, and if a to-be-executed task is detected, trains the task according to the steps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software engineering, and in particular to a generative large model training method for software engineering. Background Art

[0002] With the rapid development of the software development industry, the scale and complexity of software systems are increasing. Traditional software development methods rely on manual operations, which not only consumes a lot of time and resources, but also easily introduces human errors.

[0003] Traditional software development tools or methods are usually manually based on template matching or rule reasoning, lack deep learning capabilities, cannot effectively handle complex programming requirements or generate high-quality code, have limited generalization capabilities, and are difficult to adapt to different programming languages ​​or cross-domain requirements for specific programming languages ​​or fields. The use of manual training of large language model technology also requires a lot of labor costs and computing power costs, and the training process is complex and prone to errors. Summary of the invention

[0004] The purpose of the present invention is to solve the above problems and to design a generative large model training method for software engineering.

[0005] The technical solution of the present invention to achieve the above-mentioned purpose is a generative large model training method for software engineering, and the specific steps are as follows:

[0006] Step A: The Agent server accesses the training server once every minute to check the queue of pending tasks. Each pending task is assigned a corresponding training server IP when it is created by the training server. The Agent service carries the IP address of the training server and first matches it with the training server IP of the task created earliest in the queue. If the IP addresses are the same, the Agent service will obtain the training information of the task; if they do not match, the Agent service will continue to match the next task in the queue until it finds a task with the same IP address as this server.

[0007] Step B: After obtaining the training task to be executed, it is necessary to determine whether the task is a multi-round training task. If it is, execute step G; if not, execute step C;

[0008] Step C: The training tasks are assigned to the corresponding server instances for execution. These server instances are cloud hosts or edge computing servers that have been configured and added to the large model tool chain. The server instances deploy the required training environment according to the training task information. After the deployment is completed, these instances will be used to support the operation of model training.

[0009] Step D: Load the base model in the server of the training task;

[0010] Step E: Download the data set to be trained to the server instance;

[0011] Step F: Download the training script to the server instance. The script is used to configure the parameters required for model training and is set accordingly according to the specific script parameters of the training task.

[0012] Step G: Run the script to start training. The script will automatically adjust the default parameters for model training, including development language, training accuracy, maximum context length, number of training rounds, and number of layers for fine-tuning the model. Then, the script starts the training process and executes the task according to the set number of training rounds. The model will learn the rules and patterns from the training data set and generate the output parameter file.

[0013] Step H: During the training task, the training task log is continuously written. The service will check the execution data of the log in real time to monitor whether the training task is completed. If not, it will continue to check the log; if the execution is completed and successful, the training results will be saved and returned to the training server; if the execution is completed and failed, the results will be returned to the training server;

[0014] Step I: After training is completed, the generated model parameter file needs to be uploaded to the specified location of the object storage for storage. A parameter file is generated for each round of training, so the number of files uploaded corresponds to the number of training rounds.

[0015] Step J: After uploading the model, clear the historical data left over from the training task;

[0016] Step K: Release the server.

[0017] In step A, the steps of training the server are as follows:

[0018] Step 1: First, the business personnel start to create a training task, input data, training configuration, training server and training script parameters. Data configuration includes: selecting the data set and data difference ratio; training configuration includes: whether to perform incremental training, selecting the basic model, model version and training method; training server includes: automatic allocation and manual selection of servers; training script parameters include: training data set development language, training accuracy, maximum context length, number of training rounds and number of layers of fine-tuning model; after the service customizes the task information, the creation of the training task is completed.

[0019] Step 2: Create the completed task and put it into the queue of pending tasks. The pending tasks are arranged according to the creation time. The Agent server obtains the pending tasks from the head of the queue for training.

[0020] Step 3: The Agent service trains the task according to the steps. After each step is completed, the execution result is sent to the training server, and the Agent service will continue to execute the next step.

[0021] Step 4: When the training server receives the task execution result information, it will first determine whether the current task has just completed the training script step. If so, the business personnel will choose whether to continue multiple rounds of training; if not, the database will record the task execution status information.

[0022] Step 5: The business personnel choose whether to conduct multiple rounds of training. If they choose yes, the training task status is set to pending and enters the pending task queue for a new round of training. If they choose no, after receiving the instruction, the Agent performs a series of operations after the task is completed.

[0023] A generative large model training method for software engineering is produced using the technical solution of the present invention. The Agent service monitors the tasks to be executed on the training server in real time. If a task to be executed is detected, the task is trained according to the steps. After the training is completed, the business personnel can choose to continue training or publish training according to the training results. The entire business process is more flexible and convenient. This method uses a standard model training process and multi-language and multi-field training data. The automated training can generate high-quality, complex code and documents, and can also adapt to the generative large model in the field of software engineering that meets the requirements of different programming languages ​​and fields. This method reduces the cost of training models and improves the quality of training models. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a structural diagram of a generative large model training method for software engineering described in the present invention. DETAILED DESCRIPTION

[0025] The present invention will be described in detail below in conjunction with the accompanying drawings. Figure 1 As shown in the figure, a generative large model training method for software engineering is presented, which combines intelligent task scheduling, distributed computing resource management, and a multi-round training strategy for deep learning models. Through the collaborative work of the Agent server and the training server, the automated management and efficient execution of model training tasks are achieved.

[0026] Agent server steps

[0027] Step A: Task allocation and scheduling. The Agent server accesses the training server every minute to check the queue of pending tasks. Each pending task is associated with a specific training server IP. The Agent matches the tasks in the queue one by one to ensure that the tasks can be accurately assigned to the corresponding server instance. When the match is successful, the Agent obtains the training information of the task and prepares to execute the task; if the match is unsuccessful, the Agent continues to traverse the next task in the task queue.

[0028] Step B: Task attribute judgment and execution strategy. After the task is successfully assigned, the system first determines the type of task and confirms whether the task is a multi-round training task. If it is a multi-round training task, it enters step G to gradually optimize the model parameters through multi-round training; if it is a single-round training task, it enters step C to perform training. Multi-round training continuously optimizes model parameters through multiple incremental learning, improving the prediction accuracy and generalization ability of the model.

[0029] Step C: Deployment of the training environment. The server instance can be a cloud host or an edge computing node, which is managed by the large model tool chain. Once the training task is assigned to the server instance for execution, the Agent server will automatically deploy the training environment according to the specific requirements of the training task. The deployment of the environment includes installing the necessary drivers, dependency packages, deep learning frameworks, and acceleration components.

[0030] Step D: Loading the basic model. Before the training task starts, the system loads the basic model in the training server. The basic model is a model that has been pre-optimized in the general software field. The process of loading the basic model includes downloading the model file, initializing the model parameters, and configuring the required operating environment.

[0031] Step E: Loading and preparing training data sets. Download the required training data sets to the server instance. Data sets are source code packages in professional fields and are managed by the big model tool chain. The system extracts data sets from remote distributed storage and performs data cleaning and format standardization according to task requirements.

[0032] Step F: Configuration and deployment of training scripts. The system downloads the training script to the server instance. The training script is the core part of controlling the model training process and is used to configure various training parameters, including development language, training accuracy, maximum context length, training rounds, and the number of layers for model fine-tuning.

[0033] Step G: Perform model training. The system starts the model training process. During the model training process, the parameters are updated according to the gradient of the loss function through the back-propagation algorithm to gradually reduce the difference between the predicted output and the actual label. The gradient reflects the change in the sensitivity of the loss function to each parameter and guides the direction and amplitude of parameter adjustment. The learning rate determines the pace of parameter update in each iteration. If it is too large, the loss fluctuation will be difficult to converge, and if it is too small, the convergence speed will be slow. As the training progresses, ideally the loss value will gradually decrease until it stabilizes, indicating that the model performance improves and eventually reaches the optimal or near-optimal state.

[0034] Step H: Training log monitoring and exception handling. The system records the training log in real time. The log content includes the execution status of each training step, parameter update status, loss function changes, and training progress. After the training task is successfully completed, the system returns the results to the training server; if the training fails, detailed error information is returned.

[0035] Step I: Saving the model parameter file. After each round of training, the system uploads the generated model parameter file to the specified location of the remote object storage. The parameter file generated after each training is marked and versioned with the corresponding training time and training round.

[0036] Step J: Task cleanup and resource recovery: After the training task is completed, the system automatically cleans up the temporary data and log files generated during the training process to release server resources.

[0037] Step K: Release server resources. When all tasks are completed, the Agent server will release the corresponding server instance, cancel the binding between the task and the server, and set the cloud host or edge computing server status to idle.

[0038] Training server steps

[0039] Step 1: Create a training task. Business personnel create a training task, which includes data set selection and configuration (such as data difference ratio), training parameter setting (such as whether to perform incremental training, basic model selection, model version and training method, etc.), training server allocation method (automatic or manual allocation) and training script parameter configuration (such as development language, training accuracy, maximum context length, training rounds and model fine-tuning layers, etc.). After the task configuration is completed, the system adds the task to the queue of tasks to be executed.

[0040] Step 2: Task scheduling and execution. After the newly created task enters the queue to be executed, it is scheduled in the order of task creation time. The Agent server obtains the tasks to be executed from the queue one by one to ensure that the tasks are executed according to the established strategy and avoid execution conflicts caused by resource contention.

[0041] Step 3: Execution feedback. After each training step is completed, the Agent server will feed back the execution results to the training server in real time. After receiving the feedback, the training server records the execution status and logs of the task to ensure the traceability of the task execution process and provide support for subsequent analysis.

[0042] Step 4: Determination of multiple rounds of training. After the training task is completed, the training server will determine whether the task has just completed the training script stage. If so, the system will notify the business personnel to decide whether to conduct multiple rounds of training. If you choose to continue multiple rounds of training, the task status will be set to "pending" and re-enter the queue for a new round of training; if you choose not to continue training, you will enter the subsequent processing stage of the task.

[0043] Step 5: Processing after task completion. After all training tasks are completed, the system automatically executes the post-task processing flow, including saving model parameter files, task cleanup and resource recycling, and releasing server resources.

[0044] In this implementation, the method adopts an asynchronous task mode. The Agent service monitors the tasks to be executed on the training server in real time. If a task to be executed is detected, the training data set is obtained according to the steps and the training task is executed. When the training is completed, the business personnel can choose to continue training or publish the trained model according to the training results. The automated and efficient management of generative large model training in the software engineering field is realized.

[0045] The above technical solutions only reflect the preferred technical solutions of the technical solutions of the present invention. Some changes that may be made to certain parts thereof by technicians in this technical field all reflect the principles of the present invention and fall within the protection scope of the present invention.

Claims

1. A generative large model training method for software engineering, characterized in that: The specific steps are as follows: Step A: The Agent server accesses the training server once a minute to check the queue of pending tasks. Each pending task is specified by the training server when it is created. The Agent server carries the IP address of the training server and first matches it with the training server IP of the task created earliest in the queue. If the IP addresses are the same, the Agent server will obtain the training information of the task; if they do not match, the Agent server will continue to match the next task in the queue until it finds a task with the same IP address as the training server. Step B: After obtaining the training task to be executed, it is necessary to determine whether the task is a multi-round training task. If it is, execute step G; if not, execute step C; Step C: The training tasks are assigned to the corresponding server instances for execution. These server instances are cloud hosts or edge computing servers that have been configured and added to the large model tool chain. The server instances deploy the required training environment according to the training task information. After the deployment is completed, these instances will be used to support the operation of model training. Step D: Load the base model in the server of the training task; Step E: Download the data set to be trained to the server instance; Step F: Download the training script to the server instance. The script is used to configure the parameters required for model training and is set accordingly according to the specific script parameters of the training task. Step G: Run the script to start training. The script automatically adjusts the default parameters for model training, including development language, training accuracy, maximum context length, number of training rounds, and number of layers for fine-tuning the model. Then, the script starts the training process and performs tasks according to the set number of training rounds. The model will learn the rules and patterns from the training data set and generate an output parameter file. Step H: During the training task, the training task log is continuously written, and the server checks the execution data of the log in real time to monitor whether the training task is completed. If not, continue to check the log; if the execution is completed and successful, save the training result and return the result to the training server; if the execution is completed and failed, return the result to the training server; Step I: After the training is completed, the generated model parameter file needs to be uploaded to the specified location of the object storage for storage. A parameter file is generated for each round of training. The number of files uploaded corresponds to the number of training rounds. Step J: After uploading the model, clear the historical data left over from the training task; Step K: Release the server.

2. A generative large model training method for software engineering according to claim 1, characterized in that: In step A, the steps of training the server are as follows: Step 1: First, the business personnel start to create a training task, input data, training configuration, training server and training script parameters. Data configuration includes: selecting the data set and data difference ratio; training configuration includes: whether to perform incremental training, selecting the basic model, model version and training method; training server includes: automatic allocation and manual selection of servers; training script parameters include: training data set development language, training accuracy, maximum context length, number of training rounds and number of layers of fine-tuning model; after the service customizes the task information, the training task is created; Step 2: Create the completed task and put it into the queue of pending tasks. The pending tasks are arranged according to the creation time. The Agent server obtains the pending tasks from the head of the queue for training. Step 3: The Agent service trains the task according to the steps. After each step is completed, the execution result is sent to the training server, and the Agent service will continue to execute the next step. Step 4: When the training server receives the task execution result information, it first determines whether the current task has just completed the training script step. If so, the business personnel choose whether to continue multiple rounds of training; if not, the database records the task execution status information; Step 5: The business personnel choose whether to conduct multiple rounds of training. If they choose yes, the training task status is set to pending and enters the pending task queue for a new round of training. If they choose no, after receiving the instruction, the Agent performs a series of operations after the task is completed.

Citation Information

Patent Citations

  • Parameter communication optimization method for distributed machine learning

    CN111027708A

  • Task management scheduling method for distributed multi-cloud management platform

    CN115617493A