Two-Stage LLM Fine-Tuning with Low-Rank Adaptation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing large language models require significant computing resources and large amounts of training data, especially when fine-tuning for domain-specific tasks, leading to overparameterization and inefficiencies.

Innovation Solution

A two-stage training pipeline is employed to fine-tune a pre-trained machine learning model, where a first model generates domain-specific training data and a second model fine-tunes the pre-trained model using adaptation components with low-rank weight representations, reducing the need for extensive hyperparameter tuning and data generation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If large language models are fine-tuned for domain-specific tasks using conventional methods, then task performance is improved, but computational resources and training data requirements increase significantly

Engineering Contradiction:
Improvedomain-specific task performanceVSAvoidcomputational resources
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent segments the fine-tuning process into two distinct stages: pre-training the base model on general data, and then fine-tuning adaptation components on domain-specific data. This segmentation allows the model to learn general patterns once and then efficiently adapt to specific domains without retraining the entire model, thereby reducing computational resources while maintaining domain-specific task performance.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts only the necessary adaptation components from the full model architecture for fine-tuning on domain-specific tasks. Instead of training the entire large language model on domain data, the method identifies and trains only the adaptation components that are needed for the specific task, significantly reducing the computational burden while preserving the beneficial general knowledge from the pre-trained model.

Inventive Principle:
Principle #2Taking out (Extraction)

2Reliability

If large language models are fine-tuned for domain-specific tasks using conventional methods, then task performance is improved, but the volume of training data required increases significantly

Engineering Contradiction:
Improvedomain-specific task performanceVSAvoidtraining data volume
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent segments the training data into two portions: general domain data for pre-training the base model, and domain-specific data for fine-tuning adaptation components. This segmentation allows the model to learn from extensive general data once during pre-training, then efficiently adapt to specific domains using only a fraction of the total data volume during the adaptation stage.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary pre-training of the base model on general domain data before the actual domain-specific fine-tuning. This preliminary action establishes a robust foundation of general knowledge that reduces the amount of domain-specific data needed for subsequent fine-tuning, as the model already possesses relevant linguistic and conceptual foundations from the pre-training phase.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If conventional fine-tuning methods are used for domain-specific tasks, then model adaptation is achieved, but hyperparameter tuning complexity increases

Engineering Contradiction:
Improvemodel adaptationVSAvoidhyperparameter tuning complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent extracts and trains only the adaptation components with a limited number of hyperparameters for domain-specific tasks, while keeping the pre-trained base model fixed. This extraction approach isolates the hyperparameter tuning to a manageable subset of parameters in the adaptation components, significantly reducing the overall hyperparameter tuning complexity compared to retraining the entire model.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies local quality by training adaptation components with specific hyperparameter configurations tailored to domain-specific tasks while maintaining the general architecture of the pre-trained model. This allows different parts of the system to have different levels of adaptability: the base model maintains its general-purpose properties, while the adaptation components are locally optimized for specific domains, reducing the need to re-tune hyperparameters across the entire model.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS20250077792A1Fine-tuning large language models for domain-specific environments
Publication Date: 2025.03.06 MICROSOFT TECHNOLOGY LICENSING LLC
  • US20250077792A1 patent drawing
  • US20250077792A1 patent drawing
  • US20250077792A1 patent drawing

AI summary

Embodiments of the disclosed technologies are capable of a training pipeline to fine-tune a machine learning model given a limited set of domain-specific data. The embodiments describe using a first machine learning model to generate a pseudo label associated with a domain-specific training document. The pseudo label comprises a machine-generated text of a content type extracted from the domain-specific training document. The embodiments further describe fine-tuning a second machine learning model using the pseudo label, the domain-specific training document, a first low-rank weight matrix, and a second low-rank weight matrix. The fine-tuned second machine learning model generates text of the content type from a domain-specific document.