dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
9.05k stars 1.88k forks source link

[GenAI] SFT Example #7316

Open LittleLittleCloud opened 3 days ago

LittleLittleCloud commented 3 days ago

We are excited to review your PR.

So we can do the best job, please check:

codecov[bot] commented 3 days ago

Codecov Report

Attention: Patch coverage is 75.00000% with 37 lines in your changes missing coverage. Please review.

Project coverage is 68.89%. Comparing base (5090327) to head (e14b353). Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/Microsoft.ML.GenAI.LLaMA/LlamaForCausalLM.cs 0.00% 13 Missing :warning:
...Microsoft.ML.GenAI.Core/Trainer/CausalLMDataset.cs 80.95% 9 Missing and 3 partials :warning:
...soft.ML.GenAI.Core/Pipeline/CausalLMModelOutput.cs 0.00% 4 Missing :warning:
src/Microsoft.ML.GenAI.LLaMA/Module/LlamaModel.cs 0.00% 4 Missing :warning:
...osoft.ML.GenAI.Phi/Phi3/Phi3ChatTemplateBuilder.cs 0.00% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7316 +/- ## ========================================== + Coverage 68.87% 68.89% +0.02% ========================================== Files 1470 1472 +2 Lines 274005 274150 +145 Branches 28403 28412 +9 ========================================== + Hits 188717 188880 +163 + Misses 77970 77947 -23 - Partials 7318 7323 +5 ``` | [Flag](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [Debug](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `68.89% <75.00%> (+0.02%)` | :arrow_up: | | [production](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `63.30% <61.05%> (+0.02%)` | :arrow_up: | | [test](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `89.41% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [...osoft.ML.GenAI.Core/Pipeline/CausalLMModelInput.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.Core%2FPipeline%2FCausalLMModelInput.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5Db3JlL1BpcGVsaW5lL0NhdXNhbExNTW9kZWxJbnB1dC5jcw==) | `96.77% <100.00%> (+96.77%)` | :arrow_up: | | [...soft.ML.GenAI.LLaMA/Llama3\_1ChatTemplateBuilder.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.LLaMA%2FLlama3_1ChatTemplateBuilder.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5MTGFNQS9MbGFtYTNfMUNoYXRUZW1wbGF0ZUJ1aWxkZXIuY3M=) | `70.00% <100.00%> (+1.16%)` | :arrow_up: | | [...crosoft.ML.GenAI.Core.Tests/CasualLMDatasetTest.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316?src=pr&el=tree&filepath=test%2FMicrosoft.ML.GenAI.Core.Tests%2FCasualLMDatasetTest.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-dGVzdC9NaWNyb3NvZnQuTUwuR2VuQUkuQ29yZS5UZXN0cy9DYXN1YWxMTURhdGFzZXRUZXN0LmNz) | `100.00% <100.00%> (ø)` | | | [...soft.ML.GenAI.Core/Pipeline/CausalLMModelOutput.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.Core%2FPipeline%2FCausalLMModelOutput.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5Db3JlL1BpcGVsaW5lL0NhdXNhbExNTW9kZWxPdXRwdXQuY3M=) | `0.00% <0.00%> (ø)` | | | [src/Microsoft.ML.GenAI.LLaMA/Module/LlamaModel.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.LLaMA%2FModule%2FLlamaModel.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5MTGFNQS9Nb2R1bGUvTGxhbWFNb2RlbC5jcw==) | `17.82% <0.00%> (-0.74%)` | :arrow_down: | | [...osoft.ML.GenAI.Phi/Phi3/Phi3ChatTemplateBuilder.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.Phi%2FPhi3%2FPhi3ChatTemplateBuilder.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5QaGkvUGhpMy9QaGkzQ2hhdFRlbXBsYXRlQnVpbGRlci5jcw==) | `42.10% <0.00%> (-1.74%)` | :arrow_down: | | [...Microsoft.ML.GenAI.Core/Trainer/CausalLMDataset.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.Core%2FTrainer%2FCausalLMDataset.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5Db3JlL1RyYWluZXIvQ2F1c2FsTE1EYXRhc2V0LmNz) | `80.95% <80.95%> (ø)` | | | [src/Microsoft.ML.GenAI.LLaMA/LlamaForCausalLM.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.LLaMA%2FLlamaForCausalLM.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5MTGFNQS9MbGFtYUZvckNhdXNhbExNLmNz) | `15.30% <0.00%> (-2.35%)` | :arrow_down: | ... and [10 files with indirect coverage changes](https://app.codecov.io/gh/dotnet/machinelearning/pull/7316/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet)

🚨 Try these New Features: