Patents
Literature
Patsnap Eureka AI that helps you search prior art, draft patents, and assess FTO risks, powered by patent and scientific literature data.

221 results about "Correctness" patented technology

In theoretical computer science, correctness of an algorithm is asserted when it is said that the algorithm is correct with respect to a specification. Functional correctness refers to the input-output behavior of the algorithm (i.e., for each input it produces the expected output).

Multi-agent dynamic arrangement method based on multi-modal analysis and adaptive retrieval

The invention discloses a multi-agent dynamic arrangement method based on multi-modal analysis and adaptive retrieval, and relates to the technical field of artificial intelligence and information retrieval. Comprising the steps of S1, converting a text, an image, structured data and voice content input by a user into a unified multi-mode semantic representation, S2, converting the unified multi-mode semantic representation into a specific execution process, and S3, automatically scheduling a reasoning agent, a knowledge obtaining agent and an execution agent according to DAG nodes, task elements and available resources, and obtaining the task elements and the execution agent according to the reasoning agent, the knowledge obtaining agent and the execution agent. S4, after task process construction and agent arrangement are completed, dynamic retrieval, evidence convergence and strategy optimization are carried out on information requirements related to a user task, so that a reasoning agent obtains complete knowledge support with consistent context, and S5, knowledge evidence is combined with a task process, so that the task process is completed. The method comprises the following steps: step S6, implementing problem solving, strategy generation and task closed-loop execution through a reasoning agent, step S6, performing actual operation on a target task by an execution agent according to an executable instruction sequence output by the reasoning agent, and outputting a result, and step S7, performing result verification according to an output result returned by the execution agent, and the correctness, integrity and consistency of an output result are examined through rule verification, model evaluation and evidence alignment.
Owner:INSPUR GROUP CO LTD +1

Large model tool calling hierarchical dynamic optimization method and system based on reinforcement learning

The invention discloses a large model tool calling hierarchical dynamic optimization method and system based on reinforcement learning, and provides a model training mode based on a hierarchical decoupling architecture, which is characterized in that a reward mechanism is adjusted to form a format + tool calling correctness reward, so that the reward efficiency is improved. The correctness rewards are decomposed into three-level verification of names, parameters and values, and formats and correctness reward weights are dynamically adjusted in the training process; thus, the model realizes progressive training from basic structure learning to complex strategy optimization, the generalization ability of the model is enhanced, and fine-grained feedback in the training process is also realized, so that the model can perform gradient updating aiming at specific errors, and the accuracy of the model is improved. The problems of low training efficiency and poor model output accuracy in the traditional technology are avoided; therefore, according to the method, the generalization ability, the training efficiency and the output accuracy of the model are improved, so that the method is very suitable for large-scale application and popularization.
Owner:TIANFU JIANGXI LAB

Large language model training method and device

The embodiment of the invention provides a big language model training method and device, and aims to enable a big language model to have the capability of processing complex services and train the reasoning capability of the big language model. Training is carried out in two stages. In the first stage, a thinking chain is used as supervision fine tuning of a supervision signal, and in the process, the thinking chain can be determined by adopting generation, evaluation and correction modes of a fine-grained single action, so that the flexibility and depth of a reasoning path are improved. The second stage is a reinforcement learning stage, model rewards in the reinforcement learning process comprise correctness rewards and length rewards, the big language model is encouraged to generate a longer and reliable reasoning path, and reward abuse is avoided. According to the scheme, the processing reliability and accuracy of the large language model suitable for complex services can be improved.
Owner:FUDAN UNIVERSITY +1

Method and system for generating and optimizing CUDA (Compute Unified Device Architecture) code based on multi-dimensional feature search and enhancement

The invention provides a CUDA code generation and optimization method and system for multi-dimensional feature search and enhancement, and the method comprises the steps: generating an initial CUDA code through a large language model based on task description and GPU hardware parameters; executing triple verification and a feedback mechanism on the initial CUDA code; according to feedback information of triple verification, optimizing CUDA codes through multi-dimensional feature search; based on error information, adjusting large language model input to regenerate codes; dynamically selecting an optimization strategy based on a performance index, wherein the optimization strategy comprises a thread block size and a memory access mode; and iteratively executing the steps until the CUDA code which passes triple verification and meets the target performance is generated. According to the method, the code features of the CUDA code are analyzed, and a triple verification and feedback mechanism including compilation feasibility, logic correctness and performance during execution is formed, so that an automatic evaluation process of the CUDA code is realized, and the problems that the CUDA code optimization process is difficult to be automated and an optimization target is lacked in the CUDA code optimization process are solved.
Owner:SHANGHAI JIAOTONG UNIV

Large model active tool calling method and system based on multi-step reasoning

The invention provides a large model active tool calling method and system based on multi-step reasoning, and relates to the technical field of artificial intelligence, and the method comprises the steps: collecting tool information, generating a structured tool description set, automatically generating an executable code sample and corresponding natural language explanation based on the tool description set, and constructing a reverse training data set; the method comprises the following steps of: marking tool use necessity tags in a real problem, prompting a large model to generate a multi-step reasoning path combined with a natural language and codes, verifying and filtering the correctness of the reasoning path, and constructing a forward training data set; and performing three-stage training on the large model based on the reverse training data set and the forward training data set. According to the method, the problem that the active tool calling capability of a large model is insufficient is solved, and the code execution rate and problem solving efficiency of a complex reasoning task are improved.
Owner:李俊涛

Natural language question and answer framework, method and device based on self-reflection

The invention relates to the technical field of large language models, in particular to a natural language question and answer framework, method and device based on self-reflection, and can solve the problem that large language models LLMs (Language Models) such as ChatGPT and PaLM in the prior art show excellent performance in various language understanding and generation tasks to a certain extent, and the problem that the Language Models are difficult to understand and generate can be solved to a certain extent. However, the ability of the method in the aspects of complex reasoning and complex knowledge utilization is still lower than the human level. The framework comprises: a thinking chain module for receiving an input question, outputting a model thinking process according to the input question, and obtaining and outputting an answer at the end; the persuaser module firstly evaluates the correctness of the answer and the reasoning step, and outputs a corrected reasoning path to the responder module if an error exists in the reasoning step; and the answerer module is used for providing answers according to the corrected reasoning path and self-prompted question type information, and optimizing the output accuracy of the large model through repeated iteration.
Owner:SHENZHEN UNIV +1

Automatic program repairing method combining executable invariant and differential signal

The invention relates to the technical field of program repair, in particular to an executable invariant and differential signal combined automatic program repair method, which comprises the following steps of: receiving a to-be-repaired program and a test set, and calling a large language model to generate a plurality of candidate patches; forming an entry behavior specification list according to the repair intention description; generating a plurality of executable invariant assertions and injecting the executable invariant assertions into the target function or the calling point, and generating an invariant assertion injection record table; generating a test case covering the boundary condition and the abnormal scene based on the large language model; collecting an execution signal when the candidate patch is operated; converting the patch difference into semantic editing features, calculating an editing stability index, and calculating an overall semantic consistency score of the candidate patches according to the support degree of the standard bar; and calculating an overall comprehensive score of the candidate patches, and outputting an optimal patch according to the overall comprehensive score of the candidate patches. According to the method, the proportion of overfitting patches can be effectively reduced, the patch repairing accuracy is improved, the interpretability is high, and the universality is good.
Owner:SOUTH CHINA UNIV OF TECH

Training method of code generation model and code generation method and system

The invention provides a code generation model training method and a code generation method and system.The code generation model training method comprises the steps that a first training data set is obtained, the first training data set comprises a first data pair, and the first data pair comprises a first code problem sample and a first test case corresponding to the first code problem sample; inputting the first code question sample into a pre-trained basic network model to obtain a first prediction code answer corresponding to the first code question sample, and performing correctness verification on the first prediction code answer based on the first test case to obtain a first verification result, and performing reinforcement learning training on the basic network model according to the first verification result to obtain a code generation model. The basic network model is trained by combining the first verification result and reinforcement learning, so that the correctness and robustness of generating corresponding codes by the code generation model can be better improved. And the code capability of the code generation model is improved.
Owner:ALIPAY (HANGZHOU) INFORMATION TECH CO LTD

Text2SQL data set generation method based on dynamic difficulty adjustment

The invention discloses a Text2SQL (Structured Query Language) data set generation method based on dynamic difficulty adjustment. According to the method, a complexity quantification method is provided, and the complexity of SQL statements and Text texts is evaluated. A Text2SQL data set is generated based on a cue word generation template by using a large language model, and a dynamic constraint part is introduced into the cue word generation template. And performing complexity evaluation on data generated by the large language model through a complexity quantification method, comparing the data with preset difficulty target distribution, modifying dynamic constraints, and guiding the model to generate data conforming to expected target distribution. Meanwhile, a verification and correction template is also set, so that the execution correctness and semantic correctness of the generated data are ensured, the efficiency and quality of data set construction are improved, the diversity and pertinence of the data set are ensured, more comprehensive training data better fitting practical application is provided for the model, and the training efficiency is improved. And the generalization ability and the performance of the Text2SQL model in different scenes can be improved.
Owner:HANGZHOU DIANZI UNIV

Verification excitation automatic generation method and system based on backtracking thinking tree

The invention discloses an automatic verification excitation generation method based on a backtracking thinking tree, and the method comprises the steps: constructing a backtracking thinking tree frame based on a self-feedback mechanism based on a thinking tree for a to-be-verified processor function; under the backtracking thinking tree framework, decoupling a to-be-verified function from top to bottom through a large language model, and recursively decomposing the whole to-be-verified function into function points capable of being independently verified layer by layer through a tree structure; according to each function point, determining a normal function and a boundary of each function point, and for each function point, generating verification excitation layer by layer in a tree structure; after the verification excitation is generated, self-verification and self-backtracking are carried out layer by layer through a tree structure, and finally, the generated verification excitation is executed on the processor design to verify the correctness of the processor function. According to the method and the system, the function verification efficiency and the verification coverage rate of the processor are remarkably improved.
Owner:INST OF COMPUTING TECH CHINESE ACAD OF SCI

Automatic debugging system and method for numerical error of deep learning compiler

The invention discloses an automatic debugging system and method for deep learning compiler numerical errors, and the system comprises a model analysis module, a semantic matching module, a tracking module and a verification module, the analysis module receives and analyzes a defect model with compilation errors, carries out the extraction of the input of the defect model, sub-functions, and operators of each sub-function, and carries out the verification of the compilation errors. Constructing a symbolic calculation graph and an index table before and after optimization of the defect model; the semantic matching module performs hash processing on each node in the symbolic calculation graph, matches equivalent nodes before and after optimization by comparing the approximation degree of hash values between the nodes, and generates a matching relationship between the nodes and the equivalent nodes; the tracking module compares the data streams of the models before and after optimization according to the matching relationship, generates an error cumulant diagram by tracking the generation and propagation process of errors, and locates the modes causing the errors and compiler optimization transformation causing mode rewriting; and the inspection module inspects the correctness of the positioning result and finally outputs root information after inspection. According to the method, each computing node of the neural network model is quantified into a hash value capable of measuring the distance, compared with an existing positioning technology, the method can better adapt to the scene of a complex deep learning model, and compared with an incremental debugging technology, the error positioning speed and accuracy are remarkably improved.
Owner:SHANGHAI JIAOTONG UNIV

Intelligent question answering method and system based on multi-model collaboration

The invention discloses an intelligent question answering method and system based on multi-model collaboration. The method comprises the following steps: S1, preprocessing a question text input by a user; s2, performing collaborative reasoning on the preprocessed text through large-scale language models, and generating candidate answers by utilizing complementarity among the large-scale language models; s3, a question type is judged based on a semantic classification and rule feature combined judgment method; s4, when the question type is closed, counting the number of votes supported by the large language model of the candidate answers through a confidence-based dynamic voting method, and taking the candidate answer with the highest number of votes as a final answer; when the question type is open, screening the candidate answers through a consistency quantitative evaluation method and outputting a final answer; and S5, dynamically adjusting the weight of the large language model based on the correctness data of the output final answer, and optimizing the collaborative reasoning ability of the large language model, thereby effectively improving the efficiency and precision of outputting question and answer results by multiple models.
Owner:SHENZHEN SED WIRELESS COMM TECH

Model training method and device, electronic equipment and storage medium

The embodiment of the invention discloses a model training method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining sample data sets of a plurality of training stages, and carrying out the sorting of the plurality of training stages according to the training difficulty of the sample data sets from easy to difficult; in each training stage, training the initial model based on the sample data set to obtain a training model; inputting the sample data set into a training model for multi-round reasoning to obtain a plurality of reasoning results output by the training model in each round of reasoning, determining positive and negative samples in the plurality of reasoning results based on the correctness of each reasoning result, and optimizing the training model based on the positive and negative samples; reinforcement learning is carried out on the optimized training model to obtain a target model, and the target model is used as an initial model of the next training stage until the multiple training stages are finished; according to the embodiment of the invention, the model reasoning accuracy can be improved.
Owner:TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Large model code translation method and device fusing code functions and styles

The invention provides a large model code translation method and device fusing code functions and styles, and relates to the technical field of natural language processing. The method comprises the steps that code pairs composed of source codes and target codes are obtained from an online programming platform, the code pairs are processed according to similarity retrieval, fine granularity scoring and difference testing, and a function consistency data set is constructed; performing functional learning training on the large model according to the functional consistency data set and an instruction fine tuning method to obtain a large model subjected to functional learning training; obtaining a source code, generating positive sample translation and negative sample translation of the source code, and constructing a style-oriented data set; and according to the style-oriented data set, style learning training is carried out on the large model subjected to function learning training, and a trained code translation large model is obtained. According to the method, a low-cost and high-efficiency code translation model is developed around a large-scale language model, and the correctness and readability of translated codes are enhanced.
Owner:HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)

ML-DSA module reduction method and device based on improved Barrett reduction

The invention provides an ML-DSA module reduction method and device based on improved Barrett reduction, and the method comprises the steps: dividing an input signal into a first preset bit signal and a second preset bit signal according to the bit width, and carrying out the shift addition operation of the first preset bit signal, so as to generate a middle quotient value; generating a first preset bit remainder based on the intermediate value; performing splicing processing on the first preset bit remainder and the second preset bit signal to generate an intermediate remainder; and performing a correction operation on the intermediate remainder to output a remainder result. According to the operation method, an input signal is processed in a high-order mode and a low-order mode, and the bit width participating in multiplication and shifting operation is reduced; according to the method, a precomputation constant is optimized, the number of times of addition is reduced, and wide bit operation in a critical path is eliminated by means of segmentation processing and register insertion, so that the critical path is shortened, and the maximum operation frequency of a system clock is improved; and through error analysis and range limitation, the correctness of a module reduction result is ensured.
Owner:NANJING UNIV

Self-evolution training method for multiple large model agents

The invention belongs to the technical field of artificial intelligence and machine learning, and particularly relates to a self-evolution training method for multiple large model agents, which comprises the following specific steps: S1, diversified structured expression starting design: pre-defining multiple structured expression forms before a generation link; s2, multi-track cooperative generation: a plurality of agents are subjected to labor division according to roles, candidate results are generated in parallel under a plurality of preset structured expression forms, and a plurality of cooperative tracks of different styles are formed; and S3, performing three-dimensional quantitative scoring: performing quantitative evaluation on each collaborative trajectory from a correctness dimension, a communication cost dimension and a readability dimension. According to the method, the Agent is forced to adopt low token consumption forms such as a table and a key point list through diversified structured starting, so that long paragraphs can be avoided from a generation stage.
Owner:GUANGDONG RUIGAO SHIPPING CO LTD +1

Data processing method and device

The embodiment of the invention provides a data processing method and device, and the method comprises the steps: determining at least one question reasoning step corresponding to an initial question, and obtaining a reasoning answer corresponding to the initial question based on the at least one question reasoning step; according to an initial answer corresponding to the initial question, performing correctness verification on the at least one question reasoning step and the reasoning answer to obtain a verification result; target data are obtained according to the verification result, the initial question and the at least one question reasoning step, and the target data comprise the initial question, a target reasoning step and a target answer corresponding to the initial question; compared with a simple question-answer pair containing an initial question and an initial answer, the target data has the advantage that a target reasoning step is added, so that extension of a long reasoning link for the simple question-answer pair is realized, and effective training data is provided for improving the model reasoning capability subsequently.
Owner:ALIBABA CLOUD FEITIAN (HANGZHOU) CLOUD COMPUTING TECH CO LTD

Large model context conflict resolution method and device based on dynamic coordination decoding

The invention discloses a large model context conflict resolution method and device based on dynamic coordination decoding, and relates to the technical field of natural language processing. The method comprises the following steps: acquiring a question text, a target context and a Transform model for answering a question; based on the question text token, the target context token, the generation token and a plurality of parallel attention heads of a Transform model, determining context loyalty, and determining a conflict prediction result according to the context loyalty; and when the conflict prediction result is true, adjusting a balance weight in decoding based on a dynamic adjustment mechanism, determining dynamic comparison decoding distribution according to the adjusted balance weight, and outputting an answer text corresponding to the question text according to the dynamic comparison decoding distribution. By adopting the answer generation method and device, the correctness and robustness of answer generation can be improved.
Owner:HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)

System behavior simulation and logic verification method and system based on state machine model

The invention provides a system behavior simulation and logic verification method and system based on a state machine model. The method comprises the following steps: constructing a state machine model of system behaviors; generating an intermediate representation code embedded with a time constraint check function, wherein the time constraint calculates a state transition time upper limit based on a Lyapunov stability model; compiling the executable code framework; receiving real-time operation data through a human-in-the-loop interface, mapping the real-time operation data into an input event, driving simulation operation, and dynamically rendering a state conversion process by adopting a virtual reality technology; verifying the behavior correctness based on the state coverage and a logic closed-loop index, wherein the logic closed-loop detects a deadlock risk through an improved banker algorithm; and if the verification is not passed, the recent valid state is traced back, the model is adjusted, and the verification is executed again. According to the method, the problems of inaccurate time sequence verification, insufficient real-time interaction, single verification index and the like in a traditional method are solved, and the accuracy and reliability of system simulation are remarkably improved.
Owner:CHINA STATE SHIPBUILDING CORP LTD RESEARCH INSTITUTE 719

Systems and methods for automated software code generation

A system and method for automatic software code generation utilizing one or more predictive model trained on code-related data, said code-related data involving obtained features and aspects from arbitrary code-related data. At least one instruction, such as natural language description(s), of at least one of desired code components and features can be processed by at least one of the at least one predictive models to produce corresponding code that matches at least one intent behind the at least one instruction. The generated code is analyzed and tested for correctness. At least one portion of the at least one trained predictive model leverages techniques such as attention mechanisms and transfer learning to improve contextual code generation. The present technology can be at least enabled with version control and codebases to ensure seamless integration with existing workflows. Automated code generation improves programmer productivity and enables rapid software prototyping.
Owner:CODEVALET INC

Code generation method and device, electronic equipment and storage medium

The invention relates to a code generation method and device, electronic equipment and a storage medium. Comprising the steps of obtaining a programming problem data set and a code generated by a target model, and obtaining a data set with rewards; based on an MSE regression training strategy and a comparison loss training strategy, training a reward model by using the data set with the reward to obtain a code reward model; and obtaining programming problem training data, sorting the programming problem training data by using the code reward model to obtain sorted training data, and obtaining a final reward according to the sorted training data, a reward model score output by the code reward model and a preset unit test score, and reinforcement learning training is carried out on a preset language model to obtain a code generation model, so that codes meeting preset performance requirements are generated through the code generation model. Therefore, the problems that in the prior art, the model reasoning cost is high, and it is difficult to capture the intermediate state and partial correctness in the code execution process to evaluate the code quality in a fine-grained mode are solved.
Owner:TSINGHUA UNIVERSITY +1

Large language model-based understandable evaluation index-oriented decompilation code optimization method

The invention discloses a large language model-based understandability evaluation index-oriented decompilation code optimization method, which mainly aims at Java decompilation codes, and comprises the following steps of: firstly, designing and realizing an understandability evaluation index to realize quantitative analysis on the understandability of the decompilation codes; on the basis, a grammar correctness and semantic consistency checking mechanism is introduced in the method, on the premise that code grammar correctness and semantic consistency before and after optimization are guaranteed, optimizable fragments in codes are automatically recognized through an abstract syntax tree and added into cue words, and a large language model is guided to optimize decompiled codes. Furthermore, quantitative comparison is performed on codes before and after optimization through evaluation indexes, and an iterative optimization process is controlled based on a comparison result. According to the method, the decompilation code can be optimized, the understandability of the decompilation code is improved, an index-oriented improvement thought can be provided for a decompiler developer, and the method can be widely applied to reverse engineering, safety analysis and other scenes.
Owner:NANJING UNIV

Code generation method based on reasoning time extension

The invention relates to a code generation method based on reasoning time extension. The method comprises the following steps: 1, in a scene without external information: step 1, generating an initial code draft with API (Application Program Interface) calling; 2, the large model considers the influence of PythonAPI version evolution on code migration according to a given rough code, library requirements and version constraints, and generates a refined code with correct API calling; and 2, introducing a rough code retrieval scene by using external information: step 1, capturing a Python library from PyPI and GitHub, and constructing an external knowledge base; the method comprises the following steps of: 1, generating a rough code snippet, 2, generating a rough code snippet, and 3, generating a refined code snippet subjected to knowledge enhancement by a large model according to a given rough code, library requirements, version constraints and retrieved knowledge snippets. The method can improve the correctness of the API, is compatible with a deployment standard, and improves the code generation capability of a large model when the large model deals with API demand evolution.
Owner:SOUTHEAST UNIV

Code generation method and device and computing equipment

The invention discloses a code generation method and device and computing equipment, and the method comprises the steps: processing a received input content through a universal coding model, and obtaining a context representation; the universal coding model is obtained by training the training sample data of multiple programming languages; selecting a target expert adapter from a plurality of expert adapters according to the context representation; different expert adapters are obtained by training the training sample data of different programming languages; processing the context representation by using a target expert adapter to obtain language detailed features; and fusing the context representation and the language detailed features, and generating a target code according to features obtained through fusion. By means of the mode, the universal features and the unique features of the specific programming language are fused for code generation, the correctness of code generation can be improved, part of expert adapters are lightly activated instead of all expert adapters, the code generation speed can be increased, and calculation consumption can also be reduced.
Owner:DIGITAL TRADING SCI & TECH (BEIJING) CO LTD

Formal verification method and device for state transition implementation code and program product

The invention provides a formal verification method and device for state transition implementation codes and a program product, and the method comprises the steps: compiling a first state transition function implemented by a C language Switch Case statement to obtain a bit code file; obtaining a Cryptol file, wherein the Cryptol file comprises a second state transfer function which is realized by using a Cryptol programming language; acquiring a first input parameter set and a first output value set corresponding to the first state transfer function, and acquiring a second input parameter set and a second output value set corresponding to the second state transfer function; simulating state transition function symbolic execution based on the first output value set, the second output value set, the first input parameter set and the second input parameter set, converting the state transition function symbolic execution into a satisfiability model theory problem, and solving the satisfiability model theory problem through an external solver to obtain a verification result of a state transition implementation code; the problem that whether state transition is implemented correctly or not cannot be guaranteed only through a manual checking mode can be solved, and the state transition code implementation correctness is guaranteed.
Owner:BEIJING UNIV OF POSTS & TELECOMM

Question and answer method, training method of question and answer large model, related equipment and program product

The invention discloses a question and answer method, a training method of a question and answer large model, related equipment and a program product, and adopts a retrieval enhancement generation scheme based on the large model, and answer content and knowledge reference sources can be generated at the same time. The adopted large model is trained through reinforcement learning in advance, and in order to improve the correctness and factuality of knowledge reference sources generated by the large model, a reward function in the reinforcement learning process is determined based on reference consistency and / or fact consistency. The reference consistency is used for encouraging the knowledge reference source generated by the model to keep consistent with the knowledge reference source in the truth value label, and the fact consistency is used for encouraging the answer content generated by the model to keep consistent with the semantics of the knowledge fragment corresponding to the generated knowledge reference source. By performing reinforcement learning training on the large model according to the reward function, the accuracy and reliability of the generated content of the large model can be improved, and the illusion problem of the large model can be effectively relieved.
Owner:IFLYTEK CO LTD +1

Thinking chain generation method and device, equipment and storage medium

The invention relates to the technical field of large language model optimization, and discloses a thinking chain generation method, device and equipment and a storage medium, and the method comprises the steps: constructing a parameter difference matrix and extracting a parameter change direction vector through comparing the parameter difference between a basic model for generating a long thinking chain and a target model for generating a short thinking chain; establishing a controllable continuous reasoning space; a low-rank matrix aligned with a direction vector is generated by utilizing a low-rank fine tuning technology, and the updating weight of the low-rank matrix is controlled by adjusting a normalization factor, so that the basic model can dynamically generate a thinking chain with adaptive length under different task complexity, and the optimal matching of the reasoning depth and the task requirement is realized. According to the method, the problems of redundant calculation and inference insufficiency caused by fixed threshold truncation and parameter stiffness in the prior art are solved, and the efficiency and correctness balance capability of the model in scenes such as intelligent question answering and automatic inference is remarkably improved.
Owner:PEKING UNIV

Python type error repair method and system based on large model

The invention belongs to the technical field of software code automatic repair, and discloses a Python type error repair method based on a large model, which comprises the following steps of: 1, acquiring an error code segment, and running a test case to obtain error information; 2, a repair task is decoupled into three sub-tasks of error understanding, information collection and self-verification and patch generation; 3, inputting the error information description into a large language model to generate a repair hypothesis; 4, analyzing a repair hypothesis, identifying missing repair elements, retrieving a code file, and complementing the repair elements according to a static analysis result and a call chain; 5, verifying the consistency and integrity between the restoration hypothesis and the complementation information through a self-verification agent, generating feedback information if the information is insufficient or conflicts exist, and triggering preorder task iteration; and 6, generating a patch through a patch generation agent according to the verified repair elements, and verifying the correctness of the patch through automatic testing. According to the method, the overall repair accuracy is improved.
Owner:HANGZHOU DIANZI UNIV

Code large model security reinforcement method based on knowledge distillation and co-decoding

The invention provides a large code model security reinforcement method based on knowledge distillation and co-decoding. The method comprises the following steps: selecting a basic model and an optimal model in any model family; selecting any code snippet data set as C, performing functional correctness alignment on the basic model and the optimal model by adopting a knowledge distillation method, then training the aligned basic model, and finally obtaining Q; selecting a plurality of vulnerability data pairs to form a vulnerability data set, and preprocessing the vulnerability data set by adopting an oversampling strategy to obtain a security reinforcement training set; designing a safety reinforcement loss function # imgabs0 #, and training Q by adopting a low-rank adaptation method and # imgabs1 # to obtain a final safety reinforcement basic model M; and selecting the target model X from the model family, and embedding the M into the X. According to the method, the security of the large code model during development can be effectively improved, the large code model does not need to be trained again or fine-tuned, and the development cost is greatly reduced.
Owner:CHONGQING UNIV