Skip to content

Commit

Permalink
fix float point
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardozcm committed Jul 1, 2024
1 parent 5d27cd2 commit c614dd5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/llm/src/ipex_llm/transformers/npu_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ def from_pretrained(cls,
optimize_llm(model)
if qtype == "sym_int8_rtn":
cls.load_convert(qtype, model, *args, **kwargs)
elif not qtype.is_floating_point:
model = quantize_model(model, qtype)
else:
if not qtype.is_floating_point:
model = quantize_model(model, qtype)
create_npu_kernels(model)
model = model.eval()
except ImportError as _e:
Expand Down

0 comments on commit c614dd5

Please sign in to comment.