Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
JingyaHuang committed Jan 12, 2024
1 parent 4d25ed2 commit 8966e11
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions optimum/exporters/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1682,9 +1682,11 @@ def standardize_model_attributes(
if "Transformer" in model[0].__class__.__name__:
model.config = model[0].auto_model.config
model.config.model_type = "sentence-transformers-transformer"
model.config.__class__.model_type = "sentence-transformers-transformer"
elif "CLIP" in model[0].__class__.__name__:
model.config = model[0].model.config
model.config.model_type = "sentence-transformers-clip"
model.config.__class__.model_type = "sentence-transformers-clip"
else:
raise ValueError(
f"The export of a sentence-transformers model with the first module being {model[0].__class__.__name__} is currently not supported in Optimum. Please open an issue or submit a PR to add the support."
Expand Down

0 comments on commit 8966e11

Please sign in to comment.