File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
modelopt/torch/quantization/qtensor Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 2323from torch .distributed .fsdp ._fully_shard ._fsdp_param import FSDPParam
2424from torch .distributed .tensor import DTensor
2525
26- from modelopt .torch .quantization .utils import enable_fake_quant , fsdp2_aware_weight_update
27-
2826
2927class QTensorType (enum .Enum ):
3028 """Enumeration for defining types of quantization."""
@@ -234,6 +232,8 @@ def _compress_fsdp_module(fsdp_module):
234232 Returns:
235233 None
236234 """
235+ from modelopt .torch .quantization .utils import enable_fake_quant , fsdp2_aware_weight_update
236+
237237 # Unshard FSDPmodule by temporarily setting _fake_quant to prevent weight compression from being triggered
238238 with enable_fake_quant (fsdp_module ):
239239 fsdp_module .unshard ()
You can’t perform that action at this time.
0 commit comments