[Move over to pyember/ember] Hugging Face Models Support #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for Hugging Face models in the Ember framework, enabling access to a wide range of models (including open source LLMs) through both the Hugging Face Inference API and local model loading.
Key Features
HuggingFace Provider Implementation: Full provider implementation with proper error handling, retries, and parameter validation
Dual Inference Options: Support for both remote inference via the HF Inference API and local model inference
Added example using Mistral 7B Instruct v0.2
(Testing) Added unit tests for the HuggingFace provider implementation
Notes
Requires HUGGINGFACE_API_KEY environment variable for remote inference
Model from Hugging Face needs to have HF Inference
huggingface_discovery is currently hardcoded to a couple of models. TODO: We need to make a design decision whether it makes sense to implement discovery either per author or not at all due to the sheer size of models available.