-
Notifications
You must be signed in to change notification settings - Fork 263
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
Support configuring precision and quantization in HuggingFaceClient #1912
Conversation
Also, eventually we might require |
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.
LGTM
@@ -56,23 +56,20 @@ def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwa | |||
class HuggingFaceServer: | |||
"""A thin wrapper around a Hugging Face AutoModelForCausalLM for HuggingFaceClient to call.""" | |||
|
|||
def __init__(self, pretrained_model_name_or_path: str, revision: Optional[str] = None): | |||
def __init__(self, pretrained_model_name_or_path: str, **kwargs): |
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.
Should we add a comment here describing common kwargs that should be specified such as revision, precision, ... ?
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.
I would prefer to do this in the docs instead.
ee803fa
to
21898b8
Compare
I think this is now handled by #1903 and we can close this |
21898b8
to
c882746
Compare
be458e3
to
982cdf9
Compare
Support passing the
torch_dtype
,load_in_8bit
andload_in_4bit
parameters toHuggingFaceClient
from theModelDeployment
configuration.Example usage:
prod_env/model_deployments.yaml
:Also clean up
revision
- treat it as as another kwarg rather than treating it specially.