Methods
ModelsExpand Collapse
class DpoHyperparameters: …The hyperparameters used for the DPO fine-tuning job.
The hyperparameters used for the DPO fine-tuning job.
batch_size: Optional[Union[Literal["auto"], int, null]]Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
beta: Optional[Union[Literal["auto"], float, null]]The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.
The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.
class ReinforcementHyperparameters: …The hyperparameters used for the reinforcement fine-tuning job.
The hyperparameters used for the reinforcement fine-tuning job.
batch_size: Optional[Union[Literal["auto"], int, null]]Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
compute_multiplier: Optional[Union[Literal["auto"], float, null]]Multiplier on amount of compute used for exploring search space during training.
Multiplier on amount of compute used for exploring search space during training.
eval_interval: Optional[Union[Literal["auto"], int, null]]The number of training steps between evaluation runs.
The number of training steps between evaluation runs.
eval_samples: Optional[Union[Literal["auto"], int, null]]Number of evaluation samples to generate per training step.
Number of evaluation samples to generate per training step.
learning_rate_multiplier: Optional[Union[Literal["auto"], float, null]]Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
class ReinforcementMethod: …Configuration for the reinforcement fine-tuning method.
Configuration for the reinforcement fine-tuning method.
grader: GraderThe grader used for the fine-tuning job.
The grader used for the fine-tuning job.
class StringCheckGrader: …A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
class TextSimilarityGrader: …A TextSimilarityGrader object which grades text based on similarity metrics.
A TextSimilarityGrader object which grades text based on similarity metrics.
class ScoreModelGrader: …A ScoreModelGrader object that uses a model to assign a score to the input.
A ScoreModelGrader object that uses a model to assign a score to the input.
input: List[Input]The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.
The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.
content: InputContentInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
List[GraderInputItem]
sampling_params: Optional[SamplingParams]The sampling parameters for the model.
The sampling parameters for the model.
The maximum number of tokens the grader model may generate in its response.
Constrains effort on reasoning for reasoning models. Currently supported
values are none, minimal, low, medium, high, xhigh, and max.
Reducing reasoning effort can result in faster responses and fewer tokens
used on reasoning in a response. Not all reasoning models support every
value. See the
reasoning guide
for model-specific support.
class MultiGrader: …A MultiGrader object combines the output of multiple graders to produce a single score.
A MultiGrader object combines the output of multiple graders to produce a single score.
graders: GradersA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
class StringCheckGrader: …A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
class TextSimilarityGrader: …A TextSimilarityGrader object which grades text based on similarity metrics.
A TextSimilarityGrader object which grades text based on similarity metrics.
class ScoreModelGrader: …A ScoreModelGrader object that uses a model to assign a score to the input.
A ScoreModelGrader object that uses a model to assign a score to the input.
input: List[Input]The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.
The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.
content: InputContentInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
List[GraderInputItem]
sampling_params: Optional[SamplingParams]The sampling parameters for the model.
The sampling parameters for the model.
The maximum number of tokens the grader model may generate in its response.
Constrains effort on reasoning for reasoning models. Currently supported
values are none, minimal, low, medium, high, xhigh, and max.
Reducing reasoning effort can result in faster responses and fewer tokens
used on reasoning in a response. Not all reasoning models support every
value. See the
reasoning guide
for model-specific support.
class LabelModelGrader: …A LabelModelGrader object which uses a model to assign labels to each item
in the evaluation.
A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.
input: List[Input]
content: InputContentInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
List[GraderInputItem]
class SupervisedHyperparameters: …The hyperparameters used for the fine-tuning job.
The hyperparameters used for the fine-tuning job.
batch_size: Optional[Union[Literal["auto"], int, null]]Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.