You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-studio/concepts/fine-tuning-overview.md
+15-28Lines changed: 15 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ manager: scottpolly
6
6
ms.service: azure-ai-studio
7
7
ms.custom:
8
8
- build-2024
9
+
- code01
9
10
ms.topic: conceptual
10
11
ms.date: 10/31/2024
11
12
ms.reviewer: sgilley
@@ -30,23 +31,18 @@ When you're deciding whether or not fine-tuning is the right solution for your u
30
31
-[Prompt engineering](../../ai-services/openai/concepts/prompt-engineering.md) is a technique that involves designing prompts for natural language processing models. This process improves accuracy and relevancy in responses, to optimize the performance of the model.
31
32
-[Retrieval-augmented generation (RAG)](../concepts/retrieval-augmented-generation.md) improves LLM performance by retrieving data from external sources and incorporating it into a prompt. RAG can help businesses achieve customized solutions while maintaining data relevance and optimizing costs.
32
33
33
-
Fine-tuning is an advanced technique that requires expertise to use appropriately. The following questions can help you evaluate whether you're ready for fine-tuning, and how well you thought through the process. You can use these questions to guide your next steps or to identify other approaches that might be more appropriate.
34
+
Fine-tuning is a great way to get higher quality results while reducing latency. The following questions can help you better understand why fine-tuning and evaluate whether you're ready for fine-tuningthrough the process. You can use these questions to guide your next steps.
34
35
35
36
### Why do you want to fine-tune a model?
36
37
37
-
You might be ready for fine-tuning if:
38
-
39
-
- You can clearly articulate a specific use case for fine-tuning and identify the [model](../how-to/model-catalog.md) that you hope to fine-tune.
38
+
Before you begin fine-tuning a model, consider if you've identified shortcomings when using a base model. These shortcomings can include: an inconsistent performance on edge cases, inability to fit enough prompts in the context window to steer the model, or high latency.
40
39
41
-
Good use cases for fine-tuning include steering the model to output content in a specific and customized style, tone, or format. They also include scenarios where the information needed to steer the model is too long or complex to fit into the prompt window.
42
-
- You have clear examples of how you addressed the challenges in alternate approaches and what you tested as possible resolutions to improve performance.
43
-
- You identified shortcomings by using a base model, such as inconsistent performance on edge cases, inability to fit enough shot prompts in the context window to steer the model, or high latency.
40
+
Base models are already pre-trained on vast amounts of data, but most times you will add instructions and examples to the prompt to get the quality responses that you're looking for. This process of "few-shot learning" can be improved with fine-tuning.
44
41
45
-
You might not be ready for fine-tuning if:
42
+
Fine-tuning allows you to train a model with many more examples. You can tailor your examples to meet your specific use-case. This can help you reduce the number of tokens in the prompt leading to potential cost savings and requests with lower latency.
46
43
47
-
- There's insufficient knowledge from the model or data source.
48
-
- You can't find the right data to serve the model.
49
-
- You don't have a clear use case for fine-tuning, or you can't articulate more than "I want to make a model better."
44
+
Use cases for fine-tuning a model can be:
45
+
- Steering the model to output content in a specific and customized style, tone, or format.
50
46
51
47
If you identify cost as your primary motivator, proceed with caution. Fine-tuning might reduce costs for certain use cases by shortening prompts or allowing you to use a smaller model. But typically there's a higher upfront cost to training, and you have to pay for hosting your own custom model.
52
48
@@ -64,38 +60,29 @@ Fine-tuning is an advanced capability, not the starting point for your generativ
64
60
65
61
Having a baseline for performance without fine-tuning is essential for knowing whether or not fine-tuning improves model performance. Fine-tuning with bad data makes the base model worse, but without a baseline, it's hard to detect regressions.
66
62
67
-
You might be ready for fine-tuning if:
63
+
Before you begin fine-tuning a model, you need to ensure:
68
64
69
-
- You can demonstrate evidence and knowledge of prompt engineering and RAG-based approaches.
65
+
- You can demonstrate evidence and knowledge of using prompt engineering and RAG-based approaches on your LLM.
70
66
- You can share specific experiences and challenges with techniques other than fine-tuning that you tried for your use case.
71
-
- You have quantitative assessments of baseline performance, whenever possible.
72
-
73
-
You might not be ready for fine-tuning if:
74
-
75
-
- You haven't tested any other techniques.
76
-
- You have insufficient knowledge or understanding of how fine-tuning applies specifically to LLMs.
77
-
- You have no benchmark measurements to assess fine-tuning against.
67
+
- You have quantitative assessments of baseline performance, whenever possible.
68
+
- You have a labeled dataset that corresponds with the specific usecase you want to train your LLM.
78
69
79
70
### What data are you going to use for fine-tuning?
80
71
81
-
Even with a great use case, fine-tuning is only as good as the quality of the data that you can provide. You need to be willing to invest the time and effort to make fine-tuning work. Different models require different data volumes, but you often need to be able to provide fairly large quantities of high-quality curated data.
72
+
Even with a great use case, fine-tuning is only as good as the quality of the data that you can provide. You need to be willing to invest the time and effort to make fine-tuning work. Different models require different data volumes, but you often need to be able to provide fairly large quantities of high-quality curated data. In supervised fine-tuning, a generic moddel is trained on a topic specific labeled dataset. The model with adjust it's parameters to the new data and apply pre-existing knowledge when outputting new content.
82
73
83
74
Another important point is that even with high-quality data, if your data isn't in the necessary format for fine-tuning, you need to commit engineering resources for the formatting.
84
75
85
76
You might be ready for fine-tuning if:
86
77
87
78
- You identified a dataset for fine-tuning.
88
-
- Your dataset is in the appropriate format for training.
79
+
- Your dataset is in the appropriate format for training on your existing model.
89
80
- You employed some level of curation to ensure dataset quality.
90
81
91
-
You might not be ready for fine-tuning if:
92
-
93
-
- An appropriate dataset hasn't been identified.
94
-
- The dataset format doesn't match the model that you want to fine-tune.
95
82
96
-
### How can you measure the quality of your fine-tuned model?
83
+
### How will you measure the quality of your fine-tuned model?
97
84
98
-
There isn't a single right answer to this question, but you should have clearly defined goals for what success with fine-tuning looks like. Ideally, this effort shouldn't just be qualitative. It should include quantitative measures of success, like using a holdout set of data for validation, in addition to user acceptance testing or A/B testing the fine-tuned model against a base model.
85
+
There isn't a single right answer to this question, but you should have clearly defined goals for what success with fine-tuning looks like. Ideally, this effort shouldn't just be qualitative. It should include quantitative measures of success, like using a holdout set of data for validation, in addition to user acceptance testing or A/B testing the fine-tuned model against a base model.
99
86
100
87
## Supported models for fine-tuning in Azure AI Studio
0 commit comments