-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Refactor existing HuggingFace support to a more robust one #1044
base: main
Are you sure you want to change the base?
Conversation
Hi would love to get your thoughts on this, so that according to the feedbacks I can move forward. Thanks cc: @arnavsinghvi11 |
Hi just wanted to check on whether we can move forward with this PR or not, else we can close it. Thanks :) |
except ImportError as exc: | ||
raise ModuleNotFoundError( | ||
"You need to install the following libraries: ", | ||
"transformers >= 4.30.0, torch==2.2.2, accelerator" |
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.
would eventually be added to pyproject.toml and/or poetry? also would be helpful to give the pip install command to avoid confusion
Hi @Anindyadeep , thanks for this PR refactor of HF! This looks great! I anticipate this PR will eventually replace Looking forward to the next stage of this PR! |
Hey thanks for the reply, on a second though I feel this PR is a very big addition so in that case, I could re-start from the PR implementation, where I can break into smaller parts (which could be easier for you all as well for review) and doing changes from |
Let me know your thoughts @arnavsinghvi11 whenever you find some bandwidth, thanks :) |
Yes that would be great! |
Current status: WIP
The PR motivation started from this issue: #1018
What this PR do?
We have an existing HuggingFace model integration on DsPY. However developers can not use this class with much flexibility. So the goal of the PR is to provide a balanced abstraction such that developers can
The reason is, HuggingFace is very popular for sometimes writing out entire lifecycle. So writing entre pipelines with huggingface and dspy might need to have almost all the supported configs and HF's own addons (like bitsandbytes, peft etc), so that they can focus more on dspy instead of finding wayaround on how to add this or that with dspy huggingface.
Todos
cc: @okhat, let's discuss more about this approach and feel free to provide feedbacks :)