File tree Expand file tree Collapse file tree 9 files changed +54
-0
lines changed Expand file tree Collapse file tree 9 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+
4
+ # This source code is licensed under the license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
1
7
from smoothquant import * # noqa: F403
2
8
from quant_api import * # noqa: F403
3
9
from subclass import * # noqa: F403
Original file line number Diff line number Diff line change
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+
4
+ # This source code is licensed under the license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
1
7
import torch
2
8
import torch .nn as nn
3
9
from quant_primitives import (
Original file line number Diff line number Diff line change
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+
4
+ # This source code is licensed under the license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
1
7
"""
2
8
Quantization API stuff which is not specific to SmoothQuant
3
9
Original file line number Diff line number Diff line change
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+
4
+ # This source code is licensed under the license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
1
7
import torch
2
8
from torch ._dynamo import is_compiling as dynamo_is_compiling
3
9
from torch ._higher_order_ops .out_dtype import out_dtype
Original file line number Diff line number Diff line change
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+
4
+ # This source code is licensed under the license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
1
7
"""
2
8
Testing out accuracy-only implementation of SmoothQuant
3
9
(https://arxiv.org/pdf/2211.10438.pdf)
Original file line number Diff line number Diff line change
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+
4
+ # This source code is licensed under the license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
1
7
import torch
2
8
from quant_primitives import (
3
9
dequantize_per_channel ,
Original file line number Diff line number Diff line change
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+
4
+ # This source code is licensed under the license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
1
7
# mypy: ignore-errors
2
8
import copy
3
9
import unittest
Original file line number Diff line number Diff line change
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+
4
+ # This source code is licensed under the license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
1
7
import os
2
8
from typing import Dict , Optional
3
9
Original file line number Diff line number Diff line change
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+
4
+ # This source code is licensed under the license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
1
7
import torch
2
8
from quant_primitives import (
3
9
dynamically_quantize_per_channel ,
You can’t perform that action at this time.
0 commit comments