what is Azure OpenAI API endpoint to train GPT 4o model programmatically using Direct Preference Optimization (DPO) Fine-Tuning

MR 20 Reputation points
2025-02-05T03:41:24.7233333+00:00

Hello,

Azure Open AI service provides the Direct Preference Optimization (DPO) fine tuning option in Azure Foundry.

We want to train the model programmatically but the Azure Open AI API endpoint doesn't have the request parameter for method type.

Azure OpenAI API:

The current implementation does not allow specifying the type of fine-tuning:

curl -X POST $AZURE_OPENAI_ENDPOINT/openai/fine_tuning/jobs?api-version=2023-12-01-preview \

-H "Content-Type: application/json" \

-H "api-key: $AZURE_OPENAI_API_KEY" \

-d '{

"model": "gpt-35-turbo-0613.ft-5fd1918ee65d4cd38a5dcf6835066ed7",

"training_file": "<TRAINING_FILE_ID>",

"validation_file": "<VALIDATION_FILE_ID>",

"suffix": "<additional text used to help identify fine-tuned models>"

}'

OpenAI API:

In contrast, the OpenAI fine-tuning API provides a clear mechanism to specify the type of fine-tuning:

const job = await openai.fineTuning.jobs.create({

training_file: "file-all-about-the-weather",

model: "gpt-4o-2024-08-06",

method: {

type: "dpo",

dpo: {

hyperparameters: { beta: 0.1 },

},

},

});

Is there any other Azure OpenAI API endpoint available to be able to specify the method type for fine tuning? Or when will this open be available in Azure OpenAI API?

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,828 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.