Method and device for generating code error correction model, electronic equipment and medium

CN118747133AActive Publication Date: 2024-10-08BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410961695.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-10-08
Estimated Expiration
2044-07-17

AI Technical Summary

Technical Problem

The prediction accuracy of existing code error correction models is low, mainly because the number of correct code segments far exceeds the incorrect code segments, resulting in the loss weight of correct code segments during the training process being too high, affecting the prediction ability of the model.

Method used

Continue pre-training the pre-trained language model by using a sample set of the target programming language, and determine the masked loss by masking a part of the correct code segment, reducing the loss weight of the correct code segment, thereby adjusting the parameters of the language model , improve the prediction accuracy of the code error correction model.

Benefits of technology

It improves the prediction accuracy of the code error correction model, saves training time, reduces the amount of calculations required to calculate the total loss, and shortens the number of training rounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118747133A_ABST
    Figure CN118747133A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a method and device for generating a code error correction model, electronic equipment and a medium. The method includes continuing pre-training a pre-trained language model using a first set of samples of a target programming language. The method further includes determining a masked loss of the continually pre-trained language model by masking a portion of the correct code segment based on a second set of samples of the target programming language, each second sample in the second set of samples including an error code segment and a correct code segment. Further, the method includes training the continually pre-trained language model according to the masked loss to generate a code error correction model. According to the method disclosed by the invention, the code error correction accuracy can be remarkably improved, and meanwhile, the time consumption for generating the code error correction model is reduced.
Need to check novelty before this filing date? Find Prior Art

Citation Information

Patent Citations

  • Processing method for pre-training language model, and spoken language understanding system

    CN114023306A

  • Text error correction model training method and device and text error correction method and device

    CN114048733A

  • Code pre-training model training method based on program dependency graph prediction

    CN116643759A

  • Systems and methods for code understanding and generation

    US20220382527A1

  • Iterative neural code translation

    US20240184555A1