-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[GenAI] Introduce CausalLMPipelineChatClient for MEAI.IChatClient #7270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7270 +/- ##
==========================================
+ Coverage 68.81% 68.84% +0.03%
==========================================
Files 1461 1471 +10
Lines 272405 274124 +1719
Branches 28176 28411 +235
==========================================
+ Hits 187442 188734 +1292
- Misses 77727 78079 +352
- Partials 7236 7311 +75
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/backport to release/4.0 |
|
Started backporting to release/4.0: https://github.com/dotnet/machinelearning/actions/runs/11749726947 |
|
@michaelgsharp backporting to release/4.0 failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: leverage MEAI abstraction
Applying: Update src/Microsoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs
Applying: Update src/Microsoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs
Applying: Update src/Microsoft.ML.GenAI.Phi/Phi3/Phi3CausalLMChatClient.cs
Applying: fix comments
Using index info to reconstruct a base tree...
M src/Microsoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs
M src/Microsoft.ML.GenAI.Phi/Phi3/Phi3CausalLMChatClient.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Microsoft.ML.GenAI.Phi/Phi3/Phi3CausalLMChatClient.cs
Auto-merging src/Microsoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs
CONFLICT (content): Merge conflict in src/Microsoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0005 fix comments
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
@michaelgsharp an error occurred while backporting to release/4.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
…tnet#7270) * leverage MEAI abstraction * Update src/Microsoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs Co-authored-by: Stephen Toub <[email protected]> * Update src/Microsoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs Co-authored-by: Stephen Toub <[email protected]> * Update src/Microsoft.ML.GenAI.Phi/Phi3/Phi3CausalLMChatClient.cs Co-authored-by: Stephen Toub <[email protected]> * fix comments * Update Microsoft.ML.GenAI.Core.csproj --------- Co-authored-by: Stephen Toub <[email protected]>
) (#7298) * leverage MEAI abstraction * Update src/Microsoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs * Update src/Microsoft.ML.GenAI.LLaMA/Llama3CausalLMChatClient.cs * Update src/Microsoft.ML.GenAI.Phi/Phi3/Phi3CausalLMChatClient.cs * fix comments * Update Microsoft.ML.GenAI.Core.csproj --------- Co-authored-by: Xiaoyun Zhang <[email protected]> Co-authored-by: Stephen Toub <[email protected]>
We are excited to review your PR.
So we can do the best job, please check:
Fixes #nnnnin your description to cause GitHub to automatically close the issue(s) when your PR is merged.This PR implements
CausalLMPipelineChatClient<TTokenizer, TCausalLMModel>class for MEAI.IChatClient's intergration.This PR also refactors the AutoGen and semantic kernel intergretion for Phi3, which pulls out the prompt template parts into an individual
Phi3ChatTemplateBuilderclass.This PR also update
STJto 8.0.5 to address a security warning for that packageThe
CausalLMPipelineChatClientis used as the abstract class for allIChatClientimplementation in GenAI models. For now, the following implementations are availableThe
MistralCausalLMChatClientwill come in the following PR with additional support for tool call.Usage
Checkout the
MEAIfolder under Microsoft.ML.GenAI.Samples` for examples. The following examples are added