LanguageModelLossConfig¶
Abstract
This class cannot be instantiated directly. Use one of the variants listed below.
Module: fast_llm.layers.language_model.loss.config
Fields¶
weight—core-
Type:
floatDefault:1.0Weight for this loss in the total loss computation.
Variants¶
Select a variant by setting type: to one of the following values.
type value |
Class | Description |
|---|---|---|
distillation |
LanguageModelDistillationLossConfig | |
dpo |
LanguageModelDPOLossConfig | Direct Preference Optimization (DPO) loss for alignment |
grpo |
LanguageModelGRPOLossConfig | |
label |
LanguageModelLabelEntropyLossConfig | |
z_loss |
LanguageModelZLossConfig | Z-loss regularization to prevent overconfidence |