-
Notifications
You must be signed in to change notification settings - Fork 9
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
339 support seq2seq models #477
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
backend
schemas
Changes to schemas (which may be public facing)
labels
Dec 6, 2024
dpoulopoulos
added
enhancement
New feature or request
and removed
backend
schemas
Changes to schemas (which may be public facing)
labels
Dec 6, 2024
dpoulopoulos
force-pushed
the
339-support-seq2seq-models
branch
from
December 9, 2024 11:13
07e7a7f
to
598f2bd
Compare
github-actions
bot
added
backend
schemas
Changes to schemas (which may be public facing)
labels
Dec 9, 2024
dpoulopoulos
force-pushed
the
339-support-seq2seq-models
branch
3 times, most recently
from
December 9, 2024 11:20
1226c40
to
8615cd6
Compare
dpoulopoulos
force-pushed
the
339-support-seq2seq-models
branch
from
December 9, 2024 12:39
1fff7cb
to
e4cfa5c
Compare
github-actions
bot
added
the
documentation
Improvements or additions to documentation
label
Dec 9, 2024
aittalam
reviewed
Dec 10, 2024
aittalam
reviewed
Dec 10, 2024
aittalam
reviewed
Dec 10, 2024
aittalam
approved these changes
Dec 10, 2024
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.
Thank you Dimitris! There are a couple of unresolved convos here but I do not think they are blocking, so I am going to pre-approve this and let you close them.
Signed-off-by: Dimitris Poulopoulos <[email protected]>
Upgrade the openai client due to incombatibility with `httpx==0.28.0`. Refs #466 Signed-off-by: Dimitris Poulopoulos <[email protected]>
Rename the `eval_config_args` variable to `job_config_args` to make it more generic. Signed-off-by: Dimitris Poulopoulos <[email protected]>
Support models pulled from Hugging Face Hub, through the `HuggingFaceModelClient`. The client expects a model name (i.e., the model repo ID on HF Hub) and a task (e.g., "summarization"), creates the corresponding pipeline, and uses it for inference. Refs #339 Signed-off-by: Dimitris Poulopoulos <[email protected]>
Extend the set of parameters that one can pass to create a new inference job: * revision: choose the model version (i.e., branch, tag, or commit ID) * use_fast: whether or not to use a fast tokenizer, if possible * torch_dtype: model precision (e.g., float16, float32, "auto") * accelerator: device to use during inference (i.e., "cpu", "cuda", or "mps") Refs #339 Signed-off-by: Dimitris Poulopoulos <[email protected]>
Validate the values of the parameters used in HF pipelines: * Check if the model name is a valid HF repo ID * Check if the task is a supported task * Check if the data type is a valid `torch.dtype` value Refs #339 Signed-off-by: Dimitris Poulopoulos <[email protected]>
Fix the failing unit tests and extend them to cover inference with Hugging Face models. Refs #339 Signed-off-by: Dimitris Poulopoulos <[email protected]>
Support creating distinct inference jobs using the SDK. Refs #339 Signed-off-by: Dimitris Poulopoulos <[email protected]>
Use `lumigator_schemas` and `JobEvalCreate` in the quickstart guide instead if just `schemas` and `JobCreate`. Signed-off-by: Dimitris Poulopoulos <[email protected]>
Add a new user guide to demonstrate how to create and run an inference job, using the Lumigator SDK and a model from Hugging Face Hub. Closes #339 Signed-off-by: Dimitris Poulopoulos <[email protected]>
dpoulopoulos
force-pushed
the
339-support-seq2seq-models
branch
from
December 11, 2024 11:21
9ba27c2
to
ffe1451
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backend
documentation
Improvements or additions to documentation
enhancement
New feature or request
schemas
Changes to schemas (which may be public facing)
sdk
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.
What's changing
Introduces the
HuggingFaceModelClient
to support models pulled from Hugging Face Hub.The client expects a model and a task, and instantiates the corresponding pipeline. For example, if the task is "summarization" the client instantiates the following pipeline:
During the instantiation of the pipeline we consider several things, such as the
dtype
for the model weights and thedevice
we will use during inference (i.e.,cpu
,cuda
, ormps
).Closes #339
How to test it
Steps to test the changes:
Run
make local-up
to deploy Lumigator locally.Upload a dataset using the OpenAPI docs page (
localhost:8000/docs
)Create a new inference job, with the following body:
for translation tasks provide the following body:
Additional notes for reviewers
In theory, this implementation can support any arbitrary task, but we're limited by the way we're loading the dataset. For example, "question-answering" tasks need the dataset to be in the following format:
We treat this as a known limitation.
I already...
/docs
)