Skip to content

Conversation

@kunalagrawal2
Copy link

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.

  • Same as [Move over to pyember/ember] Hugging Face Models Support jaredquincy/ember#16. Merged fork of jaredquincy/ember kunalagrawal2/ember:huggingface into fork of pyember/ember, kunalagrawal2/pyember-ember:huggingface (should merge cleanly as most changes were resolved already)

JQ and others added 30 commits January 20, 2025 23:17
…ove the required_inputs attribute and to consolidate the logic to the model-based validation. also, removed the legacy operator type label used by the scheduler, in favor of the graph based scheduler logic which, at an even lower level, groks the fan-in, fan-out, and recurrent structure of operators in the DAG.
User and others added 22 commits March 23, 2025 13:53
- Update vmap.py to use new TransformError class with context
- Update pmap.py to use ValidationError, TransformError, and ParallelExecutionError
- Replace custom exception classes with unified EmberError hierarchy
- Improve error messages with additional context data

This is the first step in a systematic rollout of the new exception architecture.
- Update XCS exceptions to inherit from centralized error hierarchy
- Maintain backward compatibility with diagnostic_context attribute
- Preserve original API surface for smooth transition
- Implement proper context handling with new exception base classes

This change reduces duplication while ensuring existing code continues to work with the improved exception system.
Updated pmap.py to use the new exception hierarchy consistently:
- Changed comment to clarify exception usage
- Made code more consistent with the overall architecture principles
- Removed references to legacy exception handling

This change improves error handling readability and aligns
with the project's domain-driven exception architecture.
@kunalagrawal2
Copy link
Author

@jaredquincy As per Slack, just bumping to re-open this again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants