-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
99 changed files
with
1,670 additions
and
1,842 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/01.InferencePhi3/03.chat/models/Microsoft/Phi-3-mini-4k-instruct-onnx-web
Submodule Phi-3-mini-4k-instruct-onnx-web
deleted from
80a279
1 change: 0 additions & 1 deletion
1
src/01.InferencePhi3/03.chat/models/Xenova/jina-embeddings-v2-base-en
Submodule jina-embeddings-v2-base-en
deleted from
6fd0fd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 18 additions & 18 deletions
36
src/02.AIToolsSolutionE2E/Readme.md → src/03.AIToolsSolutionE2E/Readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
## Demo-02 : Fine-tuning Phi-3 with AI Tools VSCode Extensions | ||
|
||
Using Azure AI Tools & Microsoft VS Code | ||
|
||
This demo guides you through the process of fine-tuning the Phi-3 model using AI Tools VSCode Extensions, including steps for fine-tuning, inference, and deployment using Azure Machine Learning Service. Ensure your Azure subscription has access to an Azure Compute A100 GPU to complete this demo. | ||
|
||
This demo provides a structured approach to fine-tuning the Phi-3 model using AI Tools VSCode Extensions and deploying it with Azure Machine Learning Service | ||
|
||
***Note*** Please Ensure your Azure Subscription has access to an Azure Compute A100 GPU to complete this demo. | ||
|
||
**Sample Code** | ||
|
||
| Step | Description | Operation | | ||
|-------------------|----------------------------------|-------------------| | ||
|01.Installation| Please follow this step to set your env|[Go](./qa_e2e/docs/01.Installation.md)| | ||
|02.Prepare your QA datasets| Prepare your datasets, and tell you how to clean your datasets|[Go](./qa_e2e/docs/02.PrepareDatasets.md)| | ||
|03.Use Microsoft Olive to architect SLMOps | Using Microsoft Olive tools to fit your SLMOps cycle|[Go](./qa_e2e/docs/03.E2E_LoRA&QLoRA_Config_With_Olive.md)| | ||
|04.Inference your Fine-tuning models| Inference your onnx model after fine tuning|[Go](./qa_e2e/docs/04.E2E_Inference_ORT.md)| | ||
## Demo-02 : Fine-tuning Phi-3 with AI Tools VSCode Extensions | ||
|
||
Using Azure AI Tools & Microsoft VS Code | ||
|
||
This demo guides you through the process of fine-tuning the Phi-3 model using AI Tools VSCode Extensions, including steps for fine-tuning, inference, and deployment using Azure Machine Learning Service. Ensure your Azure subscription has access to an Azure Compute A100 GPU to complete this demo. | ||
|
||
This demo provides a structured approach to fine-tuning the Phi-3 model using AI Tools VSCode Extensions and deploying it with Azure Machine Learning Service | ||
|
||
***Note*** Please Ensure your Azure Subscription has access to an Azure Compute A100 GPU to complete this demo. | ||
|
||
**Sample Code** | ||
|
||
| Step | Description | Operation | | ||
|-------------------|----------------------------------|-------------------| | ||
|01.Installation| Please follow this step to set your env|[Go](./qa_e2e/docs/01.Installation.md)| | ||
|02.Prepare your QA datasets| Prepare your datasets, and tell you how to clean your datasets|[Go](./qa_e2e/docs/02.PrepareDatasets.md)| | ||
|03.Use Microsoft Olive to architect SLMOps | Using Microsoft Olive tools to fit your SLMOps cycle|[Go](./qa_e2e/docs/03.E2E_LoRA&QLoRA_Config_With_Olive.md)| | ||
|04.Inference your Fine-tuning models| Inference your onnx model after fine tuning|[Go](./qa_e2e/docs/04.E2E_Inference_ORT.md)| |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
30 changes: 15 additions & 15 deletions
30
...sSolutionE2E/qa_e2e/docs/requirements.txt → ...sSolutionE2E/qa_e2e/docs/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
einops | ||
accelerate | ||
bitsandbytes | ||
datasets | ||
huggingface_hub | ||
peft | ||
scipy | ||
neural-compressor | ||
sentencepiece | ||
torch>=2.2.0 | ||
transformers | ||
onnxscript>=0.1.0.dev20240126 | ||
git+https://github.com/microsoft/Olive | ||
--extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ | ||
ort-nightly-gpu==1.18.0.dev20240307004 | ||
einops | ||
accelerate | ||
bitsandbytes | ||
datasets | ||
huggingface_hub | ||
peft | ||
scipy | ||
neural-compressor | ||
sentencepiece | ||
torch>=2.2.0 | ||
transformers | ||
onnxscript>=0.1.0.dev20240126 | ||
git+https://github.com/microsoft/Olive | ||
--extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ | ||
ort-nightly-gpu==1.18.0.dev20240307004 | ||
onnxruntime-genai |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
88 changes: 44 additions & 44 deletions
88
...Aspire.AppHost/Phi3.Aspire.AppHost.csproj → ...Aspire.AppHost/Phi3.Aspire.AppHost.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<IsAspireHost>true</IsAspireHost> | ||
<UserSecretsId>35500357-d54a-4562-89ac-5a1324a55e40</UserSecretsId> | ||
</PropertyGroup> | ||
|
||
|
||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Phi3.Aspire.ModelService\Phi3.Aspire.ModelService.csproj" /> | ||
<!-- <ProjectReference Include="..\Phi3.Aspire.Console\Phi3.Aspire.Console.csproj" /> --> | ||
<ProjectReference Include="..\Phi3.Aspire.SK.API\Phi3.Aspire.SK.API.csproj" /> | ||
<!-- <ProjectReference Include="..\Phi3.Aspire.SK.RAG.API\Phi3.Aspire.SK.RAG.API.csproj" /> --> | ||
<!-- <ProjectReference Include="..\Phi3.Aspire.FrontEnd\Phi3.Aspire.FrontEnd.csproj" /> --> | ||
<!-- <ProjectReference Include="..\Phi3.Aspire.WebApp\Phi3.Aspire.WebApp.csproj" /> --> | ||
<!-- <ProjectReference Include="..\Phi3.Aspire.WasmApp\Phi3.Aspire.WasmApp.csproj" /> --> | ||
</ItemGroup> | ||
|
||
|
||
<ItemGroup> | ||
<PackageReference Include="Aspire.Hosting.AppHost" Version="8.0.2" /> | ||
<PackageReference Include="Aspire.Hosting.NodeJs" Version="8.0.2" /> | ||
<PackageReference Include="Aspire.Hosting.Qdrant" Version="8.0.2" /> | ||
<PackageReference Include="Aspire.Hosting.Redis" Version="8.0.2" /> | ||
</ItemGroup> | ||
|
||
|
||
|
||
<Target Name="RestoreNpm" BeforeTargets="Build" Condition=" '$(DesignTimeBuild)' != 'true' "> | ||
<ItemGroup> | ||
<PackageJsons Include="..\*\package.json" /> | ||
</ItemGroup> | ||
|
||
<!-- Install npm packages if node_modules is missing --> | ||
<Message Importance="Normal" Text="Installing npm packages for %(PackageJsons.RelativeDir)" Condition="!Exists('%(PackageJsons.RootDir)%(PackageJsons.Directory)/node_modules')" /> | ||
<Exec Command="npm install" WorkingDirectory="%(PackageJsons.RootDir)%(PackageJsons.Directory)" Condition="!Exists('%(PackageJsons.RootDir)%(PackageJsons.Directory)/node_modules')" /> | ||
</Target> | ||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<IsAspireHost>true</IsAspireHost> | ||
<UserSecretsId>35500357-d54a-4562-89ac-5a1324a55e40</UserSecretsId> | ||
</PropertyGroup> | ||
|
||
|
||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Phi3.Aspire.ModelService\Phi3.Aspire.ModelService.csproj" /> | ||
<!-- <ProjectReference Include="..\Phi3.Aspire.Console\Phi3.Aspire.Console.csproj" /> --> | ||
<ProjectReference Include="..\Phi3.Aspire.SK.API\Phi3.Aspire.SK.API.csproj" /> | ||
<!-- <ProjectReference Include="..\Phi3.Aspire.SK.RAG.API\Phi3.Aspire.SK.RAG.API.csproj" /> --> | ||
<!-- <ProjectReference Include="..\Phi3.Aspire.FrontEnd\Phi3.Aspire.FrontEnd.csproj" /> --> | ||
<!-- <ProjectReference Include="..\Phi3.Aspire.WebApp\Phi3.Aspire.WebApp.csproj" /> --> | ||
<!-- <ProjectReference Include="..\Phi3.Aspire.WasmApp\Phi3.Aspire.WasmApp.csproj" /> --> | ||
</ItemGroup> | ||
|
||
|
||
<ItemGroup> | ||
<PackageReference Include="Aspire.Hosting.AppHost" Version="8.0.2" /> | ||
<PackageReference Include="Aspire.Hosting.NodeJs" Version="8.0.2" /> | ||
<PackageReference Include="Aspire.Hosting.Qdrant" Version="8.0.2" /> | ||
<PackageReference Include="Aspire.Hosting.Redis" Version="8.0.2" /> | ||
</ItemGroup> | ||
|
||
|
||
|
||
<Target Name="RestoreNpm" BeforeTargets="Build" Condition=" '$(DesignTimeBuild)' != 'true' "> | ||
<ItemGroup> | ||
<PackageJsons Include="..\*\package.json" /> | ||
</ItemGroup> | ||
|
||
<!-- Install npm packages if node_modules is missing --> | ||
<Message Importance="Normal" Text="Installing npm packages for %(PackageJsons.RelativeDir)" Condition="!Exists('%(PackageJsons.RootDir)%(PackageJsons.Directory)/node_modules')" /> | ||
<Exec Command="npm install" WorkingDirectory="%(PackageJsons.RootDir)%(PackageJsons.Directory)" Condition="!Exists('%(PackageJsons.RootDir)%(PackageJsons.Directory)/node_modules')" /> | ||
</Target> | ||
|
||
</Project> |
46 changes: 23 additions & 23 deletions
46
...tNETAspire/Phi3.Aspire.AppHost/Program.cs → ...tNETAspire/Phi3.Aspire.AppHost/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
var builder = DistributedApplication.CreateBuilder(args); | ||
|
||
|
||
var cache = builder.AddRedis("cache"); | ||
|
||
|
||
var phi3service = builder.AddProject<Projects.Phi3_Aspire_ModelService>("phi3service"); | ||
|
||
|
||
|
||
var skService = builder.AddProject<Projects.Phi3_Aspire_SK_API>("skservice") | ||
.WithExternalHttpEndpoints() | ||
.WithReference(phi3service); | ||
|
||
|
||
builder.AddNpmApp("vue", "../Phi3.Aspire.Vue") | ||
.WithReference(skService) | ||
.WithHttpEndpoint(env: "PORT") | ||
.WithExternalHttpEndpoints() | ||
.PublishAsDockerFile(); | ||
|
||
|
||
builder.Build().Run(); | ||
var builder = DistributedApplication.CreateBuilder(args); | ||
|
||
|
||
var cache = builder.AddRedis("cache"); | ||
|
||
|
||
var phi3service = builder.AddProject<Projects.Phi3_Aspire_ModelService>("phi3service"); | ||
|
||
|
||
|
||
var skService = builder.AddProject<Projects.Phi3_Aspire_SK_API>("skservice") | ||
.WithExternalHttpEndpoints() | ||
.WithReference(phi3service); | ||
|
||
|
||
builder.AddNpmApp("vue", "../Phi3.Aspire.Vue") | ||
.WithReference(skService) | ||
.WithHttpEndpoint(env: "PORT") | ||
.WithExternalHttpEndpoints() | ||
.PublishAsDockerFile(); | ||
|
||
|
||
builder.Build().Run(); |
58 changes: 29 additions & 29 deletions
58
...re.AppHost/Properties/launchSettings.json → ...re.AppHost/Properties/launchSettings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/launchsettings.json", | ||
"profiles": { | ||
"https": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "https://localhost:17189;http://localhost:15147", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"DOTNET_ENVIRONMENT": "Development", | ||
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21259", | ||
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22132" | ||
} | ||
}, | ||
"http": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "http://localhost:15147", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"DOTNET_ENVIRONMENT": "Development", | ||
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19053", | ||
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20110" | ||
} | ||
} | ||
} | ||
} | ||
{ | ||
"$schema": "https://json.schemastore.org/launchsettings.json", | ||
"profiles": { | ||
"https": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "https://localhost:17189;http://localhost:15147", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"DOTNET_ENVIRONMENT": "Development", | ||
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21259", | ||
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22132" | ||
} | ||
}, | ||
"http": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "http://localhost:15147", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"DOTNET_ENVIRONMENT": "Development", | ||
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19053", | ||
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20110" | ||
} | ||
} | ||
} | ||
} |
16 changes: 8 additions & 8 deletions
16
...pire.AppHost/appsettings.Development.json → ...pire.AppHost/appsettings.Development.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning" | ||
} | ||
} | ||
} | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning" | ||
} | ||
} | ||
} |
18 changes: 9 additions & 9 deletions
18
...pire/Phi3.Aspire.AppHost/appsettings.json → ...pire/Phi3.Aspire.AppHost/appsettings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning", | ||
"Aspire.Hosting.Dcp": "Warning" | ||
} | ||
} | ||
} | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning", | ||
"Aspire.Hosting.Dcp": "Warning" | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 19 additions & 19 deletions
38
...elService/Phi3.Aspire.ModelService.csproj → ...elService/Phi3.Aspire.ModelService.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.18.0" /> | ||
<PackageReference Include="Microsoft.ML.OnnxRuntimeGenAI" Version="0.3.0" /> | ||
</ItemGroup> | ||
|
||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Phi3.Aspire.ServiceDefaults\Phi3.Aspire.ServiceDefaults.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.18.0" /> | ||
<PackageReference Include="Microsoft.ML.OnnxRuntimeGenAI" Version="0.3.0" /> | ||
</ItemGroup> | ||
|
||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Phi3.Aspire.ServiceDefaults\Phi3.Aspire.ServiceDefaults.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
File renamed without changes.
Oops, something went wrong.