FineTuningOptions<T>

Options & Configuration ยท AiDotNet.Models.Options

Configuration options for fine-tuning methods.

Inheritance: ModelOptions โ†’ FineTuningOptions<T>

For Beginners

These settings control how the fine-tuning process works. Most settings have sensible defaults based on research papers, so you can start with the defaults and adjust as needed.

How It Works

This class provides a comprehensive set of options that cover all fine-tuning method categories. Each method type uses the relevant subset of options.

Constructors

Constructor Summary
FineTuningOptions()

Properties

Property Summary
FineTuningMethodType MethodType { get; set; } Gets or sets the fine-tuning method type.
LoRAConfiguration LoRAConfig { get; set; } Gets or sets the LoRA configuration when UseLoRA is true.
bool CompileModel { get; set; } Gets or sets whether to compile the model for faster training.
bool UseLoRA { get; set; } Gets or sets whether to use LoRA for parameter-efficient fine-tuning.
bool UseMixedPrecision { get; set; } Gets or sets whether to use mixed precision training.
double Beta { get; set; } Gets or sets the beta parameter for DPO-family methods.
double DistillationAlpha { get; set; } Gets or sets the alpha weight between hard and soft labels.
double DistillationTemperature { get; set; } Gets or sets the distillation temperature.
double EntropyCoefficient { get; set; } Gets or sets the entropy coefficient for exploration.
double GAELambda { get; set; } Gets or sets the GAE lambda for advantage estimation.
double GRPOTemperature { get; set; } Gets or sets the GRPO temperature for sampling.
double Gamma { get; set; } Gets or sets the discount factor for rewards.
double KLCoefficient { get; set; } Gets or sets the KL coefficient for RL-based methods.
double KTODesirableWeight { get; set; } Gets or sets the desirable weight for KTO.
double KTOUndesirableWeight { get; set; } Gets or sets the undesirable weight for KTO.
double LabelSmoothing { get; set; } Gets or sets the label smoothing factor for preference learning.
double LearningRate { get; set; } Gets or sets the learning rate for fine-tuning.
double MaxGradientNorm { get; set; } Gets or sets the maximum gradient norm for clipping.
double ORPOLambda { get; set; } Gets or sets the lambda parameter for ORPO odds ratio loss.
double PPOClipRange { get; set; } Gets or sets the PPO clip range.
double RankingMargin { get; set; } Gets or sets the margin for ranking loss.
double RankingTemperature { get; set; } Gets or sets the temperature for ranking softmax.
double SimPOGamma { get; set; } Gets or sets the gamma parameter for SimPO length normalization.
double ValueCoefficient { get; set; } Gets or sets the value function coefficient for PPO.
double WarmupRatio { get; set; } Gets or sets the warmup ratio for learning rate scheduling.
double WeightDecay { get; set; } Gets or sets the weight decay for regularization.
int BatchSize { get; set; } Gets or sets the batch size for training.
int CheckpointSteps { get; set; } Gets or sets the checkpoint frequency in steps.
int CritiqueIterations { get; set; } Gets or sets the number of critique-revision iterations.
int Epochs { get; set; } Gets or sets the number of training epochs.
int GRPOGroupSize { get; set; } Gets or sets the group size for GRPO sampling.
int GradientAccumulationSteps { get; set; } Gets or sets the gradient accumulation steps.
int LoggingSteps { get; set; } Gets or sets the logging frequency in steps.
int MaxCheckpoints { get; set; } Gets or sets the maximum number of checkpoints to keep.
int MaxSequenceLength { get; set; } Gets or sets the maximum sequence length.
int PPOEpochsPerBatch { get; set; } Gets or sets the number of PPO epochs per batch.
int SPINIterations { get; set; } Gets or sets the number of self-play iterations.
string[] ConstitutionalPrinciples { get; set; } Gets or sets the constitutional principles for CAI methods.