Namespace LMKit.Finetuning
Namespaces
Classes
- ChatTrainingSample
Represents a single supervised fine-tuning sample for chat-based models. Encapsulates the full ChatHistory to learn from and the target InferenceModality (e.g., text-only or multimodal).
- FinetuningProgressEventArgs
Progress information raised by FinetuningProgress after every optimizer step and every validation batch.
- LoraAdapter
Represents a LoRA adapter that applies low-rank adaptation weights to a language model.
- LoraAdapterConverter
Converts a PEFT LoRA adapter (an
adapter_model.safetensorsplus itsadapter_config.json, the layout the Hugging Face ecosystem trains and publishes) into the GGUF adapter format the inference engine loads. The conversion is fully managed: the safetensors container is parsed directly, tensor names are mapped from their Hugging Face module paths onto the engine's tensor names, weights are widened to 32-bit floats, and a GGUF v3 adapter file is written carrying the metadata the engine's loader requires (general.type,adapter.type,adapter.lora.alpha, and the base model's architecture).
- LoraAdapterSource
Represents a source for a LoRA adapter.
- LoraFinetuning
Fine-tunes a base model with the LoRA (Low-Rank Adaptation) technique, producing a small adapter or a merged model, entirely on the local machine.
- LoraMerger
Handles the merging of Low-Rank Adaptation (LoRA) transformations into a base model.
This class is responsible for loading LoRA transformation files and integrating them with a base model's weights. The base model may be a plain GGUF file, an LM-Kit model archive whose GGUF entry is stored uncompressed, or an LM-Kit encrypted GGUF container (with EncryptionPassword set); container-packaged bases are read through the same provider contract as model loading, so no plaintext copy of the base is ever materialized.
- LoraTrainingParameters
Hyperparameters for a LoRA (Low-Rank Adaptation) fine-tuning run.
- TrainingDataset
A supervised fine-tuning dataset: a collection of chat conversations (ChatTrainingSample) and optional raw-text samples, with loaders for the common industry formats and ZIP archives.
- TrainingReport
Machine-readable summary of a completed training run, exposed by LastReport after TrainToAdapter(string) returns. Every value is measured from the run itself; nothing is estimated, so the report alone is sufficient evidence for the three failure classes that dominate training support: the wrong device, a memory ceiling, and a throughput regression.
- TrainingSample
Represents a training sample consisting of a sequence of tokens and its decoded value.
Enums
- LearningRateSchedule
Shape of the learning-rate curve applied across a training run.
- LoraTargetModules
Selects which weight matrices of the base model receive trainable LoRA adapters. Combine flags with a bitwise OR, or use Attention or All for the common presets.
- TrainingDatasetFormat
Dataset file format for TrainingDataset loaders.