Add AWQ quantization support for NPU. (#10158)
Co-authored-by: Alisehen <814073252@qq.com> Co-authored-by: Yaochen Han <48639761+Alisehen@users.noreply.github.com> Co-authored-by: Zhengda Qin <zhengdqin@gmail.com>
This commit is contained in:
@@ -612,6 +612,8 @@ class DefaultModelLoader(BaseModelLoader):
|
||||
# parameters onto device for processing and back off after.
|
||||
with device_loading_context(module, target_device):
|
||||
quant_method.process_weights_after_loading(module)
|
||||
if _is_npu:
|
||||
torch.npu.empty_cache()
|
||||
|
||||
|
||||
class LayeredModelLoader(DefaultModelLoader):
|
||||
|
||||
Reference in New Issue
Block a user