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] Add Mistral 7B Instruction V0.3 #7231

Closed LittleLittleCloud closed 1 month ago

LittleLittleCloud commented 2 months ago

We are excited to review your PR.

So we can do the best job, please check:

7169

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 47.61905% with 363 lines in your changes missing coverage. Please review.

Project coverage is 68.78%. Comparing base (87a41fa) to head (7eb9f58). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...Microsoft.ML.GenAI.Mistral/MistralCausalLMAgent.cs 0.00% 98 Missing :warning:
src/Microsoft.ML.GenAI.Mistral/MistralModel.cs 18.75% 76 Missing and 2 partials :warning:
.../Microsoft.ML.GenAI.Mistral/MistralDecoderLayer.cs 28.57% 65 Missing :warning:
...c/Microsoft.ML.GenAI.Mistral/MistralForCausalLM.cs 12.30% 57 Missing :warning:
...GenAI.Mistral/Mistral_7B_0_3ChatTemplateBuilder.cs 76.19% 15 Missing and 15 partials :warning:
...crosoft.ML.GenAI.Core/Pipeline/CausalLMPipeline.cs 0.00% 14 Missing :warning:
...crosoft.ML.GenAI.Mistral/MistralTokenizerHelper.cs 80.00% 6 Missing and 1 partial :warning:
src/Microsoft.ML.GenAI.Mistral/MistralMLP.cs 64.70% 6 Missing :warning:
...nAI.Mistral.Tests/Mistral_7B_Instruct_V0_3Tests.cs 95.45% 3 Missing and 1 partial :warning:
src/Microsoft.ML.GenAI.Core/Utils.cs 66.66% 2 Missing and 1 partial :warning:
... and 1 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7231 +/- ## ========================================== - Coverage 68.83% 68.78% -0.05% ========================================== Files 1453 1461 +8 Lines 271562 272208 +646 Branches 28094 28168 +74 ========================================== + Hits 186933 187250 +317 - Misses 77410 77718 +308 - Partials 7219 7240 +21 ``` | [Flag](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231/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/7231/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `68.78% <47.61%> (-0.05%)` | :arrow_down: | | [production](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `63.29% <40.66%> (-0.06%)` | :arrow_down: | | [test](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `89.04% <95.45%> (+<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/7231?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [...soft.ML.GenAI.LLaMA/Llama3\_1ChatTemplateBuilder.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231?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=) | `68.62% <ø> (ø)` | | | [src/Microsoft.ML.GenAI.LLaMA/LlamaCausalLMAgent.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.LLaMA%2FLlamaCausalLMAgent.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5MTGFNQS9MbGFtYUNhdXNhbExNQWdlbnQuY3M=) | `0.00% <ø> (ø)` | | | [src/Microsoft.ML.GenAI.LLaMA/Module/LlamaModel.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231?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==) | `18.75% <ø> (ø)` | | | [src/Microsoft.ML.GenAI.Phi/Phi2/Config.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.Phi%2FPhi2%2FConfig.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5QaGkvUGhpMi9Db25maWcuY3M=) | `98.00% <100.00%> (ø)` | | | [src/Microsoft.ML.GenAI.Phi/Phi3/Config.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.Phi%2FPhi3%2FConfig.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5QaGkvUGhpMy9Db25maWcuY3M=) | `93.84% <100.00%> (ø)` | | | [...c/Microsoft.ML.GenAI.Phi/Phi3/Phi3CausalLMAgent.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.Phi%2FPhi3%2FPhi3CausalLMAgent.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5QaGkvUGhpMy9QaGkzQ2F1c2FsTE1BZ2VudC5jcw==) | `56.71% <ø> (ø)` | | | [src/Microsoft.ML.GenAI.Phi/Utils.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.Phi%2FUtils.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5QaGkvVXRpbHMuY3M=) | `0.00% <ø> (-8.11%)` | :arrow_down: | | [src/Microsoft.ML.GenAI.Mistral/MistralConfig.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.Mistral%2FMistralConfig.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5NaXN0cmFsL01pc3RyYWxDb25maWcuY3M=) | `97.95% <97.95%> (ø)` | | | [src/Microsoft.ML.GenAI.Core/Utils.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.Core%2FUtils.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5Db3JlL1V0aWxzLmNz) | `12.94% <66.66%> (+6.36%)` | :arrow_up: | | [...nAI.Mistral.Tests/Mistral\_7B\_Instruct\_V0\_3Tests.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231?src=pr&el=tree&filepath=test%2FMicrosoft.ML.GenAI.Mistral.Tests%2FMistral_7B_Instruct_V0_3Tests.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-dGVzdC9NaWNyb3NvZnQuTUwuR2VuQUkuTWlzdHJhbC5UZXN0cy9NaXN0cmFsXzdCX0luc3RydWN0X1YwXzNUZXN0cy5jcw==) | `95.45% <95.45%> (ø)` | | | ... and [8 more](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | | ... and [9 files with indirect coverage changes](https://app.codecov.io/gh/dotnet/machinelearning/pull/7231/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet)