# US 2025/0094827 A1 · Producing a Reduced-Size Model by Explanation Tuning

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0094827 A1
- Document ID: US20250094827A1
- Status: Published application
- Kind: A1
- Application number: 18/510,407
- Filed: 2023-11-15
- Published: 2025-03-20
- Earliest claimed: 2023-09-15
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Ahmed AWADALLAH; Arindam MITRA; Sahaj Raghvendra AGARWAL; Hamid PALANGI; Subhabrata MUKHERJEE
- Web page: https://patentgrep.com/patent/US20250094827A1

## CPC

- G06N 5/02: Knowledge representation; Symbolic representation
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A technique produces a reduced-size language model using explanation tuning. Explanation tuning composes a prompt that includes two parts: a system instruction and a client instruction. The client instruction expresses a query. The system instruction requests a language model to formulate responses to queries that describe final results and processes of producing the final results. The language model responds to the prompt by providing a language-model response that describes a final result and a process of producing the final result, e.g., by providing a step-by-step explanation of how the final result is derivable. In some implementations, the technique uses a teacher-student approach to producing the reduced-size language model. In some examples, the technique performs training in two stages using two respective teacher language models, the first-stage model being less versatile and accurate compared to the second-stage model.

## Claims

### Claim 1

A method for training a machine-trained model, comprising:
in a training example-generating operation, generating a plurality of training examples, each training example being produced by:
receiving a system instruction that requests a teacher language model to formulate responses to queries that describe final results and processes of producing the final results;
receiving a client instruction that specifies a query;
producing a combined prompt that combines the system instruction and the client instruction;
submitting the combined prompt to the teacher language model, the teacher language model transforming the combined prompt into a teacher-model response, the teacher-model response describing a final result and a process of producing the final result;
storing a training example in a data store that includes the combined prompt and the teacher-model response, the data store storing the plurality of training examples; and
in a training operation, training parameters of a student language model based on the training examples.

### Claim 2 (depends on 1)

The method of claim 1, wherein the system instruction instructs the teacher language model to provide a description by directly or indirectly requesting the teacher language model to specify at least one intermediary result that leads to the final result, and the teacher language model satisfies the system instruction by providing said at least one intermediary result and the final result.

### Claim 3 (depends on 1)

The method of claim 1, wherein the teacher language model is a different model than the student language model, the teacher language model having greater capabilities compared to the student language model, and/or the teacher language model consuming more resources compared to the student language model, and/or the teacher language model having a larger size than the student language model.

### Claim 4 (depends on 1)

The method of claim 1, wherein the teacher language model is a same model as the student language model, acting in a context of a teacher.

### Claim 5 (depends on 1)

The method of claim 1, wherein the combined prompt that is provided to the teacher language model also specifies the final result, which serves as a ground-truth answer, and wherein the system instruction asks the teacher language model to describe how the final result is produced.

### Claim 6 (depends on 1)

The method of claim 1, further comprising using the teacher language model to improve the teacher-model response in one or more improvement operations.

### Claim 7 (depends on 1)

The method of claim 1, wherein the teacher language model is invoked in response to a determination that a student-model response fails a prescribed quality test.

### Claim 8 (depends on 1)

The method of claim 1, wherein the client instruction is a multi-modal client instruction that provides a text-based question and an item that includes content other than text, the text-based question being directed to the item.

### Claim 9 (depends on 1)

The method of claim 1,
wherein the training example-generating operation further comprises extracting a set of queries from a larger collection of queries, the query being one query in the set of queries,
wherein the larger collection of queries include plural sub-collections of queries pertaining to different respective categories, and
wherein the extracting comprises, for each category-of-interest, selecting a prescribed category-specific amount of queries from a sub-collection pertaining to the category-of-interest.

### Claim 10 (depends on 1)

The method of claim 1, wherein the training operation further comprises:
submitting a student-model prompt to the student language model, and, in response, receiving a student-model response, the student-model response describing a student-model final result and a process for producing the student-model final result;
generating a measure of loss that depends on a difference between the teacher-model response and the student-model response; and
updating parameters of the student language model based on the loss.

### Claim 11 (depends on 1)

The method of claim 1,
wherein the set of training examples includes a first set of training examples and a second set of training examples, and
wherein the training operation performs training using the first set of training examples, and then performs training using the second set of training examples.

### Claim 12 (depends on 11)

The method of claim 11,
wherein the teacher language model is one of a first teacher language model or a second teacher language model in a teacher system that includes the first and second teacher language models, the second teacher language model being more capable than the first teacher language model,
wherein the first teacher language model is used to produce the first set of training examples, and
wherein the second teacher language model is used to produce the second set of training examples.

### Claim 13 (depends on 12)

The method of claim 12, wherein the second teacher language model has a throughput that is higher than a throughput of the first teacher language model, and wherein interaction with the second teacher language model incurs a latency that is higher than a latency of the first teacher language model.

### Claim 14 (depends on 11)

The method of claim 11,
wherein the first set of training examples are generated for a first set of queries having a first complexity level, and
wherein the second set of training examples are generated for a second set of queries having a second complexity level.

### Claim 15 (depends on 11)

The method of claim 11, wherein there are more training examples in the first set of training examples compared to the second set of training examples.

### Claim 16 (depends on 1)

The method of claim 1, further comprising providing the student language model to a local system, the local system using the student language model to provide responses to newly-submitted queries.

### Claim 17 (depends on 16)

The method of claim 16, wherein the student language model is capable of generating responses to the newly-submitted queries in an offline mode, independent of any network-accessible resources.

### Claim 18

A computer-readable storage medium for storing computer-readable instructions, a processing system executing the computer-readable instructions to perform a training operation, the training operation comprising:
submitting a student-model prompt to a student language model, and, in response, receiving a student-model response,
the student-model prompt expressing a combination of a student-model system instruction and a student-model client instruction,
the student-model system instruction requesting the student language model to formulate responses to queries that describe student-model final results and processes of producing the student-model final results,
the student-model client instruction expressing a query,
the student-model response describing a student-model final result and a process of producing the student-model final result;
receiving a teacher-model response, the teacher-model response being produced by a teacher language model based on a teacher-model prompt, the teacher-model prompt including a teacher-model system instruction that requests the teacher language model to formulate responses to queries that describe teacher-model final results and processes of producing the teacher-model final results,
the teacher-model response describing a teacher-model final result and a process of producing the teacher-model final result;
generating a measure of loss that depends on a difference between the teacher-model response and the student-model response;
updating parameters of the student language model based on the loss; and
repeating the submitting, receiving, generating, and updating for other prompts.

### Claim 19

A system for using a transformer-based client language model, comprising:
a data store for storing computer-readable instructions;
a processing system for executing the computer-readable instructions in the data store, to perform operations including:
receiving a client-model system instruction that requests the transformer-based client language model to formulate responses to queries that describe client-model final results and processes of producing the client-model final results;
receiving a client-model client instruction that specifies a query;
producing a client-model prompt that includes a combination of the client-model system instruction and the client-model client instruction; and
submitting the client-model prompt to the transformer-based client language model, the transformer-based client language model transforming the client-model prompt into a client-model response, the client-model response describing a client-model final result and a process of producing the client-model final result via intermediary results,
the transformer-based client language model producing the client-model response using parameters that are trained based on teacher-model responses produced by a transformer-based teacher language model in response to teacher-model prompts, each teacher-model prompt expressing a combination of a teacher-model system instruction and a teacher-model client instruction, and
each teacher-model system instruction requesting the transformer-based teacher language model to formulate teacher-model responses to queries that describe teacher-model final results and processes of producing the teacher-model final results.

### Claim 20 (depends on 19)

The system of claim 19,
wherein the system is a local system that locally implements the transformer-based client language model, and
wherein the transformer-based client language model is capable of operating in an offline mode, independent of interaction with network-accessible resources.
