Military field large model distributed training method under low computing power condition

Through distributed training methods in the military field, using open source large model base and cloud platform, the cost and security problems of large model training for military units under low computing power are solved, efficient and intelligent knowledge services are realized, and hardware requirements are reduced And enhance data security.

CN119150927APending Publication Date: 2024-12-17NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411077261.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In the military field, traditional large-scale centralized training methods are difficult to effectively implement due to high costs, data security issues and data processing difficulties, especially under low computing power conditions.

Method used

The distributed training method of military field big model under low computing power conditions is adopted. By obtaining the open source big model base, it is deployed on the cloud server. Each military unit downloads and installs the corresponding training and fine-tuning platform, selects the parameter quantity according to its own computing power, and performs Local data annotation conversion and model fine-tuning. After training, the model parameter weight is returned to the cloud server and integrated into a full large-scale model parameters to provide efficient and intelligent knowledge services.

Benefits of technology

It reduces the hardware requirements for large-scale model training, enhances the control and security of military data, improves the pertinence of data processing, and provides theoretical and practical reference for the implementation of large-scale models in the military field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150927A_ABST
    Figure CN119150927A_ABST
Patent Text Reader

Abstract

The invention discloses a method for distributed training of a large model in the military field under a low computing power condition. The method comprises the following steps: acquiring an open-source large model base; deploying a training and fine tuning platform of the large model on the cloud server; each military unit downloads and installs a corresponding large model training and fine tuning platform from the cloud server, and selects large model bases with different parameters according to own unit computing power; each military unit carries out labeling conversion on local data according to a data format required by fine tuning of the large model, carries out offline training and model fine tuning on the military data in a local database, and completes labeling of a corresponding relationship with the base large model; the cloud server re-integrates and draws full-amount large model parameters; and issuing the integrated full-amount large model according to permission approval, and providing knowledge service for each military unit. According to the method, the large model training hardware requirement can be reduced, the military data management and control security is enhanced, the military data processing pertinence is improved, and theoretical and practical references are provided for accelerating large model landing application in the military field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of model training technology, and in particular to a method for distributed training of large models in the military field under low computing power conditions. Background Art

[0002] The traditional centralized training method for large models mainly integrates and preprocesses the collected multi-source heterogeneous training data, uniformly constructs a training data set in a format similar to "prompt word + answer", and then inputs it into the large model training framework based on the Transformer architecture. By repeatedly fine-tuning the model parameters to minimize the objective function, the effect of "predicting the best output based on new input data" is achieved.

[0003] However, this centralized training method may not be effective in the implementation process of military units. The main reasons include but are not limited to the following three aspects:

[0004] First, the training conditions are high in cost. Centralized training requires the construction of a complete large-model training software and hardware environment, and a basic hardware environment that meets the requirements of open source large-model training costs hundreds of thousands or even millions of yuan for GPU graphics cards alone. Since large-model technology is still a "niche technology" in most military units, it will not affect the work of the center if it is not used, but it will cost a huge amount of money if it is used. Therefore, most military units currently do not have the conditions for centralized training.

[0005] The second is data security. At present, the problem of local computing power can be effectively solved through the cloud service model for civilian large-scale model training. Ordinary users only need to upload training data through the Internet to use the powerful cloud computing power of enterprises and research institutions to train their own exclusive models. In the military field, since each unit needs to train some sensitive internal data, it is impossible to upload it directly to the Internet for training. Even if the data is uploaded to the cloud service provided by the military intranet for training, there are still data security issues.

[0006] The third aspect is data processing. Although a few military research institutes and technology-intensive units have built training environments through hard work, when these units handle training requests from different military units, if they choose centralized training, they need to invest a lot of manpower and computing power to solve practical problems such as the heterogeneity of training data from different units and the difficulty of intercommunication. Summary of the invention

[0007] In view of the above problems, the present invention is proposed to provide a method for distributed training of large models in the military field under low computing power conditions to overcome the above problems or at least partially solve the above problems.

[0008] In order to solve the above technical problems, the embodiments of the present application disclose the following technical solutions:

[0009] In a first aspect, an embodiment of the present invention discloses a method for distributed training of a large military model under low computing power conditions, including:

[0010] S100. Obtain an open source large model base, and copy the open source large model base offline to the military internal network cloud server;

[0011] S200. Deploy a large model training and fine-tuning platform on a cloud server and package it in software;

[0012] S300. Each military unit downloads and installs the corresponding large model training and fine-tuning platform from the cloud server, and selects a large model base with different parameter amounts according to its own unit computing power;

[0013] S400. Each military unit annotates and converts the local data according to the data format required for fine-tuning the large model, and performs offline training and model fine-tuning on the military data in the local database based on the selected large model base. After the training is completed, the model fine-tuning parameter weights are independently packaged, and the corresponding relationship with the base large model is annotated and transmitted back to the cloud server of the military internal network;

[0014] S500. The cloud server re-integrates and proposes full model parameters according to the model parameter weights returned by each unit;

[0015] S600. After receiving applications from various military units, the cloud server will issue the integrated full-scale model according to authority approval to provide efficient and intelligent knowledge services to various military units.

[0016] Further, in S100, an open source large model base is obtained, and the specific method includes: selecting domestic open source large model bases in multiple general fields from open source websites, and the parameter quantity of the large model base is set to 10-100B level.

[0017] Furthermore, the open source large model base includes at least GLM4-9B, ChatGLM3-6B, Qwen2-72B, Qwen2-1.5B, Baichuan13B-base and Baichuan13B-chat.

[0018] Furthermore, in S200, the large model training and fine-tuning platform LlaMa-Factory is used. The large model training and fine-tuning platform can perform large model fine-tuning work without code throughout the process, can support the training of mainstream open source large models on huggingface, and supports Freezing-tuning, GaLoRA, LoRA, DoRA and other efficient training methods in fine-tuning training strategies; the large model library includes Chat GL M3-6B, GLM4-9B, Qwen2-1.5B, Qwen2-72B, Baichuan13B-chat, and Baichuan13B-base large model bases.

[0019] Furthermore, in S300, each military unit downloads and installs the corresponding large model training and fine-tuning platform from the cloud server, and selects a large model base with different parameter quantities according to its own unit computing power. The specific method includes: each military unit sends a download request to the cloud server according to its own needs, and the cloud server recommends a large model base with corresponding parameter quantities and operating configuration according to the computing conditions of each military unit. Then, each military unit will download the large model training and fine-tuning platform and the model weights of the base from the cloud to the local.

[0020] Furthermore, in S400, each military unit annotates and converts local data according to the data format required for large model fine-tuning, and based on the selected large model base, performs offline training and model fine-tuning on the military data in the local database. After the training is completed, the model fine-tuning parameter weights are independently packaged, and the corresponding relationship with the base large model is annotated and transmitted back to the cloud server of the military's internal network; the specific method includes: obtaining local structured, semi-structured, and unstructured data of each military unit, the data including high-quality data in the fields of network security and communication operation and maintenance, the data is annotated to obtain a fine-tuning data set, and the LoRA strategy is used on the large model training and fine-tuning platform LlaMa-Factory based on the ChatGLM3-6B base for efficient training and fine-tuning, and finally the weight parameters of LoRA are obtained, and the weight parameters are packaged and transmitted back to the cloud server. In this process, the confidential data of each military unit is stored locally from beginning to end.

[0021] Furthermore, the LoRA strategy is used to perform efficient training and fine-tuning based on the ChatGLM3-6B base on the large model training and fine-tuning platform LlaMa-Factory, and finally the weight parameters of LoRA are obtained. The specific methods include:

[0022] Prepare training data; prepare high-quality json format training data, which should contain user input and expected model output; preprocess the data to ensure that it meets the requirements of LlaMa-Factory and ChatGLM3-6B;

[0023] Set up fine-tuning tasks on LlaMa-Factory; Create fine-tuning tasks, create a new fine-tuning task on the LlaMa-Factory platform, and select ChatGLM3-6B as the base model; Configure task parameters, including learning rate, number of training rounds, and batch size; Configure LoRA strategy; Enable LoRA strategy in fine-tuning tasks; LoRA implements fine-tuning by introducing two low-rank matrices in each transformer layer of the model, which are multiplied with the original attention matrix or feedforward network weight matrix to introduce new trainable parameters; Set LoRA-related hyperparameters, including the rank of the low-rank matrix; Upload training data; Upload the prepared training data to the LlaMa-Factory platform and ensure that the data format is correct;

[0024] Perform fine-tuning training; start training and start the fine-tuning training task on the LlaMa-Factory platform. Monitor the training process, including changes in the loss function and accuracy indicators; adjust parameters, and adjust the learning rate and batch size parameters in a timely manner according to the feedback during the training process to optimize the training effect;

[0025] Get LoRA weight parameters; training is completed, when the training reaches the preset stop condition, the training task will stop automatically; export LoRA weights, export the trained LoRA weight parameters on the LlaMa-Factory platform. These weight parameters will be used as the model improvement part after fine-tuning for subsequent model deployment and reasoning.

[0026] Furthermore, in S500, the cloud server reintegrates and proposes full-scale large model parameters according to the model parameter weights sent back by each unit. The specific method includes: classifying each military unit into at least army units, navy units, air force units, space force units and cyber force units; generating army domain models, navy domain models, air force domain models, space force domain models and cyber force domain models according to the classified units, mounting the army domain models, navy domain models, air force domain models, space force domain models and cyber force domain models through the open source large model base, and integrating and proposing full-scale large model parameters.

[0027] In a second aspect, an embodiment of the present invention discloses an electronic device, including:

[0028] one or more processors;

[0029] A memory for storing one or more programs;

[0030] When the one or more programs are executed by the one or more processors, the one or more processors implement the distributed training method.

[0031] The beneficial effects of the above technical solution provided by the embodiment of the present invention include at least:

[0032] The present invention discloses a method for distributed training of large models in the military field under low computing power conditions, comprising: S100. Obtaining an open source large model base, and copying the open source large model base offline to a cloud server in the military internal network; S200. Deploying a large model training and fine-tuning platform on the cloud server, and performing software packaging; S300. Each military unit downloads and installs a corresponding large model training and fine-tuning platform from the cloud server, and selects a large model base with different parameter amounts according to its own unit computing power; S400. Each military unit annotates and converts local data according to the data format required for large model fine-tuning, and performs offline training and model fine-tuning on the military data in the local database based on the selected large model base. After the training is completed, the model fine-tuning parameter weights are independently packaged, and the corresponding relationship with the base large model is annotated and returned to the cloud server in the military internal network; S500. The cloud server reintegrates and proposes full large model parameters according to the model parameter weights returned by each unit; S600. After application by each military unit, the integrated full large model is issued according to authority approval to provide efficient and intelligent knowledge services for each military unit. The present invention can reduce the hardware requirements for large-scale model training, enhance the security of military data management and control, and improve the pertinence of military data processing, providing theoretical and practical references for accelerating the application of large models in the military field.

[0033] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0035] Figure 1 This is a flow chart of a method for distributed training of large military models under low computing power conditions in Example 1 of the present invention;

[0036] Figure 2 This is a schematic diagram of the structure of an electronic device in Embodiment 2 of the present invention. DETAILED DESCRIPTION

[0037] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0038] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a method for distributed training of large models in the military field under low computing power conditions.

[0039] Example 1

[0040] The present invention discloses a method for distributed training of large military models under low computing power conditions, such as Figure 1 ,include:

[0041] S100. Obtain an open source large model base, and copy the open source large model base offline to the cloud server of the military internal network; in S100 of this embodiment, the open source large model base is obtained, and the specific method includes: selecting a plurality of domestic open source large model bases in general fields from an open source website, and the large model base parameter quantity is set to 10-100B level. The open source large model base includes at least GLM4-9B, ChatGLM3-6B, Qwen2-72B, Qwen2-1.5B, Baichuan13B-base and Baichuan13B-chat.

[0042] Specifically, we selected a number of domestic open source large model bases in general fields from Internet websites such as huggingface and GitHub, and set the parameter volume to around 10-100B. Experiments have shown that the knowledge reasoning ability of open source large models at this parameter volume level in general fields has roughly reached the level that meets the needs of simple human problems, such as GLM4-9B and ChatGLM3-6B developed by the Tsinghua team, Qwen2-72B and Qwen2-1.5B developed by the Alibaba team, and Baichuan13B-base and Baichuan13B-chat developed by the Sogou team. Then we copied the selected open source large model bases offline to the cloud server on the military's internal network.

[0043] S200. Deploy a large model training and fine-tuning platform on a cloud server and package it in software form; in S200 of this embodiment, the large model training and fine-tuning platform LlaMa-Factory is used. The large model training and fine-tuning platform can perform large model fine-tuning work without code throughout the process, can support the training of mainstream open source large models on huggingface, and support Freezing-tuning, GaLoRA, LoRA, DoRA and other efficient training methods in fine-tuning training strategies; the large model library includes Chat GL M3-6B, GLM4-9B, Qwen2-1.5B, Qwen2-72B, Baichuan13B-chat, and Baichuan13B-base large model bases.

[0044] Specifically, the training / fine-tuning platform of the large model is deployed on the cloud server and packaged as software to achieve immediate use. For example, the open source large model training / fine-tuning platform LlaMa-Factory developed by the Beihang research team can perform large model fine-tuning work without code throughout the process, greatly improving the training efficiency of large models. At the same time, it can support the training of most mainstream open source large models on huggingface, and supports Freezing-tuning, GaLoRA, LoRA, DoRA and other efficient training methods in fine-tuning training strategies; and includes Chat GL M3-6B, GLM4-9B, Qwen2-1.5B, Qwen2-72B, Baichuan13B-chat, Baichuan13B-base and other large model bases in the large model library.

[0045] S300. Each military unit downloads and installs the corresponding large model training and fine-tuning platform from the cloud server, and selects a large model base with different parameter values ​​according to the computing power of its own unit; in S300 of this embodiment, each military unit downloads and installs the corresponding large model training and fine-tuning platform from the cloud server, and selects a large model base with different parameter values ​​according to the computing power of its own unit. The specific method includes: each military unit sends a download request to the cloud server according to its own needs, and the cloud server recommends a large model base with corresponding parameter values ​​and operating configuration according to the computing conditions of each military unit, and then each military unit will download the large model training and fine-tuning platform and the model weights of the base from the cloud to the local.

[0046] Specifically, each military unit downloads and installs the corresponding large model training / fine-tuning platform from the cloud server, and selects a large model base with different parameter amounts according to the computing power of its own unit. For example, for military unit A, its computing power condition is 1 GPU graphics card (video memory 16G), and the cloud server will recommend the large model base ChatGLM3-6B with corresponding parameter amounts and running configuration according to A's computing conditions, and then A will download the model weights of the large model training / fine-tuning platform LlaMa-Factory and the base ChatGLM3-6B from the cloud to the local.

[0047] S400. Each military unit annotates and converts the local data according to the data format required for fine-tuning the large model, and performs offline training and model fine-tuning on the military data in the local database based on the selected large model base. After the training is completed, the model fine-tuning parameter weights are independently packaged, and the corresponding relationship with the base large model is annotated and transmitted back to the cloud server of the military internal network;

[0048] In S400 of the present embodiment, each military unit annotates and converts the local data according to the data format required for fine-tuning the large model, and performs offline training and model fine-tuning on the military data in the local database based on the selected large model base. After the training is completed, the model fine-tuning parameter weights are independently packaged, and the corresponding relationship with the base large model is annotated and transmitted back to the cloud server of the military's internal network; the specific method includes: obtaining local structured, semi-structured, and unstructured data of each military unit, the data including high-quality data in the fields of network security and communication operation and maintenance, the data is annotated to obtain a fine-tuning data set, and the LoRA strategy is used on the large model training and fine-tuning platform LlaMa-Factory based on the ChatGLM3-6B base to perform efficient training and fine-tuning, and finally obtain the weight parameters of LoRA, and the weight parameters are packaged and transmitted back to the cloud server. In this process, the confidential data of each military unit is stored locally from beginning to end.

[0049] Specifically, each military unit will annotate and convert the local structured, semi-structured, and unstructured data according to the data format required for fine-tuning the large model. Based on the selected large model base, the military data in the local database will be trained offline and the model will be fine-tuned. Freezing-tuning, GaLoRA, LoRA, DoRA and other efficient training methods can be selected. After the training is completed, the model fine-tuning parameter weights will be independently packaged, and the corresponding relationship with the base large model will be marked and transmitted back to the cloud server of the military internal network. For example, for military unit A, its local area mainly includes high-quality data in the fields of network security and communication operation and maintenance. After annotation, the fine-tuning data set is obtained. On the large model training / fine-tuning platform LlaMa-Factory, the LoRA strategy is used for efficient training and fine-tuning based on the ChatGLM3-6B base, and finally the weight parameters of LoRA are obtained. After the weight parameters are packaged and processed, they are transmitted back to the cloud server. In this process, the confidential data of unit A is stored locally from beginning to end, thus avoiding security issues such as the leakage of confidential data.

[0050] Low-Rank Adaptation (LORA). JH et al. from the Microsoft research team believe that over-parameterized pre-trained models that undergo fine-tuning training tend to stay at a lower intrinsic dimension. Based on this idea, they further proposed Low-Rank Adaptation, a training strategy for low-rank adaptation. In principle, this fine-tuning strategy freezes the original parameters of the pre-trained model and does not receive gradient updates. Then, the trainable rank decomposition matrix is ​​injected into each layer of the Transformer architecture, which can greatly reduce the number of trainable parameters for downstream tasks. Assuming that the original weight matrix of the pre-trained model is W0, the process of low-rank decomposition can be expressed as

[0051] W0+△W=W0+BA

[0052]

[0053] During fine-tuning training, W0 is frozen and only the parameters in A and B are updated. Therefore, for h = W0x, the forward propagation process is

[0054] h=W0x+△Wx=W0x+BAx

[0055] Specifically, the LoRA strategy is used to perform efficient training and fine-tuning based on the ChatGLM3-6B base on the large model training and fine-tuning platform LlaMa-Factory, and finally the weight parameters of LoRA are obtained. The specific methods include:

[0056] Prepare training data; prepare high-quality json format training data, which should contain user input and expected model output; preprocess the data to ensure that it meets the requirements of LlaMa-Factory and ChatGLM3-6B;

[0057] Set up fine-tuning tasks on LlaMa-Factory; Create fine-tuning tasks, create a new fine-tuning task on the LlaMa-Factory platform, and select ChatGLM3-6B as the base model; Configure task parameters, including learning rate, number of training rounds, and batch size; Configure LoRA strategy; Enable LoRA strategy in fine-tuning tasks; LoRA implements fine-tuning by introducing two low-rank matrices in each transformer layer of the model, which are multiplied with the original attention matrix or feedforward network weight matrix to introduce new trainable parameters; Set LoRA-related hyperparameters, including the rank of the low-rank matrix; Upload training data; Upload the prepared training data to the LlaMa-Factory platform and ensure that the data format is correct;

[0058] Perform fine-tuning training; start training and start the fine-tuning training task on the LlaMa-Factory platform. Monitor the training process, including changes in the loss function and accuracy indicators; adjust parameters, and adjust the learning rate and batch size parameters in a timely manner according to the feedback during the training process to optimize the training effect;

[0059] Get LoRA weight parameters; training is completed, when the training reaches the preset stop condition, the training task will stop automatically; export LoRA weights, export the trained LoRA weight parameters on the LlaMa-Factory platform. These weight parameters will be used as the model improvement part after fine-tuning for subsequent model deployment and reasoning.

[0060] S500. The cloud server reintegrates and proposes full-scale large model parameters based on the model parameter weights returned by each unit; in S500 of the present embodiment, the cloud server reintegrates and proposes full-scale large model parameters based on the model parameter weights returned by each unit. The specific method includes: classifying each military unit into at least army units, navy units, air force units, space force units and cyber force units; generating army domain models, navy domain models, air force domain models, space force domain models and cyber force domain models according to the classified units, mounting the army domain models, navy domain models, air force domain models, space force domain models and cyber force domain models through the open source large model base, and integrating and proposing full-scale large model parameters.

[0061] S600. After receiving applications from various military units, the cloud server will issue the integrated full-scale model according to authority approval to provide efficient and intelligent knowledge services to various military units.

[0062] The present embodiment discloses a method for distributed training of large models in the military field under low computing power conditions, including: S100. Obtain an open source large model base, and copy the open source large model base offline to a cloud server in the military internal network; S200. Deploy a large model training and fine-tuning platform on the cloud server, and perform software packaging; S300. Each military unit downloads and installs the corresponding large model training and fine-tuning platform from the cloud server, and selects a large model base with different parameter amounts according to its own unit computing power. S400. Each military unit annotates and converts local data according to the data format required for large model fine-tuning, and performs offline training and model fine-tuning on the military data in the local database based on the selected large model base. After the training is completed, the model fine-tuning parameter weights are independently packaged, and the corresponding relationship with the base large model is annotated and sent back to the cloud server in the military internal network; S500. The cloud server reintegrates and proposes full large model parameters based on the model parameter weights returned by each unit; S600. After application by each military unit, the integrated full large model is issued according to authority approval to provide efficient and intelligent knowledge services for each military unit. The present invention can reduce the hardware requirements for large-scale model training, enhance the security of military data management and control, and improve the pertinence of military data processing, providing theoretical and practical references for accelerating the application of large models in the military field.

[0063] Example 2

[0064] Based on the same inventive concept, an embodiment of the present disclosure also provides an electronic device. Figure 2 FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Figure 2 As shown, an embodiment of the present disclosure provides an electronic device including: one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement any optimization method in the above embodiments; the one or more I / O interfaces 103 are connected between the processor and the memory, and are configured to implement information interaction between the processor and the memory.

[0065] Among them, the processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus), etc.

[0066] In some embodiments, the processor 101 , the memory 102 , and the I / O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.

[0067] In some embodiments, the one or more processors 101 include a field programmable gate array.

[0068] According to an embodiment of the present disclosure, a computer-readable medium is further provided, wherein a computer program is stored on the computer-readable medium, wherein when the program is executed by a processor, the steps in any optimization method in the above-mentioned embodiment are implemented.

[0069] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of protection of the present disclosure. The attached method claims present the elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.

[0070] In the above detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the invention is in a state of having less than all the features of the disclosed individual embodiments. Therefore, the appended claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.

[0071] Those skilled in the art will also appreciate that the various illustrative logic blocks, modules, circuits, and algorithmic steps described in conjunction with the embodiments herein can all be implemented as electronic hardware, computer software, or a combination thereof. In order to clearly illustrate the interchangeability between hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above around their functions. Whether such functions are implemented as hardware or software depends on specific applications and the design constraints imposed on the entire system. A skilled person can implement the described functions in an alternative manner for each specific application, but such implementation decisions should not be interpreted as departing from the scope of protection of the present disclosure.

[0072] The steps of the method or algorithm described in conjunction with the embodiments herein may be directly embodied as hardware, a software module executed by a processor, or a combination thereof. The software module may be located in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a mobile disk, a CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium may also be an integral part of the processor. The processor and the storage medium may be located in an ASIC. The ASIC may be located in a user terminal. Of course, the processor and the storage medium may also be present in a user terminal as discrete components.

[0073] For software implementation, the techniques described in this application can be implemented with modules (e.g., procedures, functions, etc.) that perform the functions described in this application. These software codes can be stored in a memory unit and executed by a processor. The memory unit can be implemented within the processor or outside the processor. In the latter case, it is coupled to the processor in a communication manner via various means, which are well known in the art.

[0074] The above description includes examples of one or more embodiments. Of course, it is impossible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it should be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is covered in a manner similar to the term "including", just as "including," is explained as a transitional word in the claims. In addition, any term "or" used in the specification of the claims is intended to mean "non-exclusive or".

Claims

1. A method for distributed training of large military models under low computing power conditions. It is characterized in that include: S100. Obtain an open source large model base, and copy the open source large model base offline to the military internal network cloud server; S200. Deploy a large model training and fine-tuning platform on a cloud server and package it in software; S300. Each military unit downloads and installs the corresponding large model training and fine-tuning platform from the cloud server, and selects a large model base with different parameter values ​​according to the computing power of its own unit; S400. Each military unit annotates and converts the local data according to the data format required for fine-tuning the large model, and performs offline training and model fine-tuning on the military data in the local database based on the selected large model base. After the training is completed, the model fine-tuning parameter weights are independently packaged, and the corresponding relationship with the base large model is annotated and transmitted back to the cloud server of the military internal network; S500. The cloud server re-integrates and proposes full model parameters according to the model parameter weights returned by each unit; S600. After receiving applications from various military units, the cloud server will issue the integrated full-scale model according to authority approval to provide efficient and intelligent knowledge services to various military units.

2. A method for distributed training of large military models under low computing power conditions as described in claim 1, It is characterized in that In S100, an open source large model base is obtained, and the specific method includes: selecting domestic open source large model bases in multiple general fields from open source websites, and the parameter quantity of the large model base is set to 10-100B level.

3. A method for distributed training of large military models under low computing power conditions as described in claim 2, It is characterized in that The open source large model base includes at least GLM4-9B, ChatGLM3-6B, Qwen2-72B, Qwen2-1.5B, Baichuan13B-base and Baichuan13B-chat.

4. A method for distributed training of large military models under low computing power conditions as claimed in claim 1, It is characterized in that In S200, the large model training and fine-tuning platform LlaMa-Factory is used. The large model training and fine-tuning platform can perform large model fine-tuning work without code throughout the process, can support the training of mainstream open source large models on huggingface, and supports Freezing-tuning, GaLoRA, LoRA, DoRA and other efficient training methods in fine-tuning training strategies; the large model library includes Chat GL M3-6B, GLM4-9B, Qwen2-1.5B, Qwen2-72B, Baichuan13B-chat, and Baichuan13B-base large model bases.

5. A method for distributed training of large military models under low computing power conditions as claimed in claim 1, It is characterized in that In S300, each military unit downloads and installs the corresponding large model training and fine-tuning platform from the cloud server, and selects a large model base with different parameter quantities according to its own unit computing power. The specific method includes: each military unit sends a download request to the cloud server according to its own needs, and the cloud server recommends a large model base with corresponding parameter quantities and operating configuration according to the computing conditions of each military unit. Then, each military unit will download the large model training and fine-tuning platform and the model weights of the base from the cloud to the local.

6. A method for distributed training of large military models under low computing power conditions as claimed in claim 1, It is characterized in that In S400, each military unit annotates and converts the local data according to the data format required for fine-tuning the large model. Based on the selected large model base, the military data in the local database is trained offline and the model is fine-tuned. After the training is completed, the model fine-tuning parameter weights are independently packaged, and the corresponding relationship with the base large model is annotated and transmitted back to the cloud server of the military internal network. The specific method includes: obtaining local structured, semi-structured, and unstructured data of each military unit, the data including high-quality data in the fields of network security and communication operation and maintenance, the data being labeled to obtain a fine-tuning data set, and using the LoRA strategy on the large model training and fine-tuning platform LlaMa-Factory based on the ChatGLM3-6B base to perform efficient training and fine-tuning, and finally obtaining the weight parameters of LoRA, packaging the weight parameters and then transmitting them back to the cloud server. During this process, the confidential data of each military unit is stored locally from beginning to end.

7. A method for distributed training of large military models under low computing power conditions as described in claim 6, It is characterized in that On the large model training and fine-tuning platform LlaMa-Factory, the LoRA strategy is used for efficient training and fine-tuning based on the ChatGLM3-6B base, and finally the weight parameters of LoRA are obtained. The specific methods include: Prepare training data; prepare high-quality json format training data, which should contain user input and expected model output; preprocess the data to ensure that it meets the requirements of LlaMa-Factory and ChatGLM3-6B; Set up fine-tuning tasks on LlaMa-Factory; Create fine-tuning tasks, create a new fine-tuning task on the LlaMa-Factory platform, and select ChatGLM3-6B as the base model; Configure task parameters, including learning rate, number of training rounds, and batch size; Configure LoRA strategy; Enable LoRA strategy in fine-tuning tasks; LoRA implements fine-tuning by introducing two low-rank matrices in each transformer layer of the model, which are multiplied with the original attention matrix or feedforward network weight matrix to introduce new trainable parameters; Set LoRA-related hyperparameters, including the rank of the low-rank matrix; Upload training data; Upload the prepared training data to the LlaMa-Factory platform and ensure that the data format is correct; Perform fine-tuning training; start training and start the fine-tuning training task on the LlaMa-Factory platform. Monitor the training process, including changes in the loss function and accuracy indicators; adjust parameters, and adjust the learning rate and batch size parameters in a timely manner according to the feedback during the training process to optimize the training effect; Get LoRA weight parameters; training is completed, when the training reaches the preset stop condition, the training task will stop automatically; export LoRA weights, export the trained LoRA weight parameters on the LlaMa-Factory platform. These weight parameters will be used as the model improvement part after fine-tuning for subsequent model deployment and reasoning.

8. A method for distributed training of large military models under low computing power conditions as claimed in claim 1, It is characterized in that In S500, the cloud server reintegrates and proposes full-scale large model parameters based on the model parameter weights sent back by each unit. The specific method includes: classifying each military unit into at least army units, navy units, air force units, space force units and cyber force units; generating army domain models, navy domain models, air force domain models, space force domain models and cyber force domain models according to the classified units, mounting the army domain models, navy domain models, air force domain models, space force domain models and cyber force domain models through the open source large model base, and integrating and proposing full-scale large model parameters.

9. An electronic device, It is characterized in that include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the distributed training method.