-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support double quant for weight-only (#1420)
Description popular repos, like bitsandbytes, llama.cpp, provides double quant on scale to improve the compression ratio of weight-only model. Theoretically, double quant will quantize the scales of several blocks and use a hyper scale and a hyper zeropoint to recover it. Using below args in RTNWeightQuantConfig to set double quant for scales double_quant_dtype double_quant_bits double_quant_sym double_quant_group_size Demo code can be found in UT.
- Loading branch information
Showing
9 changed files
with
1,008 additions
and
298 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
neural_compressor/torch/algorithms/weight_only/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright (c) 2023 Intel Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.