CN-122021892-A - Special large language model construction method based on parameter efficient fine adjustment
Abstract
The invention discloses a special large language model construction method based on efficient fine adjustment of parameters, which comprises the steps of collecting dispatching specification texts, analyzing conditions, actions and constraint elements, constructing a dispatching procedure topological structure, traversing the procedure topological structure, generating a procedure execution path, extracting topological path identification and hierarchy information, constructing a topology regulation memory, establishing a parameter memory slot position relation, analyzing dispatching task instructions, generating semantic energy values, regulating and controlling the activation and update amplitude of corresponding parameter slots, freezing main model parameters, only updating activated slots, executing parameter fine adjustment, constructing a special dispatching language model, accessing new procedure texts, executing hierarchy distillation and playback operation, and maintaining dispatching logic consistency by the updated model. The invention realizes long-term consistency, controllable updating and stable reasoning of the proprietary large language model in the power dispatching standardization business scene by introducing the parameter high-efficiency fine tuning mechanism perceived by the dispatching regulation topological structure.
Inventors
- LIU FENG
- WANG XIAOYU
- GAO LIYUAN
- DANG XUXIN
- HU TINGHAO
- LI HAIKE
- XU KUN
- WANG QUN
- ZHANG JIE
- MA SHIQIAN
- TANG PING
- WANG YU
- WANG TIANHAO
- HAO YI
- Shang Jingan
- PAN QI
- ZHOU YANGFAN
- REN XIAOJIU
- DUAN WEIRUN
- LI LINQI
- Tang Naixin
- JIANG LIYUAN
- GUO LINGXU
- WU WEI
- WAN LI
- LIANG CHENG
- MA GANG
- CHEN JIAN
- ZHANG XUEJIAO
- WANG CHEN
- HAO BOWEN
Assignees
- 国网天津市电力公司东丽供电分公司
- 国网天津市电力公司
- 国家电网有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260120
Claims (8)
- 1. The method for constructing the proprietary large language model based on the efficient fine adjustment of the parameters is characterized by comprising the following steps of: collecting a dispatching specification text related to power dispatching business, processing a dispatching specification Fan Wenben, and constructing a dispatching specification topological structure consisting of a condition node, an action node and a constraint node; based on a scheduling procedure topological structure, generating topological path identifiers corresponding to each procedure execution path one by one, and generating corresponding topological path identifiers and hierarchical sequence information for each procedure execution path; constructing a topology regulation memory, distributing corresponding parameter memory slots for each topology path identifier, and establishing a binding relation between parameter increment generated in the efficient fine adjustment process of parameters of the general large language model and the corresponding parameter memory slots; Introducing a semantic energy flow regulator, analyzing an input scheduling task instruction, generating a semantic energy value, distributing the semantic energy value to a parameter memory slot corresponding to the topological path identifier, and controlling the activation state and the parameter updating amplitude of the parameter memory slot; On the premise of keeping the main body parameters of the general large language model frozen, based on the parameter memory slot positions, the activation states and the parameter updating amplitude, performing parameter efficient fine tuning training on the parameter increment corresponding to the activated parameter memory slot positions only to obtain the scheduling knowledge special large language model; When the scheduling knowledge proprietary large language model is subjected to iterative updating or is accessed into a new scheduling specification text, based on a scheduling specification topological structure, a topological path identifier and a parameter memory slot, performing hierarchical distillation and topological coupling playback operation, and selectively playing back and aligning and updating the historical parameter memory slot to obtain the updated scheduling knowledge proprietary large language model.
- 2. The method for constructing the proprietary large language model based on the efficient fine adjustment of the parameters according to claim 1, wherein the dispatching specification text comprises a power dispatching standard file, a power dispatching specification file and a power dispatching emergency plan file.
- 3. The method for constructing a proprietary large language model based on efficient fine-tuning of parameters according to claim 1, wherein the processing the scheduling specification Fan Wenben to construct a scheduling procedure topology consisting of condition nodes, action nodes and constraint nodes comprises: Hierarchical analysis is carried out on the dispatching specification text, chapter structures, clause numbers and clause subordination relations in the dispatching specification text are identified, and hierarchical structure information of the dispatching specification text is generated. Extracting condition elements representing scheduling triggering conditions from each clause content based on the hierarchical structure information, and mapping the condition elements into condition nodes; Extracting action elements representing scheduling operation behaviors from each clause content, and mapping the action elements into action nodes; Extracting constraint elements representing scheduling restriction rules, execution sequences or forbidden relations from each clause content, and mapping the constraint elements into constraint nodes; Based on the hierarchical subordinate relations among clauses and the logical association relations among the condition elements, the action elements and the constraint elements, the directed connection relations among the condition nodes, the action nodes and the constraint nodes are constructed, and a scheduling procedure topological structure is formed.
- 4. The method for constructing a proprietary large language model based on efficient fine-tuning of parameters according to claim 1, wherein the generating the topology path identifier and the hierarchical sequence information for each procedure execution path comprises: based on a scheduling procedure topological structure, determining three types of nodes as conditional nodes, action nodes and constraint nodes, and establishing a directed relation between the nodes for representing a procedure execution relation from the condition to the constraint limitation of the action; orderly traversing from the condition node to the action node along the directional relation, enumerating rule execution paths which meet the starting condition to the target action and are limited by corresponding constraint nodes, and recording the node sequence, the node type sequence and the relation type sequence of each rule execution path; Generating topology path identifiers corresponding to the rule execution paths one by one according to each rule execution path, wherein the topology path identifiers are obtained by combining node identifier sequences and relation type sequences of the rule execution paths according to fixed rules and performing fixed-length encoding; Determining the hierarchy of each node in a procedure execution path according to the chapter, clause and sub-clause hierarchy in the dispatching specification text, forming hierarchy sequence information consistent with the sequence of the path nodes, and synchronously recording the precedence constraint determined by the hierarchy relation; And establishing a bidirectional index between the topological path identifier and the procedure execution path, completing the duplication removal, the uniqueness verification and the number management of all the procedure execution paths, and outputting a topological path identifier set and corresponding hierarchical sequence information.
- 5. The method for constructing the proprietary large language model based on the efficient fine tuning of the parameters according to claim 1, wherein the step of establishing the binding relation between the parameter increment generated by the universal large language model in the efficient fine tuning process of the parameters and the corresponding parameter memory slot position comprises the following steps: Initializing a data structure of a topology regulation memory based on a topology path identification set and hierarchical sequence information, wherein the topology regulation memory comprises a parameter memory slot position area, a slot position index area, a topology adjacent area and a version evolution area; In the parameter memory slot zone, creating a unique parameter memory slot record for each topology path identifier, wherein the parameter memory slot record comprises a slot identifier, a bound topology path identifier, a hierarchical sequence information reference, a slot state identifier, a slot version identifier and a parameter increment storage zone, and dividing the parameter increment storage zone into a writing zone and a freezing zone; In the slot index area, a forward index table from the topology path identification to the parameter memory slot and a reverse index table from the parameter memory slot to the topology path identification are constructed, and uniqueness verification is carried out on all indexes, so that each topology path identification corresponds to only one parameter memory slot and each parameter memory slot corresponds to only one topology path identification; In the topology adjacent area, based on a scheduling procedure topology structure, determining an adjacent relation among all topology path identifiers, generating a topology path adjacent table, writing an adjacent reference field associated with a corresponding parameter memory slot, and establishing a retrievable adjacent reference chain among the parameter memory slots corresponding to adjacent topology path identifiers; And in the version evolution region, establishing a version chain record for each parameter memory slot, firstly solidifying the parameter increment of the writing region into a new version and writing the new version chain record when writing the parameter increment, then transferring the parameter increment of the previous version into the freezing region and updating the state identifier of the corresponding slot into a playable state, and completing the construction of the topology regulation memory.
- 6. The method for constructing the proprietary large language model based on the efficient fine tuning of the parameters according to claim 1, wherein the generating the semantic energy value and distributing the semantic energy value to the parameter memory slot corresponding to the topology path identifier, controlling the activation state and the parameter update amplitude of the parameter memory slot, comprises: The method comprises the steps of constructing a semantic energy flow regulator, wherein the semantic energy flow regulator consists of an instruction element extraction unit, a topology energy flow distribution unit and a slot control unit, and the semantic energy flow regulator is associated with a topology path identification set and a parameter memory slot; Receiving a dispatching task instruction, carrying out structural splitting on the dispatching task instruction by utilizing an instruction element extraction unit to obtain a task category element, an emergency degree element and an instruction keyword set, and carrying out matching search on the instruction keyword set based on a topology path identification set to obtain a target topology path identification set; generating a semantic energy value based on the task category element, the emergency degree element and the scale of the instruction keyword set by using the instruction element extraction unit, and limiting the semantic energy value within the total energy constraint range of the semantic energy flow regulator to be used as the input of the current energy flow distribution; The method comprises the steps that a topological energy flow distribution unit is utilized to distribute semantic energy values to parameter memory slots corresponding to a target topological path identifier set, the distribution comprises the steps of determining the matching degree of path keyword sets according to rules related to instruction keyword sets and target topological path identifiers, distributing the semantic energy values to the slot distribution energy of each parameter memory slot according to the matching degree, and transmitting the slot distribution energy to adjacent parameter memory slots in a topological distance decreasing mode based on an adjacent reference chain to form adjacent energy flows of adjacent parameter memory slots; And generating slot control parameters for each parameter memory slot based on the slot allocation energy and the adjacent energy flow by using a slot control unit, wherein the slot control parameters comprise a slot activation state and a parameter update amplitude.
- 7. The method for constructing the proprietary large language model based on the efficient fine tuning of the parameters according to claim 1, wherein the obtained scheduling knowledge proprietary large language model comprises: acquiring main parameters of a general large language model, setting the main parameters into a frozen state, reading parameter increment stored in a parameter memory slot, reading a slot activation state and a parameter update amplitude, and forming a trainable parameter range of the high-efficiency fine tuning training of the parameter; constructing a training sample set based on a dispatching specification text, associating a target topology path identifier for each training sample, and mapping the target topology path identifier into a target parameter memory slot position by utilizing the corresponding relation between the topology path identifier and a procedure execution path so as to enable the training sample and the parameter memory slot position to establish a corresponding relation; For each training sample, calling a parameter increment corresponding to a target parameter memory slot, generating a combined parameter according to the activation state of the slot and the parameter updating amplitude, and enabling the combined parameter to be formed by superposing a frozen main body parameter and an activated parameter increment, wherein the parameter increment corresponding to an unactivated parameter memory slot does not participate in the generation of the combined parameter; Performing forward calculation on the training samples based on the combined parameters to obtain model output results, and calculating training loss based on target output of the training samples and the model output results; and executing back propagation update on the training loss, only updating the parameter increment corresponding to the activated parameter memory slot and keeping the main body parameter of the general large language model not updated, writing the updated parameter increment back to the corresponding parameter memory slot and updating the slot version identification to obtain the scheduling knowledge proprietary large language model.
- 8. The method for constructing a proprietary large language model based on efficient fine-tuning of parameters according to claim 1, wherein the obtaining the updated scheduling knowledge proprietary large language model comprises: When the scheduling knowledge proprietary large language model is subjected to iterative updating or is accessed into a new scheduling specification text, carrying out hierarchical analysis on the newly added or changed scheduling specification text, extracting scheduling condition elements, scheduling action elements and constraint elements, carrying out incremental updating on a scheduling specification Cheng Tapu structure, and generating a rule execution path and a topology path identifier corresponding to the newly added or changed content; based on the topology path identification, retrieving a target parameter memory slot corresponding to the topology path identification from a topology regulation memory, and retrieving a history version record of the target parameter memory slot to form a history parameter memory slot set; constructing a model set required by hierarchical distillation, setting a scheduling knowledge proprietary large language model to be updated currently as a student model, setting a scheduling knowledge proprietary large language model of a previous iteration version as an upper-layer teacher model, and setting a general large language model as a basic teacher model; the topological coupling playback operation is executed, specifically: Based on a scheduling procedure topological structure, determining a topological adjacency relation and a topological distance between the topological path identifiers and each topological path identifier in the historical parameter memory slot position set; Generating a playback priority sequence according to the topological distance, and reading parameter increment and related samples from the historical parameter memory slot position set according to the playback priority sequence to form a playback sample set; the hierarchical distillation operation is performed, specifically: Respectively inputting a playback sample set and a sample set corresponding to the newly added or changed content into a basic teacher model, an upper teacher model and a student model to obtain corresponding output; Taking teacher model output as an alignment target of student model output, calculating sample-level distillation loss, and carrying out weighted updating on the distillation loss according to a playback priority sequence; On the premise of keeping the main body parameters of the general large language model frozen, only updating the parameter increment corresponding to the target parameter memory slot position and the history parameter memory slot position set, and writing the updated parameter increment back to the topology regulation memory to obtain the updated scheduling knowledge special large language model.
Description
Special large language model construction method based on parameter efficient fine adjustment Technical Field The invention relates to the technical field of large language models, in particular to a special large language model construction method based on efficient fine adjustment of parameters. Background With the development of artificial intelligence technology, a large language model based on deep learning is widely applied to the aspects of text understanding, knowledge question answering, decision assistance and the like. In highly normalized business scenes such as power dispatching and the like, a dispatching standard, a dispatching procedure and an emergency plan form an important basis for dispatching decisions, and related texts have the characteristics of clear clause and layer, strict logic constraint, clear causal relationship and the like. In the prior art, a general large language model is generally adopted to combine with industry text to carry out field adaptation training so as to improve the understanding capability of the model to professional semantics, wherein a common method comprises a full-parameter fine tuning or parameter high-efficiency fine tuning mode, so that the model has certain industry knowledge expression capability while the general language capability is maintained. However, the existing industry large language model based on efficient fine adjustment of parameters mostly treats the dispatching specification text as a common linear corpus, and lacks modeling capability of hierarchical relations and causal structures among internal conditions, actions and constraints of a dispatching procedure. In the training process, a static parameter mapping mode is generally adopted for the model, and newly-added industry knowledge is directly written into a fixed parameter subspace, so that structural differences among different rule execution paths cannot be distinguished. When the dispatching rules are updated or different dispatching tasks are frequently switched, the model parameter updating is easy to interfere with each other, and further the problems of forgetting professional knowledge, inconsistent reasoning results, confusion of understanding of new and old rules and the like occur, so that the requirements of the power dispatching business on consistency and reliability are difficult to meet. In the prior art, in the model iteration and continuous learning process, the mode of multi-reliance integral retraining or simple sample playback lacks a mechanism for selectively playing back and aligning parameters based on a scheduling procedure structure, so that the model training cost is increased, the parameter evolution process is difficult to effectively control, and uncontrollable changes of model reasoning behaviors are easily caused. Therefore, how to provide a proprietary large language model construction method based on efficient fine tuning of parameters is a problem that needs to be solved by those skilled in the art. Disclosure of Invention The invention aims to provide a special large language model construction method based on efficient fine adjustment of parameters, which combines the method of scheduling procedure topology modeling, parameter memory slot management and semantic energy flow regulation and hierarchical distillation, and performing low-cost controllable field adaptation training on the general large language model to realize structural modeling and continuous learning on complex hierarchical relationships and causal constraints in the power dispatching specification text. The method can effectively avoid the problems of forgetting professional knowledge and inconsistent reasoning in the process of updating the scheduling procedure and switching the tasks, has the advantages of traceability of parameter updating, controllable model evolution, high long-term operation stability and the like, and is suitable for power scheduling isonormative service scenes with higher requirements on consistency and reliability. According to the embodiment of the invention, a proprietary large language model construction method based on parameter efficient fine tuning comprises the following steps: collecting a dispatching specification text related to power dispatching business, processing a dispatching specification Fan Wenben, and constructing a dispatching specification topological structure consisting of a condition node, an action node and a constraint node; based on a scheduling procedure topological structure, generating topological path identifiers corresponding to each procedure execution path one by one, and generating corresponding topological path identifiers and hierarchical sequence information for each procedure execution path; constructing a topology regulation memory, distributing corresponding parameter memory slots for each topology path identifier, and establishing a binding relation between parameter increment generated in the efficient fine