Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Oct 14, 2024
1 parent dd8253c commit 23a02bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions optimum/onnxruntime/modeling_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def __init__(
setattr(self.generation_config, param_name, param_value)
setattr(self.config, param_name, None)

self.model_path = Path(model._model_path)
self.use_merged = "use_cache_branch" in self.input_names
self.model_type = self.config.model_type

Expand Down
2 changes: 1 addition & 1 deletion optimum/onnxruntime/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def from_pretrained(
"Please re-export your model. This can be done by using the optimum-cli ONNX export tool or `ORTModelForCausalLM.from_pretrained(..., export=True, use_merged=False)`."
)
else:
onnx_model_path.append(model_or_path.model._model_path)
onnx_model_path.append(model_or_path.model_path)
config = model_or_path.config
elif os.path.isdir(model_or_path):
from_ortmodel = False
Expand Down

0 comments on commit 23a02bd

Please sign in to comment.