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
# How to use Open Source foundation models curated by Azure Machine Learning
17
17
18
-
In this article, you learn how to fine tune, evaluate and deploy foundation models in the Model Catalog.
18
+
In this article, you learn how to fine tune, evaluate, and deploy foundation models in the Model Catalog.
19
19
20
-
You can quickly test out any pre-trained model using the Sample Inference form on the model card, providing your own sample input to test the result. Additionally, the model card for each model includes a brief description of the model and links to samples for code based inferencing, fine-tuning and evaluation of the model.
20
+
You can quickly test out any pre-trained model using the Sample Inference form on the model card, providing your own sample input to test the result. Additionally, the model card for each model includes a brief description of the model and links to samples for code based inferencing, fine-tuning, and evaluation of the model.
21
21
22
22
## How to evaluate foundation models using your own test data
23
23
24
-
You can evaluate a Foundation Model against your test dataset, using either the Evaluate UI form or by using the code based samples, linked from the model card.
24
+
You can evaluate a foundation model against your test dataset, using either the Evaluate UI form or by using the code based samples, linked from the model card.
25
25
26
26
### Evaluating using the studio
27
27
28
28
You can invoke the Evaluate model form by selecting the **Evaluate** button on the model card for any foundation model.
29
29
30
30
:::image type="content" source="./media/how-to-use-foundation-models/evaluate-quick-wizard.png" alt-text="Screenshot showing the evaluation settings form after the user selects the evaluate button on a model card for a foundation model.":::
31
31
32
-
Each model can be evaluated for the specific inference task that the model will be used for.
32
+
You can evaluate each model for the specific inference task that you use the model for.
33
33
34
34
**Test Data:**
35
35
@@ -46,7 +46,7 @@ Each model can be evaluated for the specific inference task that the model will
46
46
47
47
### Evaluating using code based samples
48
48
49
-
To enable users to get started with model evaluation, we have published samples (both Python notebooks and CLI examples) in the [Evaluation samples in azureml-examples git repo](https://github.com/Azure/azureml-examples/tree/main/sdk/python/foundation-models/system/evaluation). Each model card also links to evaluation samples for corresponding tasks
49
+
To enable you to get started with model evaluation, we provide samples (both Python notebooks and CLI examples) in the [Evaluation samples in azureml-examples git repo](https://github.com/Azure/azureml-examples/tree/main/sdk/python/foundation-models/system/evaluation). Each model card also links to evaluation samples for corresponding tasks
50
50
51
51
## How to fine-tune foundation models using your own training data
52
52
@@ -69,7 +69,7 @@ You can invoke the fine-tune settings form by selecting on the **Fine-tune** but
69
69
70
70
1. Pass in the training data you would like to use to fine-tune your model. You can choose to either upload a local file (in JSONL, CSV or TSV format) or select an existing registered dataset from your workspace.
71
71
72
-
1. Once you've selected the dataset, you need to map the columns from your input data, based on the schema needed for the task. For example: map the column names that correspond to the 'sentence' and 'label' keys for Text Classification
72
+
1. Once you select the dataset, you need to map the columns from your input data, based on the schema needed for the task. For example: map the column names that correspond to the 'sentence' and 'label' keys for Text Classification
73
73
74
74
:::image type="content" source="./media/how-to-use-foundation-models/finetune-map-data-columns.png" lightbox="./media/how-to-use-foundation-models/finetune-map-data-columns.png" alt-text="Screenshot showing the fine-tune map in the foundation models evaluate wizard.":::
75
75
@@ -90,7 +90,7 @@ Currently, Azure Machine Learning supports fine-tuning models for the following
90
90
* Summarization
91
91
* Translation
92
92
93
-
To enable users to quickly get started with fine-tuning, we have published samples (both Python notebooks and CLI examples) for each task in the [azureml-examples git repo Finetune samples](https://github.com/Azure/azureml-examples/tree/main/sdk/python/foundation-models/system/finetune). Each model card also links to fine-tuning samples for supported fine-tuning tasks.
93
+
To enable users to quickly get started with fine-tuning, we have published samples (both Python notebooks and CLI examples) for each task in the [azureml-examples git repo fine-tune samples](https://github.com/Azure/azureml-examples/tree/main/sdk/python/foundation-models/system/finetune). Each model card also links to fine-tuning samples for supported fine-tuning tasks.
94
94
95
95
## Deploying foundation models to endpoints for inferencing
96
96
@@ -117,11 +117,13 @@ If you're deploying a Llama-2, Phi, Nemotron, Mistral, Dolly or Deci-DeciLM mode
117
117
118
118
### Deploying using code based samples
119
119
120
-
To enable users to quickly get started with deployment and inferencing, we have published samples in the [Inference samples in the azureml-examples git repo](https://github.com/Azure/azureml-examples/tree/main/sdk/python/foundation-models/system/inference). The published samples include Python notebooks and CLI examples. Each model card also links to Inference samples for Real time and Batch inferencing.
120
+
To enable you to quickly get started with deployment and inferencing, we provide samples in the [Inference samples in the azureml-examples git repo](https://github.com/Azure/azureml-examples/tree/main/sdk/python/foundation-models/system/inference). The published samples include Python notebooks and CLI examples. Each model card also links to Inference samples for Real time and Batch inferencing.
121
121
122
122
## Import foundation models
123
123
124
-
If you're looking to use an open source model that isn't included in the model catalog, you can import the model from Hugging Face into your Azure Machine Learning workspace. Hugging Face is an open-source library for natural language processing (NLP) that provides pre-trained models for popular NLP tasks. Currently, model import supports importing models for the following tasks, as long as the model meets the requirements listed in the Model Import Notebook:
124
+
If you search the model catalog and don't find the open source model you need, you can import it from Hugging Face into your Azure Machine Learning workspace. The **Import** button appears in the model catalog only when your search returns no results.
125
+
126
+
Hugging Face is an open-source library for natural language processing (NLP) that provides pre-trained models for popular NLP tasks. Currently, model import supports importing models for the following tasks, as long as the model meets the requirements listed in the Model Import Notebook:
125
127
126
128
* fill-mask
127
129
* token-classification
@@ -136,15 +138,15 @@ If you're looking to use an open source model that isn't included in the model c
136
138
> [!NOTE]
137
139
> Models from Hugging Face are subject to third-party license terms available on the Hugging Face model details page. It is your responsibility to comply with the model's license terms.
138
140
139
-
You can select the **Import** button on the top-right of the model catalog to use the Model Import Notebook.
141
+
When your search returns no results, select the **Import** button to use the Model Import Notebook.
140
142
141
-
:::image type="content" source="./media/how-to-use-foundation-models/model-import.png" alt-text="Screenshot showing the model import button as it's displayed in the top right corner on the foundation model catalog.":::
143
+
:::image type="content" source="./media/how-to-use-foundation-models/model-import.png" alt-text="Screenshot showing the model import button as it is displayed when search returns no results in the foundation model catalog.":::
142
144
143
145
The model import notebook is also included in the azureml-examples git repo [here](https://github.com/Azure/azureml-examples/blob/main/sdk/python/foundation-models/system/import/import_model_into_registry.ipynb).
144
146
145
147
In order to import the model, you need to pass in the `MODEL_ID` of the model you wish to import from Hugging Face. Browse models on Hugging Face hub and identify the model to import. Make sure the task type of the model is among the supported task types. Copy the model ID, which is available in the URI of the page or can be copied using the copy icon next to the model name. Assign it to the variable 'MODEL_ID' in the Model import notebook. For example:
146
148
147
-
:::image type="content" source="./media/how-to-use-foundation-models/hugging-face-model-id.png" alt-text="Screenshot showing an example of a hugging face model ID ('bert-base-uncased') as it's displayed in the hugging face model documentation page.":::
149
+
:::image type="content" source="./media/how-to-use-foundation-models/hugging-face-model-id.png" alt-text="Screenshot showing an example of a hugging face model ID ('bert-base-uncased') as it is displayed in the hugging face model documentation page.":::
148
150
149
151
You need to provide compute for the Model import to run. Running the Model Import results in the specified model being imported from Hugging Face and registered to your Azure Machine Learning workspace. You can then fine-tune this model or deploy it to an endpoint for inferencing.
0 commit comments