2021-06-09 10:23:34 +08:00
|
|
|
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
|
|
|
|
|
#
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
#
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
#
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
2023-11-07 11:14:06 +08:00
|
|
|
from . import qat # noqa: F401
|
|
|
|
|
from .functional_layers import ( # noqa: F401
|
|
|
|
|
FloatFunctionalLayer,
|
|
|
|
|
add,
|
|
|
|
|
concat,
|
|
|
|
|
divide,
|
|
|
|
|
flatten,
|
|
|
|
|
matmul,
|
|
|
|
|
multiply,
|
|
|
|
|
reshape,
|
|
|
|
|
subtract,
|
|
|
|
|
transpose,
|
|
|
|
|
)
|
2021-07-05 10:26:24 +08:00
|
|
|
from .quant_layers import QuantStub # noqa: F401
|
2024-01-17 21:10:36 +08:00
|
|
|
from .quantized_linear import ( # noqa: F401
|
|
|
|
|
apply_per_channel_scale,
|
2023-11-07 11:14:06 +08:00
|
|
|
llm_int8_linear,
|
|
|
|
|
weight_dequantize,
|
|
|
|
|
weight_only_linear,
|
|
|
|
|
weight_quantize,
|
|
|
|
|
)
|
2023-02-16 19:31:28 +08:00
|
|
|
from .stub import Stub
|
2021-06-09 10:23:34 +08:00
|
|
|
|
2023-10-10 16:20:48 +08:00
|
|
|
__all__ = [
|
|
|
|
|
"Stub",
|
|
|
|
|
"weight_only_linear",
|
|
|
|
|
"llm_int8_linear",
|
|
|
|
|
"weight_quantize",
|
|
|
|
|
"weight_dequantize",
|
|
|
|
|
]
|