Skip to content

Commit 2b510bd

Browse files
Merge pull request #5702 from s-polly/main
Change to import function
2 parents eca0837 + 6339b4c commit 2b510bd

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

articles/machine-learning/how-to-use-foundation-models.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ ms.collection: ce-skilling-ai-copilot
1515

1616
# How to use Open Source foundation models curated by Azure Machine Learning
1717

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.
1919

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.
2121

2222
## How to evaluate foundation models using your own test data
2323

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.
2525

2626
### Evaluating using the studio
2727

2828
You can invoke the Evaluate model form by selecting the **Evaluate** button on the model card for any foundation model.
2929

3030
:::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.":::
3131

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.
3333

3434
**Test Data:**
3535

@@ -46,7 +46,7 @@ Each model can be evaluated for the specific inference task that the model will
4646

4747
### Evaluating using code based samples
4848

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
5050

5151
## How to fine-tune foundation models using your own training data
5252

@@ -69,7 +69,7 @@ You can invoke the fine-tune settings form by selecting on the **Fine-tune** but
6969

7070
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.
7171

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
7373

7474
:::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.":::
7575

@@ -90,7 +90,7 @@ Currently, Azure Machine Learning supports fine-tuning models for the following
9090
* Summarization
9191
* Translation
9292

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.
9494

9595
## Deploying foundation models to endpoints for inferencing
9696

@@ -117,11 +117,13 @@ If you're deploying a Llama-2, Phi, Nemotron, Mistral, Dolly or Deci-DeciLM mode
117117

118118
### Deploying using code based samples
119119

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.
121121

122122
## Import foundation models
123123

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:
125127

126128
* fill-mask
127129
* token-classification
@@ -136,15 +138,15 @@ If you're looking to use an open source model that isn't included in the model c
136138
> [!NOTE]
137139
> 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.
138140
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 **Import model notebook** to use the Model Import Notebook.
140142

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.":::
142144

143145
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).
144146

145147
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:
146148

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.":::
148150

149151
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.
150152

-85 KB
Loading

0 commit comments

Comments
 (0)