File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -401,7 +401,8 @@ def _main(
401
401
use_tp
402
402
)
403
403
if dso_path :
404
- assert not model_dtype , f"dtype setting not valid for a DSO model. Specify dtype during export."
404
+ # make sure user did not try to set dtype
405
+ assert model_dtype == "float32" , f"dtype setting not valid for a DSO model. Specify dtype during export."
405
406
assert quantize is None or quantize == "{ }" , f"quantize not valid for exported DSO model. Specify quantization during export."
406
407
try :
407
408
model = model_
@@ -415,7 +416,8 @@ def _main(
415
416
except :
416
417
raise RuntimeError (f"Failed to load AOTI compiled { dso_path } " )
417
418
elif pte_path :
418
- assert not model_dtype , f"dtype setting not valid for a PTE model. Specify dtype during export."
419
+ # make sure user did not try to set dtype
420
+ assert model_dtype == "float32" , f"dtype setting not valid for a DSO model. Specify dtype during export."
419
421
assert quantize is None or quantize == "{ }" , f"quantize not valid for exported PTE model. Specify quantization during export."
420
422
try :
421
423
from model_et import PTEModel
@@ -583,6 +585,8 @@ def main(args):
583
585
args .top_k ,
584
586
args .temperature ,
585
587
args .checkpoint_path ,
588
+ args .checkpoint_dir ,
589
+ args .params_path ,
586
590
args .tokenizer_path ,
587
591
args .compile ,
588
592
args .compile_prefill ,
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def __post_init__(self):
48
48
hidden_dim = int (2 * hidden_dim / 3 )
49
49
if self .ffn_dim_multiplier is not None :
50
50
hidden_dim = int (self .ffn_dim_multiplier * hidden_dim )
51
- self .hidden_dim = multiple_of * (( hidden_dim + multiple_of - 1 ) // multiple_of )
51
+ self .hidden_dim = find_multiple ( hidden_dim , multiple_of )
52
52
self .head_dim = self .dim // self .n_heads
53
53
54
54
@classmethod
You can’t perform that action at this time.
0 commit comments