Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'phi model type is not supported yet in NormalizedConfig. #1614

Closed
2 of 4 tasks
eaidova opened this issue Dec 25, 2023 · 1 comment
Closed
2 of 4 tasks

KeyError: 'phi model type is not supported yet in NormalizedConfig. #1614

eaidova opened this issue Dec 25, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@eaidova
Copy link
Contributor

eaidova commented Dec 25, 2023

System Info

optimum 1.16.1
platform ubuntu-20
python python3.8

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction (minimal, reproducible, runnable)

due to missing NormalizedConfig registration for phi model, I can not load model using optimum.intel.openvino.OVModelForCausalLM:

from optimum.intel.openvino import OVModelForCausalLM

model_id = "susnato/phi-1_5_dev"
ov_model = OVModelForCausalLM.from_pretrained(model_id, export=True, compile=False)

as a workaround, if I add before creating the model these lines:

from optimum.utils import NormalizedTextConfig, NormalizedConfigManager

NormalizedConfigManager._conf['phi'] = NormalizedTextConfig

it can be successfully loaded.
I suppose that these lines missed in
https://github.com/huggingface/optimum/blob/main/optimum/utils/normalized_config.py#L210
as it defined in OnnxExportConfig https://github.com/huggingface/optimum/blob/main/optimum/exporters/onnx/model_configs.py#L253 https://github.com/huggingface/optimum/blob/main/optimum/exporters/tasks.py#L816

Expected behavior

model converted and loaded without errors

@eaidova eaidova added the bug Something isn't working label Dec 25, 2023
@fxmarty
Copy link
Contributor

fxmarty commented Jan 9, 2024

Hi @eaidova, this should be fixed with #1625

@fxmarty fxmarty closed this as completed Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants