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

use inplace=True mode for WOQ #1557

Merged
merged 10 commits into from
Jan 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bug fix
Signed-off-by: xin3he <[email protected]>
xin3he committed Jan 23, 2024
commit c30adf5628f2720c6ee39c7a42f1f6b7ba031b89
6 changes: 2 additions & 4 deletions neural_compressor/torch/algorithms/weight_only/rtn.py
Original file line number Diff line number Diff line change
@@ -22,13 +22,11 @@
import torch
from torch.nn import functional as F

from neural_compressor.common import DEBUG, Logger, level
from neural_compressor.torch.utils import logger
from neural_compressor.torch.utils.utility import set_module

from .utility import quant_tensor, search_clip

logger = Logger().get_logger()


def rtn_quantize(
model,
@@ -44,7 +42,7 @@ def rtn_quantize(
group_dim=1,
**kwargs,
):
"""Quant the model with round to nearst method.
"""Quant the model with round to nearest method.
Args:
model: torch module