Skip to content

Commit 831107f

Browse files
committed
move to prototype folder
1 parent 6fb1fc4 commit 831107f

File tree

5 files changed

+6
-12
lines changed

5 files changed

+6
-12
lines changed

torchao/_models/llama/generate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def main(
227227
if "spinquant" in quantization:
228228
from torchao.prototype.spinquant import apply_spinquant
229229
apply_spinquant(model)
230-
elif "int8wo" in quantization:
230+
if "int8wo" in quantization:
231231
quantize_(model, int8_weight_only())
232232
elif "int8dq" in quantization:
233233
quantize_(model, int8_dynamic_activation_int8_weight())

torchao/quantization/autoquant_v2.py renamed to torchao/prototype/quantization/autoquant_v2.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
benchmark_model,
3434
)
3535

36-
from .granularity import (
36+
from torchao.quantization.granularity import (
3737
PerRow,
3838
PerTensor,
3939
)
40-
from .subclass import ( # noqa
40+
from torchao.quantization.subclass import ( # noqa
4141
Int8DynamicallyQuantizedLinearWeight,
4242
Int8WeightOnlyQuantizedLinearWeight,
4343
QuantizedLinearWeightBase,

torchao/quantization/__init__.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,10 @@
1515
OTHER_AUTOQUANT_CLASS_LIST,
1616
autoquant,
1717
)
18-
from .autoquant_v2 import (
18+
from torchao.prototype.quantization.autoquant_v2 import (
1919
DEFAULT_AUTOQUANT_CLASS_LIST as V2_DEFAULT_AUTOQUANT_CLASS_LIST,
20-
)
21-
from .autoquant_v2 import (
2220
DEFAULT_INT4_AUTOQUANT_CLASS_LIST as V2_DEFAULT_INT4_AUTOQUANT_CLASS_LIST,
23-
)
24-
from .autoquant_v2 import (
2521
OTHER_AUTOQUANT_CLASS_LIST as V2_OTHER_AUTOQUANT_CLASS_LIST,
26-
)
27-
from .autoquant_v2 import (
2822
autoquant_v2 as _autoquant_v2,
2923
)
3024
from .GPTQ import (

torchao/quantization/quant_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
)
5555

5656
from .autoquant import AutoQuantizableLinearWeight, autoquant
57-
from .autoquant_v2 import AutoQuantizableLinearWeight as AutoQuantizableLinearWeightV2
58-
from .autoquant_v2 import autoquant_v2
57+
from torchao.prototype.quantization.autoquant_v2 import AutoQuantizableLinearWeight as AutoQuantizableLinearWeightV2
58+
from torchao.prototype.quantization.autoquant_v2 import autoquant_v2
5959
from .GPTQ import (
6060
Int4WeightOnlyGPTQQuantizer,
6161
Int4WeightOnlyQuantizer,

0 commit comments

Comments
 (0)