Skip to content

Commit

Permalink
Fix name_to_dtype error in export.py (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
guangy10 authored Apr 11, 2024
1 parent 9540f04 commit bf2ccad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions export.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from model import Transformer
from generate import _load_model, decode_one_token
from quantize import quantize_model
from quantize import quantize_model, name_to_dtype
from torch._export import capture_pre_autograd_graph

default_device = "cpu" # 'cuda' if torch.cuda.is_available() else 'cpu'
Expand Down Expand Up @@ -77,7 +77,7 @@ def main(checkpoint_path, device, quantize = "{ }", args = None):
# dtype:
if args.dtype:
model.to(dtype=name_to_dtype(args.dtype))

model = model_wrapper(model, device=device)

output_pte_path = args.output_pte_path
Expand Down

0 comments on commit bf2ccad

Please sign in to comment.