The invention provides a digital twin
hydraulic engineering large
language model reasoning method based on
tensor parallel processing. The method sequentially comprises the following steps: S1, gradient calculation optimization; s2, carrying out self-attention
tensor dimension reduction blocking; s3, normalizing and parallelizing a low-dimensional layer; s4, inter-layer overall weak extension
resource scheduling processing is carried out on the low-dimensional layer after middle-layer normalization
processing in the step S3; and S5, converting an intermediate
tensor result of a decoder into a specific predicted value. According to the method, the parameters and the input data of the large-scale
language model are subjected to tensor segmentation and are distributed to the computing nodes for
parallel processing, so that the reasoning efficiency of the large-
scale model is remarkably improved. By using the method, the calculation efficiency and the real-time performance of the
hydraulic engineering large
language model can be greatly improved, the calculation nodes can work simultaneously by
processing the reasoning task of the large-
scale model in parallel, the calculation burden of a
single node is remarkably reduced, larger-scale
hydraulic engineering data can be processed, and the calculation efficiency and the real-time performance of the hydraulic
engineering large language model are improved. And efficient and accurate risk prediction capability can be maintained.