US 12,277,408 B2
Using indentation to trim output of a language synthesis model
Johan Sebastian Heesemann Rosenkilde, Birkerød (DK); Albert Ziegler, Uppsala (SE); Oegerikus De Moor, Tas-Sliema (MT); Maksym Taran, Scottsdale, AZ (US); Edward Emil Aftandilian, Sunnyvale, CA (US); Arjuna Ganesh Sittampalam, St Neots (GB); and Krzysztof Stanisław Cieślak, Lódź (PL)
Assigned to Microsoft Technology Licensing, LLC, Redmond, WA (US)
Filed by Microsoft Technology Licensing, LLC, Redmond, WA (US)
Filed on Jun. 29, 2022, as Appl. No. 17/853,105.
Prior Publication US 2024/0004619 A1, Jan. 4, 2024
Int. Cl. G06F 9/44 (2018.01); G06F 8/33 (2018.01); G06F 8/35 (2018.01)
CPC G06F 8/35 (2013.01) [G06F 8/33 (2013.01)] 18 Claims
OG exemplary drawing
 
1. A method, implemented at a computer system that includes a processor, for using indentation to trim output of a language synthesis model, the method comprising:
determining a first indentation level associated with a location of a cursor within an editor buffer that is displayed at the computer system;
identifying a block of one or more lines from an output from a language synthesis model, each line in the block of one or more lines meeting at least one criterion from a set of criteria, the set of criteria including:
a first criterion that the line is an initial line in the output from the language synthesis model,
a second criterion that the line has a second indentation level that is greater than the first indentation level, and
a third criterion that the line contains a continuation token;
identifying a particular line, immediately following the block of one or more lines, that does not meet any criterion from the set of criteria;
based on having identified the particular line,
trimming the output from the language synthesis model from the particular line onward; and
stopping generation of the output by the language synthesis model; and
inserting the block of one or more lines at the location of the cursor within the editor buffer at the computer system.