Skip to content

Conversation

n1ck-guo
Copy link
Contributor

No description provided.

Comment on lines +556 to +559
sq = SmoothQuant(model, dataloader, device=model.device, group_size=-1)
model = sq.transform_model(
alpha=0.5,
# alpha="auto",
Copy link
Contributor

Choose a reason for hiding this comment

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

when using auto alpha, layer_config and all the quantization config like data type must know


import torch

from auto_round.data_type.utils import reshape_pad_tensor_by_group_size
Copy link
Contributor

Choose a reason for hiding this comment

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

move to auto-round/alg_ext?


return save_input_hook

@torch.no_grad()
Copy link
Contributor

Choose a reason for hiding this comment

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

prioritize to use torch.inference_mode first, if there are any issues, fallback to no_grad

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.

2 participants