LoRARecycleOptions<T, TInput, TOutput>
Options & Configuration · AiDotNet.MetaLearning.Options
Configuration options for LoRA-Recycle (Hu et al., CVPR 2025).
Inheritance: ModelOptions → LoRARecycleOptions<T, TInput, TOutput>
Implements: IMetaLearnerOptions<T>
How It Works
LoRA-Recycle distills a “meta-LoRA” from diverse pre-tuned LoRA adapters without accessing their private training data. It supports tuning-free few-shot adaptation by recycling knowledge from previously-learned tasks via prototype-based matching.
Key Parameters:
NumRecycledAdapters— number of previously-learned LoRA adapters to maintainRank— rank of each LoRA adapterPrototypeDim— dimensionality of prototype embeddings for adapter selection
Constructors
| Constructor | Summary |
|---|---|
LoRARecycleOptions(IFullModel<T, TInput, TOutput> metaModel) |
Creates options for meta-learning metaModel, with the default settings. |
Properties
| Property | Summary |
|---|---|
IEpisodicDataLoader<T, TInput, TOutput> DataLoader { get; set; } |
Episodic data loader that supplies the meta-training tasks; null when tasks are passed to training directly. |
IFullModel<T, TInput, TOutput> MetaModel { get; set; } |
The model whose parameters the meta-learner trains to adapt quickly to new tasks. |
IGradientBasedOptimizer<T, TInput, TOutput> InnerOptimizer { get; set; } |
Optimizer for task adaptation. |
IGradientBasedOptimizer<T, TInput, TOutput> MetaOptimizer { get; set; } |
Optimizer for the meta-update. |
ILossFunction<T> LossFunction { get; set; } |
Loss function for meta-training; null uses the default multi-class classification loss. |
bool EnableCheckpointing { get; set; } |
|
bool UseFirstOrder { get; set; } |
Whether to use the first-order approximation of the meta-gradient. |
double InnerLearningRate { get; set; } |
|
double KLWeight { get; set; } |
KL divergence weight for distillation loss. |
double OuterLearningRate { get; set; } |
|
double SelectionTemperature { get; set; } |
Temperature parameter for softmax-based adapter weighting. |
double? GradientClipThreshold { get; set; } |
|
int AdaptationSteps { get; set; } |
|
int CheckpointFrequency { get; set; } |
|
int EvaluationFrequency { get; set; } |
|
int EvaluationTasks { get; set; } |
|
int MetaBatchSize { get; set; } |
|
int NumMetaIterations { get; set; } |
|
int NumRecycledAdapters { get; set; } |
Number of recycled LoRA adapters to maintain in the adapter bank. |
int PrototypeDim { get; set; } |
Dimensionality of the prototype embedding used for adapter selection. |
int Rank { get; set; } |
Rank of each LoRA adapter (controls adapter capacity). |
int? RandomSeed { get; set; } |
Methods
| Method | Summary |
|---|---|
IMetaLearnerOptions<T> Clone() |
|
bool IsValid() |