Skip to content

Commit

Permalink
Update optimum/intel/openvino/modeling_decoder.py
Browse files Browse the repository at this point in the history
Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
  • Loading branch information
AlexKoff88 and echarlaix authored Feb 20, 2024
1 parent 7188696 commit d06a344
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion optimum/intel/openvino/modeling_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,9 @@ def _from_pretrained(
else:
init_cls = cls

enable_compilation = kwargs.pop("compile", True) and not load_in_4bit
causal_model = init_cls(
model=model, config=config, model_save_dir=model_cache_path.parent, compile=not load_in_4bit, **kwargs
model=model, config=config, model_save_dir=model_cache_path.parent, compile=enable_compilation, **kwargs
)

if load_in_4bit:
Expand Down

0 comments on commit d06a344

Please sign in to comment.