Skip to content

Commit

Permalink
Fixed one more issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKoff88 committed Oct 3, 2023
1 parent aa0c6ad commit 9adc298
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions optimum/exporters/openvino/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,10 @@ def main_export(
onnx_config_constructor = TasksManager.get_exporter_config_constructor(model=model, exporter="onnx", task=task)
onnx_config = onnx_config_constructor(model.config)
models_and_onnx_configs = {"model": (model, onnx_config)}
if model_kwargs is None:
model_kwargs = {}
load_in_8bit = model_kwargs.get("load_in_8bit", None)
if load_in_8bit is None:
if model_kwargs is None:
model_kwargs = {}

if model.num_parameters() >= _MAX_UNCOMPRESSED_DECODER_SIZE:
model_kwargs["load_in_8bit"] = True
else:
Expand Down

0 comments on commit 9adc298

Please sign in to comment.