nip.language_model_server.types.LmTrainingConfig#
- class nip.language_model_server.types.LmTrainingConfig(*, model_name: str, method: ~typing.Literal['dpo'], dpo_config: ~nip.language_model_server.types.LmDpoTrainingConfig = <factory>, training_lora_config: ~nip.language_model_server.types.LmLoraAdapterConfig | None = None, seed: int = 6198, per_device_train_batch_size: int = 2, model_already_lora_strategy: ~typing.Literal['reuse', 'stack'] = 'reuse', mixed_precision: ~typing.Literal['fp16', 'bf16', 'no'] = 'fp16', gradient_checkpointing: bool = True, use_liger_kernel: bool = True, logging_steps: int = 1)[source]#
Configuration for training a language model with the language model server.
Attributes
__fields_set__model_computed_fieldsmodel_configConfiguration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_extraGet extra fields set during validation.
model_fieldsmodel_fields_setReturns the set of fields that have been explicitly set on this model instance.
model_nameThe name of the model to be trained, typically a Hugging Face identifier.
methodThe method to be used for training.
dpo_configConfiguration specific to DPO training.
training_lora_configConfiguration for the LoRA adapter to use when training.
seedThe random seed to use for training, for reproducibility.
per_device_train_batch_sizeThe batch size per device (GPU) for training.
model_already_lora_strategyStrategy for handling models that are already LoRA-adapted.
mixed_precisionThe mixed precision to use during training.
gradient_checkpointingWhether to use gradient checkpointing to save memory during training.
use_liger_kernelWhether to use the Liger loss function during training.
logging_stepsThe period (in steps) at which to log training metrics.
Methods