-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HuggingFace backend implementation #135
HuggingFace backend implementation #135
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be helpful to include the version number user agent
We need to merge the new backend under the AI namespace, along with OpenAI and Azure OpenAI, following the same naming convention. |
dotnet/src/Backends.HuggingFace/HttpSchema/CompletionRequest.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Backends.HuggingFace/HttpSchema/CompletionRequest.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel/AI/Extensions/HttpClientExtensions.cs
Outdated
Show resolved
Hide resolved
could you run resharper CLI to fix the code style? there are a few missing empty lines and incorrect indentations |
@dluc I'm not using resharper, although I run |
@dluc Done, thanks for feedback! |
…s on relevant paths (microsoft#135) ### Motivation and Context <!-- Thank you for your contribution to the copilot-chat repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> updates deploy scripts to have execute permissions, so that they can run correctly in Github, and changes build workflows to run only when the relevant paths are updated. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [Contribution Guidelines](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
Motivation and Context
HuggingFace is a platform with over 120k different models, so we need to provide a way to use these models with Semantic Kernel. While users can implement their own backend implementation for HuggingFace models, we can provide default implementation which will be ready for usage out-of-the-box.
To run models locally, users can run local inference server from our samples:
https://github.com/microsoft/semantic-kernel/tree/experimental-huggingface/samples/apps/local_inference_server
Description
CompletionGenerator
andEmbeddingGenerator
in local inference server.HuggingFaceBackend
class.HuggingFaceBackend
.Contribution Checklist
dotnet format