---
title: "FineTuneMethod"
url: "https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1/schemas/FineTuneMethod"
---

> Full API specification: https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1.md

# FineTuneMethod

The method used for fine-tuning.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: OpenAI API
  version: 2.3.0
servers:
  - url: https://api.openai.com/v1
components:
  schemas:
    FineTuneSupervisedMethod:
      type: object
      description: Configuration for the supervised fine-tuning method.
      properties:
        hyperparameters:
          type: object
          description: The hyperparameters used for the fine-tuning job.
          properties:
            batch_size:
              description: >
                Number of examples in each batch. A larger batch size means that
                model parameters are updated less frequently, but with lower
                variance.
              oneOf:
                - type: string
                  enum:
                    - auto
                  x-stainless-const: true
                - type: integer
                  minimum: 1
                  maximum: 256
              default: auto
            learning_rate_multiplier:
              description: >
                Scaling factor for the learning rate. A smaller learning rate
                may be useful to avoid overfitting.
              oneOf:
                - type: string
                  enum:
                    - auto
                  x-stainless-const: true
                - type: number
                  minimum: 0
                  exclusiveMinimum: true
              default: auto
            n_epochs:
              description: >
                The number of epochs to train the model for. An epoch refers to
                one full cycle through the training dataset.
              oneOf:
                - type: string
                  enum:
                    - auto
                  x-stainless-const: true
                - type: integer
                  minimum: 1
                  maximum: 50
              default: auto
    FineTuneDPOMethod:
      type: object
      description: Configuration for the DPO fine-tuning method.
      properties:
        hyperparameters:
          type: object
          description: The hyperparameters used for the fine-tuning job.
          properties:
            beta:
              description: >
                The beta value for the DPO method. A higher beta value will
                increase the weight of the penalty between the policy and
                reference model.
              oneOf:
                - type: string
                  enum:
                    - auto
                  x-stainless-const: true
                - type: number
                  minimum: 0
                  maximum: 2
                  exclusiveMinimum: true
              default: auto
            batch_size:
              description: >
                Number of examples in each batch. A larger batch size means that
                model parameters are updated less frequently, but with lower
                variance.
              oneOf:
                - type: string
                  enum:
                    - auto
                  x-stainless-const: true
                - type: integer
                  minimum: 1
                  maximum: 256
              default: auto
            learning_rate_multiplier:
              description: >
                Scaling factor for the learning rate. A smaller learning rate
                may be useful to avoid overfitting.
              oneOf:
                - type: string
                  enum:
                    - auto
                  x-stainless-const: true
                - type: number
                  minimum: 0
                  exclusiveMinimum: true
              default: auto
            n_epochs:
              description: >
                The number of epochs to train the model for. An epoch refers to
                one full cycle through the training dataset.
              oneOf:
                - type: string
                  enum:
                    - auto
                  x-stainless-const: true
                - type: integer
                  minimum: 1
                  maximum: 50
              default: auto
    FineTuneMethod:
      type: object
      description: The method used for fine-tuning.
      properties:
        type:
          type: string
          description: The type of method. Is either `supervised` or `dpo`.
          enum:
            - supervised
            - dpo
        supervised:
          $ref: "#/components/schemas/FineTuneSupervisedMethod"
        dpo:
          $ref: "#/components/schemas/FineTuneDPOMethod"
```
