US 11,656,867 B2
Conditioning autoregressive language model to improve code migration
Rishabh Singh, San Jose, CA (US); David Andre, San Francisco, CA (US); Bin Ni, Fremont, CA (US); and Owen Lewis, Stanford, CA (US)
Assigned to GOOGLE LLC, Mountain View, CA (US)
Filed by Google LLC, Mountain View, CA (US)
Filed on Sep. 15, 2022, as Appl. No. 17/945,376.
Application 17/945,376 is a continuation of application No. 17/136,968, filed on Dec. 29, 2020, granted, now 11,481,210.
Prior Publication US 2023/0018088 A1, Jan. 19, 2023
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 8/71 (2018.01); G06F 40/20 (2020.01); G06N 20/00 (2019.01)
CPC G06F 8/71 (2013.01) [G06F 40/20 (2020.01); G06N 20/00 (2019.01)] 19 Claims
OG exemplary drawing
 
1. A method implemented using one or more processors, comprising:
conditioning a language model based on one or more demonstration tuples,
wherein one or more of the demonstration tuples includes a first version of a first source code snippet that exists prior to a planned migration and a second version of the first source code snippet that is desired after the planned migration, and
wherein the language model is trained on one or more corpuses of source code and one or more corpuses of natural language documentation on the subject of computer programming, and
wherein the conditioning includes processing one or more of the demonstration tuples to generate one or more intermediate embeddings;
processing a pre-migration version of a source code file based on the conditioned language model, wherein processing the pre-migration version of the source code file includes processing one or more of the intermediate embeddings in conjunction with the pre-migration version of the source code file as inputs for the conditioned language model for one or more subsequent iterations; and
based on the processing of the pre-migration version of the source code file, generating a post-migration version of the source code file.