Extreme language model compression with optimal sub-words and shared projections

US12260340B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-12260340-B2
Application numberUS-202318471866-A
CountryUS
Kind codeB2
Filing dateSep 21, 2023
Priority dateJan 22, 2020
Publication dateMar 25, 2025
Grant dateMar 25, 2025

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Provided is a knowledge distillation technique for training a student language model that, relative to a larger teacher language model, has a significantly smaller vocabulary, lower embedding dimensions, and/or hidden state dimensions. Specifically, aspects of the present disclosure are directed to a dual-training mechanism that trains the teacher and student language models simultaneously to obtain optimal word embeddings for the student vocabulary. In some implementations, this approach can be combined with learning shared projection matrices that transfer layer-wise knowledge from the teacher language model to the student language model. Example experimental results have also demonstrated higher compression efficiency and accuracy when compared with other state-of-the-art compression techniques, including the ability to compress the BERT BASE model by more than 60×, with only a minor drop in downstream task metrics, resulting in a language model with a footprint of under 7 MB.

First claim

Opening claim text (preview).

What is claimed is: 1. A computing system for training a machine-learned model, the computing system comprising: one or more processors; and one or more non-transitory computer-readable media that collectively store: a first language model comprising one or more transformer layers, wherein the first language model includes a plurality of first language model parameters, wherein each first language model parameter of the plurality of first language model parameters is associated with at least one transformer layer of the one or more transformer layers of the first language model; a second language model comprising one or more transformer layers, wherein the second language model includes a plurality of second language model parameters, wherein each second language model parameter of the plurality of second language model parameters is associated with at least one transformer layer of the one or more transformer layers of the second language model, wherein the one or more transformer layers of the second language model are of a different dimension than the one or more transformer layers of the first language model, and instructions that, when executed by the one or more processors, cause the computing system to perform operations, the operations comprising: projecting the first language model parameters into a shared space with the second language model parameters; and training the second language model using a loss function based on a comparison of the projected first language model parameters and the second language model parameters. 2. The computing system of claim 1 , wherein the loss function is a mean square error loss function. 3. The computing system of claim 1 , the instructions further comprising: evaluating a second loss function based on the first language model parameters and the second language model parameters; and training the second language model based on the second loss function. 4. The computing system of claim 1 , wherein the first language model is a teacher language model and the second language model is a student language model. 5. The computing system of claim 4 , wherein a dimension of the one or more transformer layers of the second language model is smaller than a dimension of the one or more transformer layers of the first language model. 6. The computing system of claim 5 , wherein projecting the first language model parameters into the shared space with the second language model parameters includes down projecting the first language model parameters into the dimension of the one or more transformer layers of the second language model. 7. The computing system of claim 1 , wherein the first language model is a student language model and the second language model is a teacher language model. 8. The computing system of claim 7 , wherein a dimension of the one or more transformer layers of the second language model is larger than a dimension of the one or more transformer layers of the first language model. 9. The computing system of claim 8 , wherein projecting the first language model parameters into the shared space with the second language model parameters includes up projecting the first language model parameters into the dimension of the one or more transformer layers of the second language model. 10. A computer-implemented method for training a machine-learned model, the method comprising: projecting a plurality of first language model parameters into a shared space with a plurality of second language model parameters, wherein: a first language model comprises one or more transformer layers, wherein the first language model includes a plurality of first language model parameters, wherein each first language model parameter of the plurality of first language model parameters is associated with at least one transformer layer of the one or more transformer layers of the first language model; a second language model comprises one or more transformer layers, wherein the second language model includes the plurality of second language model parameters, wherein each second language model parameter of the plurality of second language model parameters is associated with at least one transformer layer of the one or more transformer layers of the second language model, wherein the one or more transformer layers of the second language model are of a different dimension than the one or more transformer layers of the first language model; and training the second language model using a loss function based on a comparison of the projected first language model parameters and the second language model parameters. 11. The method of claim 10 , wherein the loss function is a mean square error loss function. 12. The method of claim 10 , the method comprising: evaluating a second loss function based on the first language model parameters and the second language model parameters; and training the second language model based on the second loss function. 13. The method of claim 10 , wherein the first language model is a teacher language model and the second language model is a student language model. 14. The method of claim 13 , wherein a dimension of the one or more transformer layers of the second language model is smaller than a dimension of the one or more transformer layers of the first language model. 15. The method of claim 14 , wherein projecting the first language model parameters into the shared space with the second language model parameters includes down projecting the first language model parameters into the dimension of the one or more transformer layers of the second language model. 16. The method of claim 10 , wherein the first language model is a student language model and the second language model is a teacher language model. 17. The method of claim 16 , wherein a dimension of the one or more transformer layers of the second language model is larger than a dimension of the one or more transformer layers of the first language model. 18. The method of claim 17 , wherein projecting the first language model parameters into the shared space with the second language model parameters includes up projecting the first language model parameters into the dimension of the one or more transformer layers of the second language model. 19. A computing system for executing a student machine-learned model having parameters aligned with those of a teacher machine-learned model, the computing system comprising: one or more processors; and one or more non-transitory computer-readable media that collectively store: a student language model comprising one or more transformer layers, wherein the student language model includes a plurality of student language model parameters; wherein the student language model was trained using a loss function based on a comparison of the plurality of student language model parameters and a plurality of teacher language model parameters in a shared space, wherein the plurality of student language model parameters were projected into the shared space, the plurality of teacher language model parameters were projected into the shared space, or the plurality of student language model parameters and the plurality of teacher language model parameters were projected into the shared space; and instructions that, when executed by the one or more processors, cause the computing system to perform operations, the operations comprising: generating an output sequence by processing an input sequence using the student machine-learned model. 20. The computing system of claim 19 , w

Assignees

Inventors

Classifications

  • Transfer learning · CPC title

  • Quantised networks; Sparse networks; Compressed networks · CPC title

  • Supervised learning · CPC title

  • Combinations of networks · CPC title

  • G06F40/284Primary

    Lexical analysis, e.g. tokenisation or collocates · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US12260340B2 cover?
Provided is a knowledge distillation technique for training a student language model that, relative to a larger teacher language model, has a significantly smaller vocabulary, lower embedding dimensions, and/or hidden state dimensions. Specifically, aspects of the present disclosure are directed to a dual-training mechanism that trains the teacher and student language models simultaneously to o…
Who is the assignee on this patent?
Google Llc
What technology area does this patent fall under?
Primary CPC classification G06F40/284. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Mar 25 2025 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 9 related publications on this page (citations in our corpus or others sharing the same primary CPC).