File tree Expand file tree Collapse file tree 7 files changed +20
-20
lines changed Expand file tree Collapse file tree 7 files changed +20
-20
lines changed Original file line number Diff line number Diff line change 14
14
15
15
from torch .ao .quantization import MinMaxObserver , QConfigMapping
16
16
17
- from dynamic_quant import (
17
+ from torchao . quantization . dynamic_quant import (
18
18
DynamicallyPerAxisQuantizedLinear ,
19
19
)
20
- from quant_api import (
20
+ from torchao . quantization . quant_api import (
21
21
apply_dynamic_quant ,
22
22
apply_weight_only_int8_quant ,
23
23
change_linear_weights_to_dqtensors ,
24
24
)
25
- from quant_primitives import (
25
+ from torchao . quantization . quant_primitives import (
26
26
dequantize_per_channel ,
27
27
dequantize_per_tensor ,
28
28
dynamically_quantize_per_channel ,
33
33
safe_int_mm ,
34
34
)
35
35
36
- from smoothquant import (
36
+ from torchao . quantization . smoothquant import (
37
37
get_scale ,
38
38
replace_with_custom_fn_if_matches_filter ,
39
39
smooth_fq_linear_to_inference ,
40
40
SmoothFakeDynamicallyQuantizedLinear ,
41
41
swap_linear_with_smooth_fq_linear ,
42
42
)
43
- from subclass import (
43
+ from torchao . quantization . subclass import (
44
44
DynamicallyQuantizedLinearWeight ,
45
45
)
46
- from utils import (
46
+ from torchao . quantization . utils import (
47
47
apply_logging_hook ,
48
48
compute_error ,
49
49
compute_error as SQNR ,
Original file line number Diff line number Diff line change 4
4
# This source code is licensed under the license found in the
5
5
# LICENSE file in the root directory of this source tree.
6
6
7
- from smoothquant import * # noqa: F403
8
- from quant_api import * # noqa: F403
9
- from subclass import * # noqa: F403
10
- from quant_primitives import * # noqa: F403
11
- from utils import * # noqa: F403
12
- from weight_only import * # noqa: F403
7
+ from . smoothquant import * # noqa: F403
8
+ from . quant_api import * # noqa: F403
9
+ from . subclass import * # noqa: F403
10
+ from . quant_primitives import * # noqa: F403
11
+ from . utils import * # noqa: F403
12
+ from . weight_only import * # noqa: F403
13
13
14
14
__all__ = [
15
15
"DynamicallyPerAxisQuantizedLinear" ,
Original file line number Diff line number Diff line change 6
6
7
7
import torch
8
8
import torch .nn as nn
9
- from quant_primitives import (
9
+ from . quant_primitives import (
10
10
dynamically_quantize_per_channel ,
11
11
quant_int8_dynamic_per_token_linear ,
12
12
)
Original file line number Diff line number Diff line change 12
12
"""
13
13
14
14
import torch
15
- from dynamic_quant import (
15
+ from . dynamic_quant import (
16
16
DynamicallyPerAxisQuantizedLinear ,
17
17
)
18
- from subclass import (
18
+ from . subclass import (
19
19
DynamicallyQuantizedLinearWeight ,
20
20
)
21
- from weight_only import (
21
+ from . weight_only import (
22
22
WeightOnlyInt8QuantLinear ,
23
23
)
24
24
Original file line number Diff line number Diff line change 14
14
15
15
import torch
16
16
import torch .nn .functional as F
17
- import quant_api
17
+ import torchao . quantization . quant_api as quant_api
18
18
19
- from quant_primitives import (
19
+ from . quant_primitives import (
20
20
dynamically_quantize_per_channel ,
21
21
quant_int8_dynamic_per_token_linear ,
22
22
)
Original file line number Diff line number Diff line change 5
5
# LICENSE file in the root directory of this source tree.
6
6
7
7
import torch
8
- from quant_primitives import (
8
+ from . quant_primitives import (
9
9
dequantize_per_channel ,
10
10
dynamically_quantize_per_channel ,
11
11
quant_int8_dynamic_per_token_linear ,
Original file line number Diff line number Diff line change 5
5
# LICENSE file in the root directory of this source tree.
6
6
7
7
import torch
8
- from quant_primitives import (
8
+ from . quant_primitives import (
9
9
dynamically_quantize_per_channel ,
10
10
)
11
11
You can’t perform that action at this time.
0 commit comments