Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 2.58 KB

fine-tuning.md

File metadata and controls

50 lines (34 loc) · 2.58 KB
title titleSuffix description manager ms.service ms.custom ms.topic ms.date author ms.author zone_pivot_groups
Customize a model with Azure OpenAI Service
Azure OpenAI
Learn how to create your own customized model with Azure OpenAI Service by using Python, the REST APIs, or Azure AI Foundry portal.
nitinme
azure-ai-openai
build-2023, build-2023-dataai, devx-track-python, references_regions
how-to
03/27/2025
mrbullwinkle
mbullwin
openai-fine-tuning

Customize a model with fine-tuning

Azure OpenAI Service lets you tailor our models to your personal datasets by using a process known as fine-tuning. This customization step lets you get more out of the service by providing:

  • Higher quality results than what you can get just from prompt engineering
  • The ability to train on more examples than can fit into a model's max request context limit.
  • Token savings due to shorter prompts
  • Lower-latency requests, particularly when using smaller models.

In contrast to few-shot learning, fine tuning improves the model by training on many more examples than can fit in a prompt, letting you achieve better results on a wide number of tasks. Because fine tuning adjusts the base model’s weights to improve performance on the specific task, you won’t have to include as many examples or instructions in your prompt. This means less text sent and fewer tokens processed on every API call, potentially saving cost, and improving request latency.

We use LoRA, or low rank adaptation, to fine-tune models in a way that reduces their complexity without significantly affecting their performance. This method works by approximating the original high-rank matrix with a lower rank one, thus only fine-tuning a smaller subset of important parameters during the supervised training phase, making the model more manageable and efficient. For users, this makes training faster and more affordable than other techniques.

::: zone pivot="programming-language-studio"

[!INCLUDE Azure AI Foundry portal fine-tuning]

::: zone-end

::: zone pivot="programming-language-python"

[!INCLUDE Python SDK fine-tuning]

::: zone-end

::: zone pivot="rest-api"

[!INCLUDE REST API fine-tuning]

::: zone-end

Next steps