Skip to content

Commit c13afc9

Browse files
committed
Remove INT8 DQ
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
1 parent dfd6758 commit c13afc9

File tree

2 files changed

+2
-272
lines changed

2 files changed

+2
-272
lines changed

aiu_fms_testing_utils/utils/direct_quantization.py

Lines changed: 0 additions & 260 deletions
This file was deleted.

scripts/run_encoder.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# Local Packages
1111
from aiu_fms_testing_utils.utils.aiu_setup import dprint, rank, world_size
1212
from aiu_fms_testing_utils.utils.args_parsing import get_args
13+
from aiu_fms_testing_utils.utils.direct_quantization import run_dq_roberta
1314
from aiu_fms_testing_utils.utils.encoders_utils import (
1415
wrap_encoder,
1516
run_encoder_eval_qa,
@@ -37,17 +38,6 @@
3738
# Main model setup
3839
default_dtype, device, dist_strat = setup_model(args)
3940

40-
model_path = args.model_path
41-
if args.int8_direct_quantization:
42-
save_path = None
43-
44-
# !!! insert DQ for encoders here
45-
# pass default_dtype to DQ function
46-
47-
# if DQ is used, args.model_path represent FP16 ckpt but we need to load the
48-
# newly-created INT8 ckpt. Without DQ, args.model_path is the INT8 ckpt already.
49-
model_path = save_path
50-
5141
# Retrieve linear configuration (quantized or not) to instantiate FMS model
5242
linear_config = get_linear_config(args)
5343

@@ -64,7 +54,7 @@
6454
model = get_model(
6555
args.architecture,
6656
args.variant,
67-
model_path=model_path,
57+
model_path=args.model_path,
6858
device_type="cpu" if args.is_aiu_backend else args.device_type,
6959
data_type=default_dtype,
7060
source=args.model_source,

0 commit comments

Comments
 (0)