The invention discloses a scientific calculation and language generation collaborative reasoning method and
system based on a
physical separation hybrid expert architecture and a storage medium, and relates to the technical field of
large model and scientific calculation fusion. According to the method, a novel architecture named PiMoE is provided, and intelligent
collaboration of a language task and a numerical calculation task on Token
granularity is achieved by integrating a frozen high-precision scientific calculation expert module, a text-to-calculation alignment module and a dynamic token
router module. Wherein scientific calculation experts pre-
train and freeze parameters on specific
field data, and calculation precision and
interpretability are ensured; the text-to-calculation module learns to map
natural language input into numerical representation which can be processed by experts; the token
router then dynamically decides, based on context
semantics, that each Token should be generated by an expert or LLM. The training process adopts a three-stage decoupling strategy: in the first stage, independently training and freezing an expert model; in the second stage, a text-numerical value alignment module is optimized; and in the third stage, a
router is trained to realize dynamic scheduling of experts and LLMs. During reasoning, the
system is seamlessly switched between language generation and scientific calculation according to the
semantic context, so that high precision of
complex calculation is guaranteed, and semantic reasoning and generation capabilities of LLM are kept. According to the method, the problems that a
large model is insufficient in precision, uncontrollable and unextensible in a scientific calculation scene are effectively solved, and deep fusion and dynamic
collaboration of
language understanding and numerical reasoning are realized.