-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat: HuggingFaceLocalGenerator
- first implementation
#6022
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.
Looks awesome, left some minor comments
haystack/preview/components/generators/hugging_face/hugging_face_local.py
Outdated
Show resolved
Hide resolved
haystack/preview/components/generators/hugging_face/hugging_face_local.py
Show resolved
Hide resolved
haystack/preview/components/generators/hugging_face/hugging_face_local.py
Outdated
Show resolved
Hide resolved
@dfokina can you take a look at the docstrings? |
HuggingFaceLocalGenerator
HuggingFaceLocalGenerator
- first implementation
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.
Pushed a small language update, looks good :)
Sorry for extra spaces in docstrings @anakin87 😬 |
Related Issues
HuggingFaceLocalGenerator
- minimal implementation #6004Proposed Changes:
HuggingFaceLocalGenerator
is a 2.x component that generates text, by locally running a Hugging Face pipeline(same purpose of Hugging Face invocation layer for PromptNode)
Simple usage: you can just specify
model_name_or_path
text generation can be influenced using
generation_kwargs
Customizable: experienced users can have full control of the Hugging Face pipeline using
pipeline_kwargs
📓 Notebook with usage examples (potentially useful for docs and devrel purposes)
How did you test it?
CI, new unit tests, manual tests
Notes for the reviewer
This is a first implementation.
Some features (max length handling, stopwords, streaming) are missing and are tracked in #5953.
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.