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] Support Llama 3.2 1B and 3B model #7245

Closed LittleLittleCloud closed 1 month ago

LittleLittleCloud commented 1 month ago

We are excited to review your PR.

So we can do the best job, please check:

7169

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 50.00000% with 28 lines in your changes missing coverage. Please review.

Project coverage is 68.78%. Comparing base (817a77f) to head (68c7ec2).

Files with missing lines Patch % Lines
src/Microsoft.ML.GenAI.LLaMA/LlamaForCausalLM.cs 33.33% 20 Missing :warning:
...st/Microsoft.ML.GenAI.LLaMA.Tests/LLaMA3_2Tests.cs 77.77% 3 Missing and 1 partial :warning:
src/Microsoft.ML.GenAI.LLaMA/LlamaConfig.cs 66.66% 0 Missing and 2 partials :warning:
src/Microsoft.ML.GenAI.LLaMA/Module/LlamaModel.cs 0.00% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7245 +/- ## ========================================== - Coverage 68.78% 68.78% -0.01% ========================================== Files 1461 1462 +1 Lines 272208 272261 +53 Branches 28168 28176 +8 ========================================== + Hits 187250 187286 +36 - Misses 77720 77730 +10 - Partials 7238 7245 +7 ``` | [Flag](https://app.codecov.io/gh/dotnet/machinelearning/pull/7245/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/7245/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `68.78% <50.00%> (-0.01%)` | :arrow_down: | | [production](https://app.codecov.io/gh/dotnet/machinelearning/pull/7245/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `63.29% <36.84%> (+<0.01%)` | :arrow_up: | | [test](https://app.codecov.io/gh/dotnet/machinelearning/pull/7245/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `89.04% <77.77%> (-0.01%)` | :arrow_down: | 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/7245?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [src/Microsoft.ML.GenAI.LLaMA/LlamaConfig.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7245?src=pr&el=tree&filepath=src%2FMicrosoft.ML.GenAI.LLaMA%2FLlamaConfig.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5HZW5BSS5MTGFNQS9MbGFtYUNvbmZpZy5jcw==) | `91.52% <66.66%> (-2.82%)` | :arrow_down: | | [src/Microsoft.ML.GenAI.LLaMA/Module/LlamaModel.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7245?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.55% <0.00%> (-0.20%)` | :arrow_down: | | [...st/Microsoft.ML.GenAI.LLaMA.Tests/LLaMA3\_2Tests.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7245?src=pr&el=tree&filepath=test%2FMicrosoft.ML.GenAI.LLaMA.Tests%2FLLaMA3_2Tests.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-dGVzdC9NaWNyb3NvZnQuTUwuR2VuQUkuTExhTUEuVGVzdHMvTExhTUEzXzJUZXN0cy5jcw==) | `77.77% <77.77%> (ø)` | | | [src/Microsoft.ML.GenAI.LLaMA/LlamaForCausalLM.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7245?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) | `17.64% <33.33%> (+3.61%)` | :arrow_up: | ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/dotnet/machinelearning/pull/7245/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet)