mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
fix bf16 and add comments (#4106)
This commit is contained in:
@@ -16,6 +16,8 @@ quantization module
|
||||
"""
|
||||
from typing import Dict, List, Type
|
||||
|
||||
from fastdeploy.utils import parse_quantization
|
||||
|
||||
from .quant_base import QuantConfigBase
|
||||
|
||||
QUANTIZATION_METHODS: List[str] = [
|
||||
@@ -35,6 +37,8 @@ QUANTIZATION_METHODS: List[str] = [
|
||||
|
||||
|
||||
def parse_quant_config(args, model_config, is_ernie, is_v1_loader):
|
||||
if args.quantization is not None and isinstance(args.quantization, str):
|
||||
args.quantization = parse_quantization(args.quantization)
|
||||
# 1.model_config.is_quantized
|
||||
# TODO(bukejiyu) model_config.is_quantized is v0 only need to be removed in future
|
||||
if model_config.model_format == "torch":
|
||||
|
Reference in New Issue
Block a user