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:
ErvinXie
2025-10-24 03:08:05 +08:00
committed by GitHub
parent 28b8a4064d
commit 39c237f02c
7 changed files with 243 additions and 11 deletions

View File

@@ -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):