File tree Expand file tree Collapse file tree 2 files changed +2
-272
lines changed
aiu_fms_testing_utils/utils Expand file tree Collapse file tree 2 files changed +2
-272
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 10
10
# Local Packages
11
11
from aiu_fms_testing_utils .utils .aiu_setup import dprint , rank , world_size
12
12
from aiu_fms_testing_utils .utils .args_parsing import get_args
13
+ from aiu_fms_testing_utils .utils .direct_quantization import run_dq_roberta
13
14
from aiu_fms_testing_utils .utils .encoders_utils import (
14
15
wrap_encoder ,
15
16
run_encoder_eval_qa ,
37
38
# Main model setup
38
39
default_dtype , device , dist_strat = setup_model (args )
39
40
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
-
51
41
# Retrieve linear configuration (quantized or not) to instantiate FMS model
52
42
linear_config = get_linear_config (args )
53
43
64
54
model = get_model (
65
55
args .architecture ,
66
56
args .variant ,
67
- model_path = model_path ,
57
+ model_path = args . model_path ,
68
58
device_type = "cpu" if args .is_aiu_backend else args .device_type ,
69
59
data_type = default_dtype ,
70
60
source = args .model_source ,
You can’t perform that action at this time.
0 commit comments