Model fine-tuning training method, device, equipment, storage medium and product
By performing refined segmentation and segmented question-and-answer fine-tuning training on materials science documents, the problems of data scarcity and low knowledge acquisition efficiency of large language models in the field of materials science are solved, and the adaptability and answering ability of the model in the professional field are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FANTASY TECH (SHANGHAI) CO LTD
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-12
AI Technical Summary
Large-scale language models face challenges such as data scarcity, inefficient knowledge acquisition, and insufficient model interpretability when applied in the field of materials science, making it difficult to efficiently and accurately meet the knowledge needs of the specialized field.
By finely segmenting original documents in the field of materials science to generate logical text units and constructing question-answer pairs, the system performs segmented question-and-answer fine-tuning training on a pre-set large language model, simulating the reading and learning patterns of human experts and gradually injecting professional knowledge.
It significantly improves the model's ability to understand materials science literature, extract information, and answer professional questions, achieving efficient and accurate knowledge services, solving the problems of data scarcity and low knowledge acquisition efficiency, and enhancing the model's interpretability.
Smart Images

Figure CN122196174A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of materials science and technology, and in particular to a model fine-tuning training method, apparatus, equipment, storage medium, and product. Background Technology
[0002] Large Language Models (LLMs) have achieved great success in handling general language tasks, but they face a series of unique challenges when applied to highly specialized fields such as materials science. These challenges mainly include: 1. Data scarcity and high knowledge density: The specialized corpora in materials science are relatively small, and high-quality labeled data is even scarcer. At the same time, the knowledge system of materials science is vast and complex, containing a large number of technical terms, concepts, formulas, diagrams, and experimental data, resulting in extremely high knowledge density. This makes it difficult for LLMs to efficiently absorb and understand this specialized knowledge when training and fine-tuning in materials science. 2. Inefficient knowledge injection: Traditional LLM fine-tuning methods typically treat the entire domain corpus as a whole, lacking fine-grained control and targeted knowledge injection. This "bulk" fine-tuning approach is often inefficient when facing fields like materials science that require precise understanding and application of specific knowledge, making it difficult for the model to truly master deep-level domain knowledge. 3. Insufficient model interpretability: In fields like materials science where accuracy and reliability are extremely important, researchers not only need the model to provide answers, but also need to understand the logic and basis behind those answers. However, most existing LLM fine-tuning methods are "black box" in nature, making it difficult to provide transparency in the model decision-making process. This limits the credibility and adoption of LLM in materials science research and applications.
[0003] Therefore, how to solve the problems of data scarcity, low knowledge acquisition efficiency, and lack of targeted adaptation of models in the field of materials science is an urgent issue to be addressed. Summary of the Invention
[0004] The main purpose of this application is to provide a model fine-tuning training method, device, equipment, storage medium and product, which aims to solve the technical problem of data scarcity and low knowledge acquisition efficiency in the field of materials science, resulting in the lack of targeted adaptation of models in the field.
[0005] To achieve the above objectives, this application proposes a model fine-tuning training method, which includes: The original documents in the field of materials science are finely segmented to obtain logical text units; Generate question-answer pairs based on the logical text units; Based on the answers to the questions, the preset large language model is fine-tuned and trained in segments to obtain a large language model for materials science.
[0006] In one embodiment, the step of finely segmenting the original document in the field of materials science to obtain logical text units includes: The text content in the original document is parsed into a text format that includes document structure information to obtain the parsed document; The non-text content in the original document is parsed into a unified markup language format to obtain a marked document; The parsed document is segmented according to natural paragraphs, semantic similarity, or information density to obtain initial logical text units; The tagged document is matched with the initial logical text unit to obtain the logical text unit.
[0007] In one embodiment, the step of segmenting the parsed document according to natural paragraphs, semantic similarity, or information density to obtain initial logical text units includes: The parsed document is segmented according to natural chapters or paragraphs to obtain initial logical text units; And / or, the sentences or paragraphs in the parsed document are segmented according to semantic relevance to obtain initial logical text units; And / or, the parsed document is segmented according to the information density of preset important knowledge within a preset area to obtain initial logical text units.
[0008] In one embodiment, the step of generating question-answer pairs based on the logical text units includes: Information is extracted from the logical text units and transformed into structured question-and-answer pairs. The structured question-and-answer pairs are presented to experts, and the structured question-and-answer pairs are revised based on the supplementary information provided by the experts to obtain revised question-and-answer pairs. The quality of the corrected question-answer pairs is evaluated based on preset evaluation indicators to obtain question-answer pairs.
[0009] In one embodiment, the step of extracting information from the logical text unit and converting the extracted information into structured question-answer pairs includes: Named entities in the logical text unit are identified using information extraction technology; Identify the relationships between the named entities; Identify key events in the logical text unit; The named entities, relationships, and key events are structurally transformed using a preset material domain template library to obtain structured question-answer pairs.
[0010] In one embodiment, the step of performing segmented question-and-answer fine-tuning training on a preset large language model based on the answers to the questions to obtain a large language model for materials science includes: The question and answer pairs are input into a preset large language model to generate question-and-answer output. The difference between the question-and-answer output and the preset answer in the question-and-answer pair is determined based on the loss function; The difference value is weighted according to the segment weight corresponding to different logical text units to obtain the weighted difference value; By minimizing the weighted difference values to guide the segmented question-answer fine-tuning training process of the preset large language model, a large language model for materials science is obtained.
[0011] Furthermore, to achieve the above objectives, this application also proposes a model fine-tuning training device, which includes: The document segmentation module is used to perform fine segmentation of original documents in the field of materials science to obtain logical text units; The question-answer pair generation module is used to generate question-answer pairs based on the logical text units; The fine-tuning training module is used to perform segmented question-and-answer fine-tuning training on the preset large language model based on the answers to the questions, so as to obtain a large language model for materials science.
[0012] In addition, to achieve the above objectives, this application also proposes a model fine-tuning training device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the model fine-tuning training method as described above.
[0013] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the model fine-tuning training method described above.
[0014] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the model fine-tuning training method described above.
[0015] This application provides a model fine-tuning training method. It involves finely segmenting original documents in the materials science field to obtain logical text units; generating question-answer pairs based on these logical text units; and then fine-tuning a pre-set large language model using segmented question-answering techniques based on these pairs to obtain a large language model for materials science. This application simulates the way human experts read and learn scientific literature, segmenting materials science documents into logical text units and performing structured question-answering fine-tuning on each unit. This strategy not only efficiently injects professional knowledge from the materials science field into the LLM (Limited Language Model), but also significantly improves the model's capabilities in understanding materials science literature, extracting information, and answering professional questions through iterative learning and adaptation to domain-specific question-answering patterns. This provides an innovative approach to enabling efficient and accurate knowledge services in professional fields such as materials science. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the model fine-tuning training method of this application in Implementation Example 1. Figure 2 This is a flowchart illustrating the second embodiment of the model fine-tuning training method in this application. Figure 3 This is a flowchart illustrating the model fine-tuning training method in Embodiment 3 of this application. Figure 4 This is a schematic diagram of the module structure of the model fine-tuning training device in an embodiment of this application; Figure 5 This is a schematic diagram of the hardware operating environment involved in the model fine-tuning training method in this application embodiment.
[0019] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0020] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0021] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0022] The main solution of this application embodiment is: to perform fine segmentation of the original documents in the field of materials science to obtain logical text units; to generate question-answer pairs based on the logical text units; and to perform segmented question-answer fine-tuning training on the preset large language model based on the question-answer pairs to obtain a large language model for materials science.
[0023] While large language models (LLMs) have achieved great success in handling general language tasks, applying them to highly specialized fields such as materials science presents a series of unique challenges. These challenges primarily include: data scarcity and high knowledge density, low knowledge injection efficiency, and insufficient model interpretability. Therefore, addressing the issues of data scarcity, low knowledge acquisition efficiency, and the lack of specific adaptation of models to specialized domains in materials science is an urgent problem to be solved.
[0024] This application provides a solution that involves finely segmenting original documents in the field of materials science to obtain logical text units; generating question-answer pairs based on these logical text units; and fine-tuning a pre-set large language model using segmented question-answering techniques based on these question-answer pairs to obtain a large language model for materials science. This application segments materials science documents into logical text units by simulating the way human experts read and learn scientific literature, and performs structured question-answering fine-tuning on each unit. This strategy not only efficiently injects professional knowledge from the field of materials science into the LLM, but also significantly improves the model's capabilities in understanding materials science literature, extracting information, and answering professional questions through iterative learning and adaptation to domain-specific question-answering patterns. This provides an innovative approach to enabling the model to provide efficient and accurate knowledge services in professional fields such as materials science.
[0025] It should be noted that the execution subject of the method in this embodiment can be a computing service device with model fine-tuning training, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone; or it can be a model fine-tuning training device with the same or similar functions. This embodiment and the following embodiments will be described using a model fine-tuning training device as an example.
[0026] Based on this, the embodiments of this application provide a model fine-tuning training method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the model fine-tuning training method of this application.
[0027] In this embodiment, the model fine-tuning training method includes steps S10 to S30: Step S10: The original documents in the field of materials science are finely segmented to obtain logical text units.
[0028] Understandably, materials science documents (such as academic papers, research reports, patent documents, experimental data reports, etc.) can be finely segmented. This segmentation can be based on the document's logical structure (such as chapters and paragraphs), or on semantic relevance or information density. The goal is to break down complex, lengthy materials science texts into smaller, more easily understood and processed logical text units.
[0029] It should be understood that non-pure text content in materials science documents (including molecular chemical formulas and reaction diagrams in images, formulation and yield data in tables, and various mathematical or physical formulas, such as empirical formulas and physical equations) also need to be parsed and identified, and uniformly converted into a standardized Markdown expression format to ensure that the model can be stably and accurately read, understood, and processed for subsequent input.
[0030] Step S20: Generate question-answer pairs based on the logical text units.
[0031] It should be understood that for each finely segmented logical text unit, high-quality question-and-answer pairs are constructed or generated. These Q&A pairs are the core carriers for the model to learn knowledge in the field of materials science. The construction of Q&A pairs can combine automated technologies (such as information extraction and named entity recognition) with manual review and supplementation by domain experts to ensure the professionalism, accuracy, and coverage of the question-and-answer pairs. For example, questions can revolve around key information such as the composition, structure, preparation process, properties, and applications of materials.
[0032] Step S30: Based on the answers to the questions, perform segmented question-and-answer fine-tuning training on the preset large language model to obtain the large language model for materials science.
[0033] Understandably, a pre-built materials science Q&A framework is used to fine-tune the LLM through segmented question-and-answer sessions. This fine-tuning process simulates how human experts read and learn scientific literature, where the model processes text units one by one and provides structured questions and answers for each unit. In each question-and-answer session, the model not only learns how to give the correct answer, but more importantly, it learns how to extract, understand, and reason about information from materials science texts. This iterative learning protocol helps the model gradually absorb materials science terminology, concepts, and reasoning patterns.
[0034] It should be understood that by fine-tuning through segmented question-and-answer sessions, specialized knowledge in the field of materials science is efficiently and accurately injected into the LLM. This fine-grained knowledge injection approach enables the model to better understand the complex relationships and deeper meanings in materials science literature. Simultaneously, through continuous question-and-answer interaction, the model can adaptively learn specific question-and-answer patterns in the field of materials science, thereby improving its professional performance in that domain.
[0035] In one feasible implementation, step S30 may include steps S301 to S304: Step S301: Input the question-answer pair into a preset large language model for question-answering and generate question-answer output.
[0036] It should be noted that when training the pre-defined large language model based on the answer to the question, the input for each fine-tuning includes a materials science text unit and a question constructed for that unit, and the output of the LLM is the answer to that question.
[0037] Step S302: Determine the difference between the question-and-answer output and the preset answer in the question-and-answer pair based on the loss function.
[0038] Understandably, standard question-answering task loss functions, such as cross-entropy loss and sequence-to-sequence loss, can be used to minimize the difference between the model's predicted question-answer output and the preset answer in the question-answer pair.
[0039] Step S303: Perform a weighted operation on the difference value according to the segment weight corresponding to different logical text units to obtain the weighted difference value.
[0040] It should be understood that the fine-tuning training process includes minimizing the question-answering loss by weighting different logical text units according to the segment weight Alpha_{u}; and unfreezing the layers in a course manner or adjusting the segment weight Alpha_{u} according to the information density from low to high.
[0041] Step S304: By minimizing the weighted difference value to guide the segmented question-answer fine-tuning training process of the question-answer pair on the preset large language model, a large language model for materials science is obtained.
[0042] It should be understood that minimizing the weighted difference value guides the segmented question-and-answer fine-tuning training process of the pre-defined large language model. The fine-tuning process can adopt an iterative learning protocol, that is, after the model processes the Q&A pair of a text unit, the knowledge it has learned can be used to guide the question-and-answer process of subsequent text units, forming a process of knowledge accumulation and reinforcement.
[0043] It's important to note that this segmented question-and-answer fine-tuning simulates the cognitive process of human experts reading scientific literature: experts first understand local content (such as a paragraph or a diagram) and extract key information. During reading, experts continuously ask questions and seek answers; this question-driven learning approach helps deepen understanding. As they gain a better understanding of different local content, experts integrate this knowledge to form a comprehensive understanding of the entire document or field. In this way, LLM can gradually absorb materials science terminology, concepts, and reasoning patterns, forming a structured understanding of the field.
[0044] It should be understood that segmented question-and-answer fine-tuning efficiently and accurately injects materials science expertise into the LLM, enabling it to adaptively learn for specific question-and-answer patterns in materials science. Unlike traditional full-scale fine-tuning, segmented question-and-answer fine-tuning allows for fine-grained control over knowledge injection. By fine-tuning specific text units and Q&A pairs, it ensures that the model accurately learns the details of each knowledge point, avoiding the knowledge ambiguity or omissions that may result from large-scale fine-tuning.
[0045] Understandably, through continuous question-and-answer interaction, the model can adaptively learn specific question-and-answer patterns in the field of materials science. For example, the model can learn: understanding and using technical terminology, accurately understanding and using materials science terminology; interpreting data and graphs, extracting and reasoning information from experimental data, graphs, and formulas; and complex reasoning capabilities, performing logical reasoning to arrive at accurate answers to multi-step, multi-condition questions. This will significantly enhance LLM's capabilities in materials science literature understanding, information extraction, and answering specialized questions, including but not limited to material performance prediction, new material design, and failure analysis.
[0046] Furthermore, segmented question-answering fine-tuning can mitigate catastrophic forgetting problems in the following ways: Incremental learning, where only small-scale, specific knowledge point-based adjustments are made to the model each time, reducing interference with the model's original general knowledge; and knowledge distillation, where knowledge distillation techniques can be incorporated during fine-tuning to ensure the fine-tuned model maintains similar performance to the original model on general tasks, thus balancing domain adaptability and generality. Through these specific implementation methods, this application provides an innovative approach for LLM to achieve efficient and accurate knowledge services in professional fields such as materials science, and is expected to play an important role in promoting materials science research and applications.
[0047] This embodiment provides a model fine-tuning training method. It involves finely segmenting original documents in the field of materials science to obtain logical text units; generating question-answer pairs based on these logical text units; and then fine-tuning a pre-set large language model using segmented question-answering techniques based on these pairs to obtain a large language model for materials science. This embodiment simulates the way human experts read and learn scientific literature, segmenting materials science documents into logical text units and performing structured question-answering fine-tuning on each unit. This strategy not only efficiently injects professional knowledge from the field of materials science into the LLM (Limited Language Model), but also significantly improves the model's capabilities in understanding materials science literature, extracting information, and answering professional questions through iterative learning and adaptation to domain-specific question-answering patterns. This provides an innovative approach for the model to provide efficient and accurate knowledge services in professional fields such as materials science.
[0048] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S10, the original documents in the field of materials science include text content and non-text content, and the model fine-tuning training method further includes steps S101~S104: Step S101: Parse the text content in the original document into a text format containing document structure information to obtain the parsed document.
[0049] First, the original documents in the field of materials science undergo refined processing to accommodate the needs of segmented question-and-answer fine-tuning. Original documents include, but are not limited to: academic papers: such as papers from journals like *Nature Materials*, *Advanced Materials*, and *Physical Review Letters*. Research reports: internal research reports published by various research institutions, universities, or companies. Patent documents: invention patents, utility model patents, etc., related to materials science. Experimental data reports: reports containing detailed experimental data and results on material preparation, characterization, and performance testing. Textbooks and handbooks: classic textbooks, professional handbooks, and reference materials in the field of materials science.
[0050] Understandably, parsing the original document (such as PDF, HTML, XML, etc.) into a processable text format yields the parsed document, preserving as much of its structural information as possible, such as the correspondence between chapter titles, paragraphs, lists, tables, and charts. This can be achieved using text parsing libraries (such as BeautifulSoup, lxml) or optical character recognition (OCR) technology.
[0051] Step S102: Parse the non-text content in the original document into a unified markup language format to obtain a marked document.
[0052] It should be noted that non-text content includes, but is not limited to, molecular structural formulas, chemical reaction diagrams, material characterization images (such as SEM and TEM images), and experimental setup diagrams in images; material formulations, process parameters, performance test data, yield and error statistics in tables; and various mathematical formulas, physical equations, and empirical model expressions (such as Arrhenius equations, phase diagram formulas, and strength-structure relationships). This content is typically embedded in the original document (such as PDF, Word, LaTeX, etc.) as images, vector graphics, or proprietary formats, and cannot be directly read and understood by the text model. The markup language format is a standardized Markdown format that is easy for the model to understand.
[0053] Understandably, for chemical formulas, diagrams, charts, and other content in images, optical character recognition (OCR) technology and image understanding models (such as deep learning-based image recognition networks) can be used for joint parsing. For tables in documents, table recognition algorithms (such as Tabula and Camelot) or deep learning-based table structure parsing models (such as TableNet) can be used to convert the table content into a structured Markdown table format, preserving the row and column relationships and data correspondences. For mathematical and physical formulas, formula recognition engines (such as MathPix) can be used to convert them into LaTeX or MathML formats, and further unify them into a mathematical expression format supported by Markdown.
[0054] Step S103: The parsed document is segmented according to natural paragraphs, semantic similarity, or information density to obtain initial logical text units.
[0055] It is understandable that the parsed document can be segmented according to natural paragraphs, semantic similarity, or information density to obtain initial logical text units.
[0056] In one feasible implementation, step S102 may include steps S1021 to S1023: Step S1021: Divide the parsed document into sections or paragraphs according to natural chapters or paragraphs to obtain initial logical text units.
[0057] It's worth noting that you can divide the document by natural chapters or paragraphs. This method is simple and intuitive, but it may not capture the semantic connections between paragraphs.
[0058] Step S1022, and / or, segment the sentences or paragraphs in the parsed document according to semantic relevance to obtain initial logical text units.
[0059] Understandably, segmentation based on semantic relevance is possible. Natural Language Processing (NLP) techniques (such as topic modeling and semantic similarity calculation) are used to group semantically related sentences or paragraphs into logical units. This helps ensure that each unit contains a relatively complete and independent knowledge point.
[0060] Step S1023, and / or, segment the parsed document according to the information density of preset important knowledge in a preset area to obtain initial logical text units.
[0061] It should be understood that information density-based segmentation is also possible. Logical units can be divided according to the density of technical terms, entities, or key information in the text. Regions with high information density may contain more important knowledge and can be processed as independent units.
[0062] Step S104: Match the tagged document with the initial logical text unit to obtain a logical text unit.
[0063] It should be noted that the parsed and converted non-text content (tagged document) can be precisely matched and merged with the initially segmented text units (initial logical text units) to form structured logical text units with complete semantics and multimodal information.
[0064] Specifically, matching can be performed based on the original position of charts, formulas, and tables in the original document, such as page numbers and paragraph relationships. Currently, natural language processing technology can also be used to analyze the topic relevance between text content and marked content, such as explicit references in the text like "as shown in Figure xx", "see Table xx", and "calculated according to formula xx". Furthermore, the numbering system in the document structure (such as "Figure 1", "Table 2", and "Equation (3)") can be used to establish a direct correspondence between text and marked content.
[0065] In this embodiment, the original document in the field of materials science is parsed into a text format containing document structure information to obtain the parsed document. The parsed document is then segmented according to natural chapters or paragraphs, semantic relevance, or the density of preset important knowledge within preset regions, thereby enabling fine-grained text segmentation to obtain logical text units. Furthermore, the non-text content in the original document is parsed into a unified markup language format to obtain a marked document, ensuring that the model can stably and accurately read, understand, and process subsequent inputs.
[0066] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3Step S20, the model fine-tuning training method further includes steps S201~S203: Step S201: Extract information from the logical text unit and convert the extracted information into structured question-and-answer pairs.
[0067] Understandably, for each finely segmented materials science text unit, high-quality question-and-answer pairs (Q&A pairs) are constructed or generated. These Q&A pairs are the core carriers for the model to learn knowledge in the field of materials science. Information extraction (IE) techniques can be used to automatically extract entities, relationships, and events from the text units and transform them into structured question-and-answer pairs.
[0068] Step S202: Show the structured question-and-answer pairs to the experts, and revise the structured question-and-answer pairs based on the supplementary information provided by the experts to obtain the revised question-and-answer pairs.
[0069] It should be understood that automatically generated Q&As may contain inaccuracies or incompleteness, thus requiring manual review, correction, and supplementation by domain experts. Supplementary information provided by experts can include: correcting errors, such as entity recognition errors, relation extraction errors, or inaccurate answers in the automated generation; supplementing missing information, such as implicit knowledge in the text or answers requiring reasoning; and enriching the question types, where experts can use their expertise to ask more in-depth and challenging questions to comprehensively cover the knowledge points within the text units.
[0070] Step S203: Evaluate the quality of the corrected question-answer pair according to the preset evaluation index to obtain the question-answer pair.
[0071] It should be noted that the constructed Q&A sets can also be quality-assessed to ensure their professionalism, accuracy, and coverage. Assessment metrics can include: answer accuracy (whether the answers are consistent with and correct in the original text); question relevance (whether the questions are closely related to the text units); and question diversity (whether the question types are varied and cover knowledge points of different granularities and complexities).
[0072] In one possible implementation, step S201 may include steps S2011 to S2014: Step S2011: Identify named entities in the logical text unit using information extraction technology.
[0073] Understandably, named entity recognition (NER) is performed using information extraction technology to identify named entities such as material names, elements, compounds, performance parameters, and experimental equipment.
[0074] Step S2012: Identify the relationships between the named entities.
[0075] Understandably, relation extraction techniques are used to identify relationships between entities, such as "material A has property B" or "process C prepares material D".
[0076] Step S2013: Identify key events in the logical text unit.
[0077] Understandably, event extraction techniques can be used to identify key events in materials science, such as "material synthesis," "performance testing," and "failure analysis."
[0078] Step S2014: Based on the preset material domain template library, the named entities, the relationships, and the key events are structurally transformed to obtain structured question-answer pairs.
[0079] Understandably, extracted named entities, relationships, and key events can be transformed into question-and-answer pair templates based on a pre-defined materials domain template library, resulting in structured question-and-answer pairs, such as: "What are the [properties] of [material name]?" and "How is [material name] prepared?". The pre-defined materials domain template library includes at least: a) material composition / structure / properties; b) preparation process – conditions – results; c) data retrieval from charts / tables; and d) explanation and association of formula variables. The generated question-and-answer pairs undergo expert review, and the feedback is used for template weight updates and the calculation of the question-and-answer quality score Q(u).
[0080] In this embodiment, information is extracted from logical text units and transformed into structured question-and-answer pairs; the structured question-and-answer pairs are presented to experts, and the pairs are corrected based on supplementary information provided by the experts to obtain corrected question-and-answer pairs; the corrected question-and-answer pairs are then evaluated for quality according to preset evaluation indicators, thereby obtaining more accurate, complete, and comprehensive question-and-answer pairs.
[0081] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the model fine-tuning training method of this application. Any simple transformations based on this technical concept are within the protection scope of this application.
[0082] This application also provides a model fine-tuning training device; please refer to [reference needed]. Figure 4 The model fine-tuning training device includes: Document segmentation module 10 is used to perform fine segmentation of original documents in the field of materials science to obtain logical text units; Question-answer pair generation module 20 is used to generate question-answer pairs based on the logical text unit; The fine-tuning training module 30 is used to perform segmented question-and-answer fine-tuning training on the preset large language model based on the answers to the questions, so as to obtain a large language model for materials science.
[0083] Understandably, the document segmentation module takes PDF / HTML / LaTeX as input and outputs an LTU set and its information density D(u); the question-answering generation module takes LTU as input and outputs a structured Q / A and a quality score Q(u); the fine-tuning module takes Q / A and Alpha_{u} as input and outputs a materials science-specific adaptation model. Here, the Logical Text Unit (LTU) is the smallest unit segmented according to structure / semantics / information density.
[0084] The model fine-tuning training device provided in this application, employing the model fine-tuning training method in the above embodiments, can solve the technical problem. Compared with the prior art, the beneficial effects of the model fine-tuning training device provided in this application are the same as those of the model fine-tuning training method provided in the above embodiments, and other technical features in the model fine-tuning training device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0085] This application provides a model fine-tuning training device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the model fine-tuning training method in the above embodiment 1.
[0086] The following is for reference. Figure 5 The diagram illustrates a structural schematic of a model fine-tuning training device suitable for implementing embodiments of this application. The model fine-tuning training device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5The model fine-tuning training device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0087] like Figure 5 As shown, the model fine-tuning training device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the model fine-tuning training device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the model fine-tuning training device to communicate wirelessly or wiredly with other devices to exchange data. While the figure shows model fine-tuning training devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0088] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0089] The model fine-tuning training device provided in this application, employing the model fine-tuning training method described in the above embodiments, can solve the technical problems of model fine-tuning training. Compared with the prior art, the beneficial effects of the model fine-tuning training device provided in this application are the same as those of the model fine-tuning training method provided in the above embodiments, and other technical features of this model fine-tuning training device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0090] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0091] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0092] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the model fine-tuning training method in the above embodiments.
[0093] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0094] The aforementioned computer-readable storage medium may be included in the model fine-tuning training device; or it may exist independently and not assembled into the model fine-tuning training device.
[0095] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the model fine-tuning training device, the model fine-tuning training device: performs fine segmentation of the original document in the field of materials science to obtain logical text units; generates question-answer pairs based on the logical text units; and performs segmented question-answer fine-tuning training on the preset large language model based on the question-answer pairs to obtain a large language model for materials science.
[0096] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0097] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0098] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0099] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the above-described model fine-tuning training method, and is capable of solving the technical problem. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the model fine-tuning training method provided in the above embodiments, and will not be repeated here.
[0100] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the model fine-tuning training method described above.
[0101] The computer program product provided in this application can solve the technical problem. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the model fine-tuning training method provided in the above embodiments, and will not be repeated here.
[0102] The above description is only a part of the embodiments of this application and does not limit the scope of protection of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included in the scope of protection of this application.
Claims
1. A model fine-tuning training method, characterized in that, The method includes: The original documents in the field of materials science are finely segmented to obtain logical text units; Generate question-answer pairs based on the logical text units; Based on the answers to the questions, the preset large language model is fine-tuned and trained in segments to obtain a large language model for materials science.
2. The method as described in claim 1, characterized in that, The original documents in the field of materials science include both textual and non-textual content. The step of finely segmenting the original documents in the field of materials science to obtain logical text units includes: The text content in the original document is parsed into a text format that includes document structure information to obtain the parsed document; The non-text content in the original document is parsed into a unified markup language format to obtain a marked document; The parsed document is segmented according to natural paragraphs, semantic similarity, or information density to obtain initial logical text units; The marked document is matched with the initial logical text unit to obtain the logical text unit.
3. The method as described in claim 2, characterized in that, The step of segmenting the parsed document according to natural paragraphs, semantic similarity, or information density to obtain initial logical text units includes: The parsed document is segmented according to natural chapters or paragraphs to obtain initial logical text units; And / or, the sentences or paragraphs in the parsed document are segmented according to semantic relevance to obtain initial logical text units; And / or, the parsed document is segmented according to the information density of preset important knowledge within a preset area to obtain initial logical text units.
4. The method as described in claim 1, characterized in that, The step of generating question-answer pairs based on the logical text units includes: Information is extracted from the logical text units and transformed into structured question-and-answer pairs. The structured question-and-answer pairs are presented to experts, and the structured question-and-answer pairs are revised based on the supplementary information provided by the experts to obtain revised question-and-answer pairs. The quality of the corrected question-answer pairs is evaluated based on preset evaluation indicators to obtain question-answer pairs.
5. The method as described in claim 4, characterized in that, The step of extracting information from the logical text unit and converting the extracted information into structured question-answer pairs includes: Named entities in the logical text unit are identified using information extraction technology; Identify the relationships between the named entities; Identify key events in the logical text unit; The named entities, relationships, and key events are structurally transformed using a preset material domain template library to obtain structured question-answer pairs.
6. The method as described in claim 1, characterized in that, The step of performing segmented question-and-answer fine-tuning training on the preset large language model based on the answers to the questions to obtain the large language model for materials science includes: The question and answer pairs are input into a preset large language model to generate question-and-answer output. The difference between the question-and-answer output and the preset answer in the question-and-answer pair is determined based on the loss function; The difference value is weighted according to the segment weight corresponding to different logical text units to obtain the weighted difference value; By minimizing the weighted difference values to guide the segmented question-answer fine-tuning training process of the preset large language model, a large language model for materials science is obtained.
7. A model fine-tuning training device, characterized in that, The model fine-tuning training device includes: The document segmentation module is used to perform fine segmentation of original documents in the field of materials science to obtain logical text units; The question-answer pair generation module is used to generate question-answer pairs based on the logical text units; The fine-tuning training module is used to perform segmented question-and-answer fine-tuning training on the preset large language model based on the answers to the questions, so as to obtain a large language model for materials science.
8. A model fine-tuning training device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the model fine-tuning training method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the model fine-tuning training method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the model fine-tuning training method as described in any one of claims 1 to 6.