Skip to content
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

added model_kwargs to huggingface model #1417

Merged
merged 7 commits into from
Oct 18, 2023
Merged

added model_kwargs to huggingface model #1417

merged 7 commits into from
Oct 18, 2023

Conversation

nanbo-liu
Copy link
Contributor

@nanbo-liu nanbo-liu commented Sep 27, 2023

This is for issue 1344
This allow model-settings.json to take model_kwargs:
example below:

{
    "name": "llama",
    "implementation": "mlserver_huggingface.HuggingFaceRuntime",
    "parameters": {
        "extra": {
            "task": "text-generation",
            "pretrained_model": "daryl149/llama-2-7b-hf",
            "model_kwargs": {
                "device_map": "auto",
                "load_in_8bit": true
            }
        }
    }
}

@nanbo-liu
Copy link
Contributor Author

@adriangonz ,could you review it when you have a chance

Copy link
Contributor

@adriangonz adriangonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one @nanbo-liu! This would be a great addition to the HF runtime - thanks for contributing it 🚀

Changes look good - although, could you add some tests to validate that the model kwargs get used? Once tests are in, we should be good to land this one. 👍

@nanbo-liu
Copy link
Contributor Author

@adriangonz ,added unit tests from the latest commit.

Copy link
Contributor

@adriangonz adriangonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brilliant! Thanks for the changes @nanbo-liu !

This should be good to go now 🚀

@nanbo-liu
Copy link
Contributor Author

nanbo-liu commented Oct 4, 2023

@adriangonz ,I rewrite the unit test a little bit. The previous version depends on package accelerate.
I don't want to introduce extra dependency into this repo. Would you take another look when you have a chance.
Need to rerun workflow

@nanbo-liu
Copy link
Contributor Author

@adriangonz, just fixed the unit test bug. would you try again

@nanbo-liu
Copy link
Contributor Author

nanbo-liu commented Oct 10, 2023

@adriangonz ,CICD keeps getting runtime error for catboost.
I see other PRs also got runtime error for catboost

@adriangonz
Copy link
Contributor

Yuuup, it seems there's an unrelated error in the catboost runtime causing some actions to fail. Which means this PR should be good to go as-is 👍

@adriangonz adriangonz merged commit 02e95d1 into SeldonIO:master Oct 18, 2023
27 of 30 checks passed
@nanbo-liu nanbo-liu deleted the issue_1344 branch December 5, 2023 18:51
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.

None yet

2 participants