Language model parallel reasoning method and system
By using technical means such as adaptive graph neural network and efficient asynchronous transmission protocol in parallel inference of language models, the problems of low data transmission delay and computing resource utilization in the existing technology are solved, and efficient and accurate language model inference effect is achieved.
Patent Information
- Application Number
- CN202411580652.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-11-07
AI Technical Summary
In the parallel inference of language models, the existing technology has problems such as data transmission delay, low computing resource utilization, unbalanced load, insufficient data dependency processing, fixed model division and large differences in operation time steps, which is difficult to meet the computing needs of large-scale language models.
Adaptive graph neural network (GNN), dynamic resource allocation, efficient asynchronous transmission protocol and advanced task scheduling algorithm are used to convert parallel computing results into graph representation data, efficient training and inference are carried out, data transmission and task scheduling are optimized, and resource utilization of computing nodes is improved.
By optimizing data transmission and task scheduling, the data transmission delay between computing nodes is significantly reduced, the overall computing efficiency is improved, and the efficient and accurate language model inference effect is achieved, resource idleness and computing bottlenecks are avoided, and the accuracy and inference efficiency of calculation results are enhanced.
Smart Images

Figure CN119089901B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a language model parallel reasoning method and system. Background Art
[0002] Parallel reasoning of language models is of great significance in the field of modern natural language processing (NLP). With the development of language models, the scale and complexity of models continue to increase, requiring more efficient computing and reasoning methods. Traditional serial reasoning methods can no longer meet the computing needs of large-scale language models, so parallel reasoning methods have emerged and become an important technical means to improve the performance of language models.
[0003] The prior art (Chinese invention patent, publication number: CN116991483B, title: A pipeline parallel method and device for language model calculation) uses a pipeline parallel method to divide the language model into multiple stages and assign them to different computing nodes, and execute the calculation process in parallel through multiple computing nodes. However, this method has the following defects:
[0004] Data transmission delay: Since data needs to be frequently transmitted between computing nodes, transmission delay is significant when processing large-scale data, resulting in low overall computing efficiency;
[0005] Low computing resource utilization: When computing nodes are waiting for other nodes to complete data processing, some nodes may be idle and resources cannot be fully utilized;
[0006] Unbalanced load: The amount of computation at each stage may be unbalanced, and some nodes may become bottlenecks, affecting the overall computing efficiency.
[0007] Inadequate handling of data dependencies: There may be dependencies between data groups, and ignoring these dependencies will lead to inaccurate calculation results;
[0008] Fixed model division: The model stage division is fixed, lacking flexibility and unable to be dynamically adjusted according to actual needs;
[0009] Operation time step difference: The time step difference between the reading operation and the generating operation is large, which makes it difficult to synchronize nodes. Summary of the invention
[0010] In view of the many problems existing in the above-mentioned prior art, the present invention provides a language model parallel reasoning method and system. The present invention utilizes an adaptive graph neural network (GNN), dynamic resource allocation, an efficient asynchronous transmission protocol and an advanced task scheduling algorithm to convert parallel computing result data into graph representation data for efficient training and reasoning. By optimizing data transmission and task scheduling, the resource utilization rate of computing nodes is improved, thereby achieving efficient and accurate language model reasoning effects.
[0011] A language model parallel reasoning method includes the following steps:
[0012] Obtaining language data to be processed and performing standardization processing to generate feature data;
[0013] Perform feature extraction and preliminary reasoning on the feature data on the edge computing node to generate preliminary reasoning result data;
[0014] Divide the preliminary inference result data into adaptive data groups, dynamically adjust the batch size and allocate computing resources according to the data complexity, use an efficient parallel computing framework to perform calculations, and generate parallel computing result data;
[0015] Convert the parallel computing result data into graph representation data, use the adaptive graph neural network for training and reasoning, and generate the final reasoning result;
[0016] The data transmission performance is optimized through efficient asynchronous transmission protocols and flow control mechanisms, and advanced task scheduling algorithms are applied to ensure the efficient operation of each computing node.
[0017] Preferably, the obtaining of the language data to be processed and performing standardization processing includes:
[0018] Perform word segmentation processing on the language data, divide the language data into independent words or phrases, and generate word segmentation data;
[0019] Remove stop words from the segmented data to generate purified data;
[0020] The purified data is subjected to stem extraction, the words are normalized into stem form, and stem data is generated; the stem data is converted into numerical features through a feature extraction algorithm to generate feature data.
[0021] Preferably, the feature extraction and preliminary reasoning of the feature data on the edge computing node includes:
[0022] Input the feature data into the edge computing node, process the feature data through the feature extraction algorithm, and generate preliminary feature data;
[0023] Inputting the preliminary feature data into the preliminary reasoning model for preliminary reasoning to generate preliminary reasoning result data;
[0024] Aggregate and clean the preliminary reasoning result data, remove redundant and abnormal data, and generate cleaned preliminary reasoning result data.
[0025] Preferably, dividing the preliminary reasoning result data into adaptive data groups comprises:
[0026] According to the characteristics and complexity of the preliminary reasoning result data, the complexity evaluation module is used to perform complexity evaluation on the preliminary reasoning result data to generate a complexity data group;
[0027] According to the evaluation results of the complexity data group, the size of each data group and the number of data fragments are dynamically adjusted to generate an adaptive data group.
[0028] Preferably, dynamically adjusting the batch size according to data complexity includes:
[0029] Calculate data complexity, specifically by calculating data complexity based on data processing time, data size, and resource usage;
[0030] The batch size of the adaptive data group is dynamically adjusted according to the calculated data complexity to achieve load balancing.
[0031] Preferably, the computing using an efficient parallel computing framework includes:
[0032] Input the adaptive data group into the parallel computing framework, allocate computing resources and perform parallel computing, and generate parallel computing result data;
[0033] A multi-level cache mechanism is introduced during the calculation process to temporarily store intermediate results, reduce data transmission delays, and improve calculation efficiency.
[0034] Preferably, converting the parallel computing result data into graph representation data comprises:
[0035] Convert the parallel computing result data into a graph structure, where nodes represent data entities and edges represent the relationships between entities, and generate a graph to represent the data;
[0036] Apply graph feature extraction algorithm to graph representation data, extract key features, and generate graph feature data;
[0037] Real-time monitoring of data flow dynamically updates the graph structure to ensure the timeliness of the data represented by the graph.
[0038] Preferably, the training and reasoning using an adaptive graph neural network includes:
[0039] Input graph feature data into the adaptive graph neural network model, dynamically adjust training parameters and model structure, perform model training, and generate training parameters;
[0040] Conduct large-scale distributed training on a distributed training framework to generate graph neural network model parameters after preliminary training;
[0041] The optimization algorithm is used to optimize the parameters of the graph neural network model after preliminary training to generate an optimized graph neural network model; the optimized graph neural network model is used for reasoning to generate the final reasoning result.
[0042] Preferably, the optimizing of data transmission performance by efficient asynchronous transmission protocol and flow control mechanism and applying advanced task scheduling algorithm to ensure efficient operation of each computing node include:
[0043] Using an efficient asynchronous transmission protocol to transmit the parallel computing result data to a central computing node, monitoring the transmission status of the data stream in real time, and generating transmission status data;
[0044] Dynamically adjust the flow control strategy according to the transmission status data, optimize the transmission performance, and generate optimized transmission data;
[0045] Advanced task scheduling algorithms are used to dynamically adjust task allocation strategies, predict the resource requirements of computing nodes and allocate resources in advance to ensure the efficient operation of each computing node. In addition, tasks are automatically migrated through a fault recovery mechanism when a node fails to ensure the continuity and reliability of computing tasks.
[0046] A system for implementing the language model parallel reasoning method, comprising:
[0047] A data acquisition module is used to obtain the language data to be processed and perform standardization processing to generate feature data;
[0048] The edge computing module is deployed on the edge computing node and is used to extract features and make preliminary inferences on feature data to generate preliminary inference result data;
[0049] An adaptive data processing module is used to divide the preliminary inference result data into adaptive data groups, dynamically adjust the batch size and allocate computing resources according to the data complexity, use an efficient parallel computing framework to perform calculations, and generate parallel computing result data;
[0050] The graph neural network module is used to convert the parallel computing result data into graph representation data, use the adaptive graph neural network for training and reasoning, and generate the final reasoning result;
[0051] The data transmission and scheduling module is used to optimize data transmission performance through efficient asynchronous transmission protocols and flow control mechanisms, and apply advanced task scheduling algorithms to ensure the efficient operation of each computing node.
[0052] Compared with the prior art, the advantages and beneficial effects of the present invention are:
[0053] The present invention adopts an efficient asynchronous transmission protocol and flow control mechanism, which significantly reduces the data transmission delay between computing nodes and improves the overall computing efficiency;
[0054] The present invention ensures efficient operation of each computing node and avoids the problem of idle resources by dynamically adjusting resource allocation and task scheduling;
[0055] The present invention utilizes a complexity evaluation module and a dynamic adjustment mechanism to achieve balanced distribution of computing load and avoid computing bottlenecks;
[0056] The present invention converts data into graph representation and uses adaptive graph neural network to process it, accurately processing the dependency relationship between data and improving the accuracy of calculation results;
[0057] The present invention can dynamically adjust the division of model stages according to actual needs, increase flexibility and improve reasoning efficiency;
[0058] The present invention introduces a synchronization optimization mechanism to coordinate the time steps of the reading operation and the generating operation, ensures the synchronization between nodes, and improves the continuity and efficiency of the calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a schematic diagram of the process of the present invention;
[0060] Figure 2 A flowchart of adaptive data group division and dynamic adjustment in the present invention;
[0061] Figure 3 This is a flow chart of the efficient parallel computing framework in the present invention;
[0062] Figure 4 This is a flow chart of adaptive graph neural network training and reasoning in the present invention;
[0063] Figure 5 It is a flow chart of data transmission optimization and task scheduling in the present invention;
[0064] Figure 6 It is a structural block diagram of the system of the present invention. DETAILED DESCRIPTION
[0065] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is obvious that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0066] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0067] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0068] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0069] Some block diagrams and / or flow charts are shown in the accompanying drawings. It should be understood that some boxes or combinations thereof in the block diagrams and / or flow charts can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that these instructions can create a device for implementing the functions / operations described in these block diagrams and / or flow charts when executed by the processor. The technology of the present disclosure can be implemented in the form of hardware and / or software (including firmware, microcode, etc.). In addition, the technology of the present disclosure can take the form of a computer program product on a computer-readable storage medium storing instructions, which can be used by an instruction execution system or in combination with an instruction execution system.
[0070] A language model parallel reasoning method includes the following steps:
[0071] Obtaining language data to be processed and performing standardization processing to generate feature data;
[0072] Preferably, the obtaining of the language data to be processed and performing standardization processing includes:
[0073] Perform word segmentation processing on the language data, divide the language data into independent words or phrases, and generate word segmentation data;
[0074] Remove stop words from the segmented data to generate purified data;
[0075] Perform stemming on the purified data, normalize the words into their stem forms, and generate stemmed data; convert the stemmed data into numerical features through a feature extraction algorithm to generate feature data.
[0076] Perform word segmentation on the language data. The principle of word segmentation is to split a continuous text string into independent words or phrases. Word segmentation can be achieved through rule-based methods or machine learning algorithms. Rule-based methods usually rely on predefined dictionaries and grammar rules, while machine learning algorithms use a large amount of labeled data for training. The effect of word segmentation is to generate segmented data, which is more suitable for computer processing in form and can significantly improve the efficiency of subsequent feature extraction and model training.
[0077] Remove stop words from the segmented data. Stop words refer to those high-frequency words that have no practical meaning in a specific context, such as "de", "shi", "zai", etc. The principle of removing stop words is to filter out these words through a predefined stop word list, thereby reducing data redundancy and improving the processing efficiency of the model. In terms of effect, this step generates purified data, ensuring that the remaining words have actual semantic value, thus improving the performance of the model.
[0078] Perform stemming on the purified data. The principle of stemming is to normalize words into their root forms. For example, convert "running" to "run". This step usually uses algorithms such as Porter Stemmer or Lemmatizer. The effect of stemming is to reduce word variants, unify words with the same root, thereby reducing the dimensionality of the feature space and generating stemmed data. This can improve the generalization ability and processing efficiency of the model.
[0079] Convert the stemmed data into numerical features through a feature extraction algorithm. Common methods of feature extraction include term frequency (TF), inverse document frequency (IDF), word vectors (such as Word2Vec, GloVe), etc. The principle of these methods is to convert text information into a numerical representation in a vector space for easy calculation and comparison. The effect of feature extraction is to generate feature data, which are numerical and can reflect the semantic information of the text and the relationships between words, providing basic data for subsequent model training and inference.
[0080] Overall, through word segmentation, stop word removal, stemming, and feature extraction, the normalization process converts the original language data into structured numerical feature data. This process ensures the consistency, standardization, and effectiveness of the data, providing high-quality input for subsequent parallel inference of the language model. Through these processing steps, the system can process and understand text data more efficiently, thereby improving the overall performance and accuracy of the language model.
[0081] Perform feature extraction and preliminary reasoning on the feature data on the edge computing node to generate preliminary reasoning result data;
[0082] Preferably, the feature extraction and preliminary reasoning of the feature data on the edge computing node includes:
[0083] Input the feature data into the edge computing node, process the feature data through the feature extraction algorithm, and generate preliminary feature data;
[0084] Inputting the preliminary feature data into the preliminary reasoning model for preliminary reasoning to generate preliminary reasoning result data;
[0085] Aggregate and clean the preliminary reasoning result data, remove redundant and abnormal data, and generate cleaned preliminary reasoning result data.
[0086] The feature data is input into the edge computing node and processed by the feature extraction algorithm to generate preliminary feature data. The principle of the feature extraction algorithm is to further process the input feature data to extract more representative features. These algorithms include convolutional neural networks (CNN) and recurrent neural networks (RNN) in deep learning, depending on the type of data and application scenarios. Through feature extraction, the preliminary feature data can better reflect the inherent structure and pattern of the original data, and improve the accuracy and efficiency of subsequent reasoning.
[0087] The preliminary feature data is input into the preliminary inference model for preliminary inference to generate preliminary inference result data. The principle of the preliminary inference model is to use pre-trained lightweight models, such as logistic regression, decision trees, or lightweight neural networks, to quickly infer the preliminary feature data on the edge node. The effect of this step is to quickly generate preliminary inference result data. Although these data are not the final results, they can significantly reduce the computational burden of subsequent central computing nodes.
[0088] Aggregate and clean the preliminary reasoning result data, remove redundant and abnormal data, and generate cleaned preliminary reasoning result data. The principle of aggregation is to merge the preliminary reasoning result data from multiple edge nodes for subsequent unified processing. The principle of cleaning is to detect and remove redundancy and abnormal values in the data through data cleaning algorithms to ensure the integrity and consistency of the data. In effect, this step generates high-quality cleaned preliminary reasoning result data, providing a reliable data foundation for further processing by the central computing node.
[0089] By performing feature extraction and preliminary reasoning at the edge computing nodes, the system can effectively disperse the computing load and improve the parallelism and real-time performance of data processing. In a specific embodiment, for example, in a large-scale distributed system, multiple edge nodes can process data from different sources in parallel, each performing feature extraction and preliminary reasoning, and then aggregate and clean the resulting data and send it to the central node. Such a design not only reduces the computing pressure of the central node, but also significantly reduces the delay in data transmission, and improves the processing efficiency and response speed of the overall system.
[0090] In summary, feature extraction and preliminary reasoning of feature data are performed on edge computing nodes. Through feature extraction, preliminary reasoning, data aggregation and cleaning, efficient distributed computing of data processing is achieved, and the overall performance and reliability of the system are improved. This step ensures the collaborative work of edge computing nodes and central computing nodes, and provides a solid foundation for parallel reasoning of language models.
[0091] like Figure 2-Figure 3 As shown, the preliminary inference result data is divided into adaptive data groups, the batch size is dynamically adjusted and computing resources are allocated according to the data complexity, and the efficient parallel computing framework is used for calculation to generate parallel computing result data;
[0092] The preliminary reasoning result data is divided into adaptive data groups. The principle of dividing the data groups is to group the data according to the characteristics and complexity of the preliminary reasoning result data for parallel processing. The complexity evaluation module performs complexity evaluation on the preliminary reasoning result data and generates complexity data groups. This process includes analyzing the processing time, data volume, and required computing resources of the data. Through this meticulous division, it can ensure that the size and complexity of each data group are relatively balanced, thereby avoiding the waste of computing resources and processing bottlenecks.
[0093] Dynamically adjust batch size and allocate computing resources based on data complexity. The principle of this step is to dynamically adjust the batch size of each data group based on the previously evaluated complexity and allocate corresponding computing resources. The specific method of calculating data complexity includes evaluating data processing time, data volume, and resource usage. Through this dynamic adjustment, load balancing can be achieved to ensure that all computing nodes can operate efficiently. The dynamic resource allocation mechanism further optimizes the utilization of computing resources, allowing the system to flexibly adjust resource allocation according to real-time needs, thereby improving computing efficiency.
[0094] Use efficient parallel computing frameworks for computing. Efficient parallel computing frameworks, such as MapReduce, Apache Flink, or Apache Spark, can support parallel processing of large-scale data. By inputting adaptive data groups into the parallel computing framework, the system can process the data simultaneously on multiple computing nodes. The computing framework uses a multi-level cache mechanism to temporarily store intermediate results, reduce data transmission delays, and improve computing efficiency. This parallel processing method not only speeds up data processing, but also improves the overall performance and responsiveness of the system.
[0095] For example, in practical applications, a large-scale distributed system can process large data sets in parallel through multiple computing nodes. Each node dynamically adjusts the processing batch according to its own computing power and data complexity to ensure load balancing and resource optimization. Under this architecture, the system can maintain efficient operation and generate parallel computing result data even when the data volume is very large.
[0096] In summary, the preliminary inference result data is divided into adaptive data groups and the batch size and computing resources are dynamically adjusted. The efficient parallel computing framework is used for calculation, which realizes efficient distributed computing of data processing. Through careful division and dynamic adjustment, this process ensures the efficient use of computing resources, improves the processing power and response speed of the system, and thus provides reliable technical support for parallel reasoning of language models.
[0097] Preferably, dividing the preliminary reasoning result data into adaptive data groups comprises:
[0098] According to the characteristics and complexity of the preliminary reasoning result data, the complexity evaluation module is used to perform complexity evaluation on the preliminary reasoning result data to generate a complexity data group;
[0099] According to the evaluation results of the complexity data group, the size of each data group and the number of data fragments are dynamically adjusted to generate an adaptive data group.
[0100] Based on the characteristics and complexity of the preliminary reasoning result data, the complexity evaluation module is used to evaluate the complexity of the data. The principle of complexity evaluation is to generate a comprehensive complexity score by analyzing the processing time, data volume, computing requirements, and intrinsic characteristics of the data (such as the distribution and structure of the data). The effect of this step is to generate complexity data groups, each of which represents a group of data fragments with similar complexity. This evaluation method can identify differences in the data and potential computing bottlenecks, thereby providing basic data for subsequent dynamic adjustments.
[0101] According to the evaluation results of the complexity data group, the size of each data group and the number of data slice fragments are dynamically adjusted to generate adaptive data groups. The principle of dynamic adjustment is to adjust the size of the data group and the number of fragments so that each data group can achieve load balancing when allocating computing resources. This includes increasing or decreasing the size of the data group, merging or splitting data fragments to ensure that the complexity and processing load of each data group are evenly distributed among the computing nodes. Specifically, if the complexity score of a data group is high, the system will automatically reduce the size of the data group or further split it into smaller fragments to ensure that it can be processed within a reasonable time; conversely, if the complexity score of the data group is low, its size can be appropriately increased or data fragments can be merged to make full use of computing resources.
[0102] For example, in a large-scale distributed language model system, after the complexity of the preliminary inference result data is evaluated, multiple complexity data groups are generated. The system dynamically adjusts the size and number of fragments of each data group according to the complexity score of each data group to generate adaptive data groups. These adaptive data groups are then distributed to different computing nodes for parallel processing. In this way, the system can dynamically adapt to changes in data complexity, ensuring that each computing node can operate efficiently, avoiding the waste of computing resources and the emergence of processing bottlenecks.
[0103] Overall, the process of dividing the preliminary inference result data into adaptive data groups and dynamically adjusting the batch size according to the complexity ensures efficient use of computing resources and balanced distribution of processing load through careful complexity evaluation and flexible adjustment mechanism. This not only improves the overall computing efficiency and response speed of the system, but also enhances the robustness and adaptability of the system when processing large-scale complex data, providing strong support for parallel reasoning of language models.
[0104] Preferably, dynamically adjusting the batch size according to data complexity includes:
[0105] Calculate data complexity, specifically by calculating data complexity based on data processing time, data size, and resource usage;
[0106] The batch size of the adaptive data group is dynamically adjusted according to the calculated data complexity to achieve load balancing.
[0107] Calculate data complexity. The calculation of data complexity is based on several key factors: data processing time, data size, and resource usage. Specifically, data processing time refers to the time required to complete a data processing task; data size refers to the size of the data set; resource usage refers to the computing resources required to process the data (such as CPU, GPU, memory, etc.). These factors are calculated comprehensively using the formula:
[0108]
[0109] in, Represents the data complexity, Represents the data processing time, Represents the data size, Represents resource usage. By quantifying and calculating these factors, a complexity score for each data group is generated, providing a basis for subsequent dynamic adjustments.
[0110] Next, the batch size of the adaptive data group is dynamically adjusted according to the calculated data complexity. The principle of the adjustment is to dynamically adjust the size of the data group according to the complexity score to achieve load balancing. For example, for data groups with higher complexity scores, the size of the data group can be reduced or split into smaller batches to ensure that the data can be processed in a reasonable time; while for data groups with lower complexity scores, their size can be appropriately increased or multiple data groups can be merged to make full use of computing resources. Through this dynamic adjustment, the system can flexibly respond to changes in data complexity, ensure that each computing node can operate in the best state, and avoid the waste of computing resources and the emergence of processing bottlenecks.
[0111] In a specific embodiment, it is assumed that a large-scale distributed language model system, when processing a large-scale data set, first evaluates the preliminary reasoning result data through the complexity evaluation module and calculates the complexity score of each data group. Then, the system dynamically adjusts the batch size of the data group according to the complexity score, splits the data group with high complexity into smaller batches, and assigns them to nodes with stronger computing power for processing; and merges the data group with low complexity into larger batches and assigns them to other computing nodes for processing. In this way, the system ensures load balancing and efficient resource utilization of all computing nodes, significantly improving the overall computing efficiency.
[0112] In summary, dynamically adjusting the batch size according to data complexity ensures efficient use of computing resources and load balancing by accurately calculating data complexity and dynamically adjusting the data group size. This process not only improves the overall performance and response speed of the system, but also enhances the robustness and adaptability of the system when processing large-scale complex data, providing strong technical support for parallel reasoning of language models.
[0113] Preferably, the computing using an efficient parallel computing framework includes:
[0114] Input the adaptive data group into the parallel computing framework, allocate computing resources and perform parallel computing, and generate parallel computing result data;
[0115] A multi-level cache mechanism is introduced during the calculation process to temporarily store intermediate results, reduce data transmission delays, and improve calculation efficiency.
[0116] Input the adaptive data group into the parallel computing framework. The principle of parallel computing frameworks such as Apache Flink or ApacheSpark is to support distributed parallel processing of large-scale data. The adaptive data group is generated based on the complexity of the data and the system load balancing strategy, which can ensure that the data is evenly distributed among multiple computing nodes. Through the parallel computing framework, the adaptive data group can be processed on multiple computing nodes at the same time, and each node independently performs part of the computing task, thereby greatly shortening the overall processing time. After the adaptive data group is input into the parallel computing framework, the system allocates computing resources according to the size and complexity of the data group, ensuring that the computing resources of each node are fully utilized, thereby generating parallel computing result data.
[0117] Introduce a multi-level cache mechanism during the calculation process. The principle of the multi-level cache mechanism is to introduce a cache layer between computing nodes to temporarily store intermediate calculation results to reduce the frequency and delay of data transmission between nodes. These cache layers can include memory cache, disk cache, etc., and cache layers at different levels vary in storage capacity and access speed. Through the multi-level cache mechanism, intermediate results can be accessed quickly, avoiding frequent data transmission and improving the efficiency of data processing. For example, in a distributed system, when a computing node completes part of the calculation of a task, the intermediate results will be temporarily stored in the memory cache, and other nodes can directly obtain data from the cache for subsequent processing without transmitting the entire data set over the network. This not only reduces the delay in data transmission, but also improves the overall processing efficiency of the system.
[0118] In a specific embodiment, it is assumed that a large-scale distributed language model system is processing a large amount of text data. The system first divides the text data into multiple adaptive data groups and inputs them into the Apache Spark framework. Each data group is processed in parallel on different computing nodes, and the nodes dynamically allocate computing resources according to task requirements. During the calculation process, the system introduces memory cache and disk cache between each node for temporary storage of intermediate results. Due to the existence of the cache mechanism, data transmission between nodes is greatly reduced, the overall processing speed of the system is significantly improved, and finally the parallel calculation result data is generated.
[0119] In summary, by using an efficient parallel computing framework for calculation, inputting adaptive data groups into the parallel computing framework and introducing a multi-level cache mechanism during the calculation process, efficient distributed processing of large-scale data is achieved. Through reasonable resource allocation and cache mechanism, the system can significantly reduce data transmission delays, improve computing efficiency, enhance overall performance, and provide strong technical support for parallel reasoning of language models.
[0120] like Figure 4As shown, the parallel computing result data is converted into graph representation data, and the adaptive graph neural network is used for training and reasoning to generate the final reasoning result;
[0121] Convert the parallel computing result data into graph representation data. The principle of graph representation data is to construct a graph structure by representing data entities as nodes and the relationships between entities as edges. This representation method can intuitively reflect the complex relationships between data, which is convenient for subsequent graph neural network processing. For example, words in text data can be used as nodes, and the co-occurrence relationships between words can be used as edges to construct a word co-occurrence graph. After converting the parallel computing result data into graph representation data, the intrinsic connections and structural features in the data can be better captured.
[0122] Adaptive graph neural networks (GNNs) are used for training and reasoning. The principle of graph neural networks is to aggregate node features and their neighbor node features through graph convolution operations to update node representations. Based on traditional GNNs, adaptive graph neural networks introduce a dynamic adjustment mechanism that can adaptively adjust model parameters and structures based on data characteristics and feedback during training. Specifically, the GNN model first performs multi-layer graph convolution operations on the graph representation data. Each layer of graph convolution will fuse the information of the node and its neighbor nodes, and gradually update the node representation. Through multi-layer convolutions, the model can capture deeper structural information and relationship features.
[0123] During the training process, the adaptive mechanism dynamically adjusts the model's hyperparameters (such as learning rate, number of convolutional layers, node embedding dimensions, etc.) and network structure based on the feedback of the training data to improve the model's training effect and generalization ability. During the inference process, the trained GNN model infers the newly input graph representation data to generate the final representation of the node or graph, and then generates the final inference result.
[0124] For example, in a practical application, a large-scale distributed language model system performs parallel computation on a large amount of text data and generates parallel computation result data. These result data are converted into a word co-occurrence graph through a graph representation method, where each node represents a word and each edge represents the co-occurrence relationship between words. Then, the system uses an adaptive graph neural network to train the word co-occurrence graph and dynamically adjusts the model parameters to achieve the best results. After training, the GNN model infers the new text data and generates accurate text representation and inference results.
[0125] In this way, the parallel computing result data is converted into graph representation data, and the adaptive graph neural network is used for training and reasoning, which can not only better capture the complex relationships and structural features in the data, but also improve the training effect and reasoning accuracy of the model through adaptive mechanisms. Overall, this process significantly improves the performance and effect of parallel reasoning of language models, and provides strong technical support for the understanding and processing of complex data.
[0126] Preferably, converting the parallel computing result data into graph representation data comprises:
[0127] Convert the parallel computing result data into a graph structure, where nodes represent data entities and edges represent the relationships between entities, and generate a graph to represent the data;
[0128] Apply graph feature extraction algorithm to graph representation data, extract key features, and generate graph feature data;
[0129] Real-time monitoring of data flow dynamically updates the graph structure to ensure the timeliness of the data represented by the graph.
[0130] Convert the parallel computing result data into a graph structure. The principle of the graph structure is to construct a graph that intuitively reflects the relationship between data by representing data entities as nodes and the relationship between entities as edges. For example, in natural language processing, words can be used as nodes, and the co-occurrence relationship between words can be used as edges to construct a word co-occurrence graph. The definition of nodes and edges can intuitively reflect the relationship and structure between data, thereby generating a graph representation of data. This graph representation method can effectively capture the complex relationships in the data and provide deeper semantic information.
[0131] Apply graph feature extraction algorithms to graph representation data to extract key features. The principle of graph feature extraction algorithms is to aggregate node features and their neighbor node features through algorithms such as graph convolutional networks (GCN) and graph attention networks (GAT) to extract key features that reflect the overall characteristics of nodes and graphs. These algorithms gradually fuse the information of nodes and their neighbor nodes through multi-layer convolution operations to generate richer and more accurate node representations. The extracted graph feature data can reflect the intrinsic relationship between nodes and graph structures, providing high-quality input for subsequent training and reasoning.
[0132] Real-time monitoring of data streams dynamically updates the graph structure to ensure the timeliness of the data represented by the graph. The principle of dynamic update is to automatically adjust the graph structure and features by real-time monitoring of changes in data streams to keep the data up to date. For example, when new data enters the system or existing data changes, the system can automatically update the graph structure and recalculate the features of related nodes and edges to ensure that the data represented by the graph always reflects the latest status of the current data. Through this dynamic update mechanism, the system can maintain efficiency and accuracy when processing real-time data.
[0133] In a specific embodiment, it is assumed that a large-scale distributed language model system, when processing a large amount of text data, first converts this data into a word co-occurrence graph, where each node represents a word and each edge represents the co-occurrence relationship between words. Next, the system applies a graph convolutional network to perform multi-layer convolution on the graph representation data to extract key graph feature data. These feature data can accurately reflect the semantic and structural characteristics of the text. At the same time, the system monitors the data flow in real time, and automatically updates the graph structure when new text data enters or existing data changes, to ensure the timeliness of the graph representation data. In this way, the system can efficiently process large-scale dynamic data, generate accurate graph feature data, and provide a reliable foundation for subsequent model training and reasoning.
[0134] In summary, the conversion of parallel computing result data into graph representation data ensures the accuracy and timeliness of data processing through the construction of graph structure, the application of graph feature extraction algorithm and the combination of dynamic update mechanism. This process can not only capture the complex relationships and structural features in the data, but also maintain high efficiency and accuracy when processing dynamic data, providing strong technical support for parallel reasoning of language models.
[0135] Preferably, the training and reasoning using an adaptive graph neural network includes:
[0136] Input graph feature data into the adaptive graph neural network model, dynamically adjust training parameters and model structure, perform model training, and generate training parameters;
[0137] Conduct large-scale distributed training on a distributed training framework to generate graph neural network model parameters after preliminary training;
[0138] The optimization algorithm is used to optimize the parameters of the graph neural network model after preliminary training to generate an optimized graph neural network model; the optimized graph neural network model is used for reasoning to generate the final reasoning result.
[0139] Input graph feature data into the adaptive graph neural network model and dynamically adjust training parameters and model structure. The principle of the adaptive GNN model is to dynamically adjust training parameters (such as learning rate, batch size) and model structure (such as number of convolution layers, node embedding dimension) so that the model can be adaptively optimized according to the characteristics of the data and feedback during the training process. Specifically, during each training iteration, the model dynamically adjusts parameters according to changes in the loss function to ensure that the model can maintain the best state at different training stages. This adaptive adjustment mechanism can effectively improve the training effect and generalization ability of the model and generate the optimal training parameters.
[0140] Perform large-scale distributed training on a distributed training framework. The principle of a distributed training framework is to distribute training tasks to multiple computing nodes and perform model training in parallel. Common distributed training frameworks include TensorFlow, PyTorch, etc. These frameworks support distributed processing of large-scale data and can significantly speed up model training. In this architecture, graph feature data is distributed to different computing nodes, each node independently trains part of the model's parameters, and synchronously updates the model parameters through the parameter server. Through this distributed training method, the system can complete model training of large-scale data in a relatively short time and generate the model parameters of the graph neural network after preliminary training.
[0141] The optimization algorithm is used to optimize the parameters of the graph neural network model after preliminary training. The principle of the optimization algorithm is to reduce the model error and improve the prediction accuracy of the model by further adjusting and fine-tuning the model parameters. Commonly used optimization algorithms include Adam, RMSProp, etc. The optimization process includes calculating the gradient and updating the parameters so that the model can better fit the training data. The effect of this step is to generate an optimized graph neural network model, which significantly improves the prediction performance and stability of the model.
[0142] The optimized graph neural network model is used for reasoning to generate the final reasoning results. The principle of the reasoning process is to use the trained GNN model to predict the new input data and generate the output of the model. In the specific implementation, the graph feature data is input into the optimized GNN model, and the model calculates the representation of nodes and graphs through forward propagation and outputs the prediction results. These final reasoning results can be used in various application scenarios, such as natural language processing, recommendation systems, etc.
[0143] For example, in a practical application, a large-scale distributed language model system uses an adaptive graph neural network to train text data. First, the system inputs the preprocessed graph feature data into the adaptive GNN model and dynamically adjusts the training parameters and model structure. Then, large-scale distributed training is performed on the TensorFlow distributed training framework, and the model is trained in parallel through multiple computing nodes. Next, the system uses the Adam optimization algorithm to optimize the model parameters after preliminary training and generate an optimized graph neural network model. Finally, the system uses the optimized model to infer new text data and generate accurate semantic representations and prediction results.
[0144] In summary, the use of adaptive graph neural networks for training and reasoning, through dynamic adjustment of training parameters and model structure, large-scale training of distributed training frameworks, parameter optimization of optimization algorithms and efficient reasoning, can achieve accurate capture and efficient processing of complex data relationships. This process not only improves the training effect and prediction accuracy of the model, but also significantly improves the overall performance and application effect of the system, providing strong technical support for parallel reasoning of language models.
[0145] like Figure 5 As shown in the figure, the data transmission performance is optimized through efficient asynchronous transmission protocol and flow control mechanism, and the advanced task scheduling algorithm is applied to ensure the efficient operation of each computing node.
[0146] Preferably, the optimizing of data transmission performance by efficient asynchronous transmission protocol and flow control mechanism and applying advanced task scheduling algorithm to ensure efficient operation of each computing node include:
[0147] Using an efficient asynchronous transmission protocol to transmit the parallel computing result data to a central computing node, monitoring the transmission status of the data stream in real time, and generating transmission status data;
[0148] Dynamically adjust the flow control strategy according to the transmission status data, optimize the transmission performance, and generate optimized transmission data;
[0149] Advanced task scheduling algorithms are used to dynamically adjust task allocation strategies, predict the resource requirements of computing nodes and allocate resources in advance to ensure the efficient operation of each computing node. In addition, tasks are automatically migrated through a fault recovery mechanism when a node fails to ensure the continuity and reliability of computing tasks.
[0150] An efficient asynchronous transmission protocol is used to transmit the parallel computing result data to the central computing node. The principle of the asynchronous transmission protocol is to use a non-blocking communication method so that the data transmission process does not rely on immediate response, thereby improving transmission efficiency and flexibility. Specifically, asynchronous transmission protocols such as QUIC or RDMA can reduce transmission delays and increase transmission speeds by reducing handshake and confirmation steps. This method can ensure that the parallel computing result data is quickly and reliably transmitted to the central computing node, providing timely data support for subsequent processing.
[0151] Monitor the transmission status of data streams in real time and generate transmission status data. The principle of data stream monitoring is to collect various performance indicators in the data transmission process in real time through network monitoring tools and sensors, such as bandwidth utilization, transmission delay, packet loss rate, etc. These transmission status data can reflect the health of current data transmission and provide data support for the adjustment of flow control strategies. For example, when monitoring that the bandwidth utilization is too high or the transmission delay increases, the system can adjust the transmission strategy in time to avoid transmission bottlenecks and performance degradation.
[0152] Dynamically adjust the flow control strategy according to the transmission status data to optimize the transmission performance. The principle of the flow control mechanism is to ensure the stability and efficiency of data transmission by adjusting the data transmission rate and transmission path. Specifically, the system dynamically adjusts the flow control strategy according to the real-time monitoring data, such as adjusting the transmission rate, selecting the best transmission path, implementing congestion control, etc., to optimize the transmission performance. For example, when network congestion is detected, the system can reduce the transmission rate or select an alternative path to ensure the continuity and stability of data transmission, thereby generating optimized transmission data.
[0153] Advanced task scheduling algorithms are applied to dynamically adjust task allocation strategies to ensure efficient operation of each computing node. The principle of the task scheduling algorithm is to dynamically allocate computing tasks through intelligent analysis and prediction to ensure load balancing and optimal resource utilization of each node. In specific implementation, the system uses machine learning algorithms such as reinforcement learning or Bayesian optimization to predict the resource requirements of each node based on historical data and current load conditions, and allocate resources in advance. For example, when a node is predicted to have a high load in the future, the system can allocate more computing resources to the node in advance, or migrate some tasks to other nodes to achieve load balancing.
[0154] At the same time, when a node fails, the fault recovery mechanism automatically migrates tasks to ensure the continuity and reliability of computing tasks. The principle of the fault recovery mechanism is to monitor the node status in real time, and when a node failure is detected, automatically trigger task migration and reallocate the affected tasks to healthy nodes. In this way, the system can quickly recover computing tasks when a node fails, avoiding data loss and computing interruption. For example, when a node cannot continue to run due to hardware failure, the system can automatically migrate tasks on the node to other backup nodes to ensure continuous execution of tasks and data consistency.
[0155] In a specific embodiment, when a large-scale distributed language model system processes large-scale text data, it first quickly transmits the parallel computing result data to the central computing node through an asynchronous transmission protocol. The system monitors the transmission status of the data stream in real time, dynamically adjusts the flow control strategy according to the monitoring data, and optimizes the transmission performance. At the same time, the system applies advanced task scheduling algorithms to dynamically adjust the task allocation strategy to ensure the efficient operation of each computing node. When a node fails, the fault recovery mechanism automatically migrates the task to ensure the continuity and reliability of the computing task.
[0156] In summary, by optimizing data transmission performance through efficient asynchronous transmission protocols and flow control mechanisms, and applying advanced task scheduling algorithms to ensure efficient operation of each computing node, high-efficiency data transmission and stability of system operation are achieved. This process not only improves the efficiency and reliability of data transmission, but also enhances the adaptability and fault tolerance of the system under complex conditions, providing solid technical support for parallel reasoning of language models.
[0157] like Figure 6 As shown, a system for implementing the language model parallel reasoning method includes:
[0158] The data acquisition module is used to obtain the language data to be processed and perform standardization processing to generate feature data; the main function of the data acquisition module is to obtain the language data to be processed from various data sources and perform standardization processing on it to generate feature data. Standardization processing includes steps such as word segmentation, stop word removal, stem extraction and feature extraction. Word segmentation divides continuous text strings into independent words or phrases, stop word removal filters out high-frequency words that have no practical meaning, stem extraction normalizes words to their root form, and feature extraction converts stem data into numerical features to generate feature data. After being processed by the data acquisition module, the original language data is converted into standardized feature data, which is structured and numerical, and can be efficiently processed by subsequent calculation modules. Standardization processing improves the consistency and standardization of data, and provides high-quality input data for subsequent feature extraction and model training.
[0159] The edge computing module is deployed on the edge computing node and is used to perform feature extraction and preliminary reasoning on the feature data to generate preliminary reasoning result data. The edge computing module is deployed on the edge computing node and is responsible for further feature extraction and preliminary reasoning on the feature data. Through feature extraction algorithms (such as convolutional neural networks, recurrent neural networks, etc.), the edge computing module extracts more representative preliminary feature data, and performs preliminary reasoning through preliminary reasoning models to generate preliminary reasoning result data. The edge computing module distributes feature extraction and preliminary reasoning tasks to multiple edge computing nodes, which reduces the burden on the central computing nodes, reduces data transmission delays, and improves the response speed and processing capabilities of the overall system. The preliminary reasoning result data provides the basis for subsequent adaptive data processing.
[0160] The adaptive data processing module is used to divide the preliminary reasoning result data into adaptive data groups, dynamically adjust the batch size and allocate computing resources according to the data complexity, use the efficient parallel computing framework for calculation, and generate parallel computing result data; the adaptive data processing module divides the preliminary reasoning result data into adaptive data groups, and dynamically adjusts the batch size and allocates computing resources according to the data complexity. The complexity evaluation module evaluates the processing time, data volume and resource usage of the data, and generates a complexity data group. According to the evaluation results of the complexity data group, the adaptive data processing module dynamically adjusts the size and number of data fragments of each data group, uses the efficient parallel computing framework for calculation, and generates parallel computing result data. By dynamically adjusting the size of the data group and the number of data fragments, the balanced distribution of the computing load is achieved, the computing bottleneck is avoided, and the utilization rate of computing resources is improved. The efficient parallel computing framework ensures the efficient processing of large-scale data, and the generated parallel computing result data provides high-quality input for subsequent graph neural network training.
[0161] The graph neural network module is used to convert the parallel computing result data into graph representation data, use the adaptive graph neural network for training and reasoning, and generate the final reasoning result; the graph neural network module converts the parallel computing result data into graph representation data, and uses the adaptive graph neural network for training and reasoning. First, the parallel computing result data is converted into a graph structure, the nodes represent the data entities, the edges represent the relationship between the entities, and the graph representation data is generated. Then, the graph feature extraction algorithm is applied to extract the key features and generate graph feature data. The adaptive graph neural network model trains and reasoned the graph feature data, dynamically adjusts the training parameters and model structure, performs large-scale distributed training on the distributed training framework, and uses the optimization algorithm to optimize the model parameters to generate the final reasoning result. The graph neural network module can accurately handle the complex relationships and dependencies between data, and improve the accuracy and efficiency of reasoning. The adaptive graph neural network enhances the flexibility and generalization ability of the model by dynamically adjusting the model parameters and structure, and the generated final reasoning result is more accurate.
[0162] The data transmission and scheduling module is used to optimize the data transmission performance through efficient asynchronous transmission protocols and flow control mechanisms, and to apply advanced task scheduling algorithms to ensure the efficient operation of each computing node. The data transmission and scheduling module optimizes the data transmission performance through efficient asynchronous transmission protocols and flow control mechanisms, and to apply advanced task scheduling algorithms to ensure the efficient operation of each computing node. Asynchronous transmission protocols (such as QUIC or RDMA) increase the data transmission speed by reducing handshake and confirmation steps. The transmission status of the data stream is monitored in real time, and the transmission status data is generated. The flow control strategy is dynamically adjusted according to the transmission status data to optimize the transmission performance. The task scheduling algorithm ensures the load balance of each node by predicting resource requirements and allocating resources in advance, and automatically migrates tasks when a node fails to ensure the continuity and reliability of computing tasks. The data transmission and scheduling module significantly reduces data transmission delays and improves data transmission efficiency. It ensures the stability and efficient operation of the system through intelligent task scheduling, and enhances the adaptability and fault tolerance of the system under complex conditions.
[0163] The system of the present invention forms an efficient and flexible language model parallel reasoning system through data acquisition module, edge computing module, adaptive data processing module, graph neural network module and data transmission and scheduling module. Through multi-level optimization and dynamic adjustment mechanism, efficient data processing and transmission are achieved, the computational efficiency and reasoning accuracy of the language model are significantly improved, the shortcomings and defects of the existing technology are overcome, and strong technical support is provided for the field of natural language processing.
[0164] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0165] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0166] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0168] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0169] Memory includes non-permanent memory in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0170] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0171] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0172] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A language model parallel reasoning method, characterized in that: The following steps are involved: Obtaining language data to be processed and performing standardization processing to generate feature data; Perform feature extraction and preliminary reasoning on the feature data on the edge computing node to generate preliminary reasoning result data; Divide the preliminary inference result data into adaptive data groups, dynamically adjust the batch size and allocate computing resources according to the data complexity, use an efficient parallel computing framework to perform calculations, and generate parallel computing result data; The dividing of the preliminary inference result data into adaptive data groups comprises: According to the characteristics and complexity of the preliminary reasoning result data, the complexity evaluation module is used to perform complexity evaluation on the preliminary reasoning result data to generate a complexity data group; According to the evaluation results of the complexity data group, the size and number of data fragments of each data group are dynamically adjusted to generate an adaptive data group; Convert the parallel computing result data into graph representation data, use the adaptive graph neural network for training and reasoning, and generate the final reasoning result; The data transmission performance is optimized through an efficient asynchronous transmission protocol and a flow control mechanism, and an advanced task scheduling algorithm is applied to ensure the efficient operation of each computing node; wherein, an efficient asynchronous transmission protocol is used to transmit the parallel computing result data to the central computing node, the transmission status of the data flow is monitored in real time, and transmission status data is generated; the flow control strategy is dynamically adjusted according to the transmission status data, the transmission performance is optimized, and the optimized transmission data is generated; the task allocation strategy is dynamically adjusted by applying an advanced task scheduling algorithm, the resource requirements of the computing nodes are predicted and resources are allocated in advance, to ensure the efficient operation of each computing node, and when a node fails, the task is automatically migrated through a fault recovery mechanism to ensure the continuity and reliability of the computing tasks.
2. The method according to claim 1, characterized in that The obtaining of the language data to be processed and performing standardization processing comprises: Perform word segmentation processing on the language data, divide the language data into independent words or phrases, and generate word segmentation data; Remove stop words from the segmented data to generate purified data; The purified data is subjected to stem extraction, the words are normalized into stem form, and stem data is generated; the stem data is converted into numerical features through a feature extraction algorithm to generate feature data.
3. The method according to claim 1, characterized in that The feature extraction and preliminary reasoning of the feature data on the edge computing node includes: Input the feature data into the edge computing node, process the feature data through the feature extraction algorithm, and generate preliminary feature data; Inputting the preliminary feature data into the preliminary reasoning model for preliminary reasoning to generate preliminary reasoning result data; Aggregate and clean the preliminary reasoning result data, remove redundant and abnormal data, and generate cleaned preliminary reasoning result data.
4. The method according to claim 1, characterized in that: The dynamically adjusting batch size according to data complexity includes: Calculate data complexity, specifically by calculating data complexity based on data processing time, data size, and resource usage; The batch size of the adaptive data group is dynamically adjusted according to the calculated data complexity to achieve load balancing.
5. The method according to claim 1, characterized in that The use of an efficient parallel computing framework to perform calculations includes: Input the adaptive data group into the parallel computing framework, allocate computing resources and perform parallel computing, and generate parallel computing result data; A multi-level cache mechanism is introduced during the calculation process to temporarily store intermediate results, reduce data transmission delays, and improve calculation efficiency.
6. The method according to claim 1, characterized in that The converting of the parallel computing result data into graph representation data comprises: Convert the parallel computing result data into a graph structure, where nodes represent data entities and edges represent the relationships between entities, and generate a graph to represent the data; Apply graph feature extraction algorithm to graph representation data, extract key features, and generate graph feature data; Real-time monitoring of data flow dynamically updates the graph structure to ensure the timeliness of the data represented by the graph.
7. The method according to claim 6, characterized in that The training and reasoning using the adaptive graph neural network includes: Input graph feature data into the adaptive graph neural network model, dynamically adjust training parameters and model structure, perform model training, and generate training parameters; Conduct large-scale distributed training on a distributed training framework to generate graph neural network model parameters after preliminary training; The optimization algorithm is used to optimize the parameters of the graph neural network model after preliminary training to generate an optimized graph neural network model; the optimized graph neural network model is used for reasoning to generate the final reasoning result.
8. A system for implementing the language model parallel reasoning method according to any one of claims 1 to 7, characterized in that: include: A data acquisition module is used to obtain the language data to be processed and perform standardization processing to generate feature data; The edge computing module is deployed on the edge computing node and is used to extract features and make preliminary inferences on feature data to generate preliminary inference result data; An adaptive data processing module is used to divide the preliminary inference result data into adaptive data groups, dynamically adjust the batch size and allocate computing resources according to the data complexity, use an efficient parallel computing framework to perform calculations, and generate parallel computing result data; The graph neural network module is used to convert the parallel computing result data into graph representation data, use the adaptive graph neural network for training and reasoning, and generate the final reasoning result; The data transmission and scheduling module is used to optimize data transmission performance through efficient asynchronous transmission protocols and flow control mechanisms, and apply advanced task scheduling algorithms to ensure the efficient operation of each computing node.
Citation Information
Patent Citations
A pipeline parallel method and device for language model calculation
CN116991483B
Graph-based model division edge-end collaborative reasoning method and system
CN117707795A
Large language model reasoning acceleration method and system
CN118133969A