-
Notifications
You must be signed in to change notification settings - Fork 59
Minor refactor for LLMC #993
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yi <[email protected]>
Signed-off-by: root <[email protected]>
Signed-off-by: root <[email protected]>
Signed-off-by: root <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
| block, self.device_map, input_ids, self.low_gpu_mem_usage, self.batch_size, device | ||
| ) | ||
| if normalize_inputs: | ||
| input_ids, input_others = normalize_input(inputs) |
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 not moving these change to llmc side
auto_round/compressors/base.py
Outdated
|
|
||
| # function decorator to dump the func time | ||
| def time_logger(func: Callable) -> Callable: | ||
| """Decorator to log the execution time of a function. |
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.
move to utils file
| self.inner_supported_types = tuple(x for x in INNER_SUPPORTED_LAYER_TYPES if x != "FP8Linear") | ||
| self.batch_dim = None | ||
| # TODO: check with heng/weiwei | ||
| self.batch_dim = 0 |
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.
if this is required, hidden in kwargs, and add comments
| q_inputs = q_inputs.pop(input_id_str[0], None) | ||
| return inputs, q_inputs | ||
|
|
||
| def configure_layer_config(self, enable_gguf_official_mixed: None | bool = False): |
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.
better set the enable_gguf_official_mixed to True by default
auto_round/compressors/base.py
Outdated
| q_input: Union[torch.Tensor, dict, None] = None, | ||
| normalize_inputs: bool = False, | ||
| device: Union[str, torch.device] = "cpu", | ||
| auto_offload=True |
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.
@n1ck-guo is working on splitting this function. We should avoid fusing too many operations that are not actually used by AutoRound itself in this function.
No description provided.