-
Notifications
You must be signed in to change notification settings - Fork 58
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
[DeepSpeed] Fix datatype and allow checkpoint loading #366
Conversation
@@ -95,11 +95,11 @@ | |||
|
|||
|
|||
def get_torch_dtype_from_str(dtype: str): |
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.
Do we want to include something like this https://github.com/microsoft/DeepSpeed-MII/blob/main/mii/config.py#L7?
Or do we need to add documentation about what the supported dtype strings are in serving.properties?
@@ -140,11 +139,10 @@ def _parse_properties(self, properties): | |||
self.model_dir = properties.get("model_dir") | |||
self.model_id = properties.get("model_id") | |||
self.task = properties.get("task") | |||
self.data_type = get_torch_dtype_from_str(properties.get("data_type", "fp32")) | |||
self.data_type = get_torch_dtype_from_str(properties.get("dtype", "fp16")) |
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.
Why use fp16 as default?
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.
fp16 works better and better range of supported model on DeepSpeed. model like Bloom is not working on fp32
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 mean as a normal user, they will assume fp32 is default. They only override it to fp16 intentionally
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.
most LLM saved on huggingface is under fp16
Description
Add a few fixes on data type and checkpoint loading settings