Skip to content

Remove onnx dependency#1753

Merged
echarlaix merged 40 commits into
mainfrom
optimumonnx
Jun 2, 2026
Merged

Remove onnx dependency#1753
echarlaix merged 40 commits into
mainfrom
optimumonnx

Conversation

@echarlaix

@echarlaix echarlaix commented May 27, 2026

Copy link
Copy Markdown
Collaborator
  • add base configs classes like OpenVINOConfig and TextEncoderOpenVINOConfig that were originally defined in https://github.com/huggingface/optimum-onnx/blob/main/optimum/exporters/onnx/config.py
  • move all XxxInputGenerator classes in input_generator.py
  • remove deprecated export_pytorch_via_onnx (previously used when we were converting the model to ONNX first and then converting it to OV IR)
  • remove opset argument (previously needed for ONNX export)

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@IlyasMoutawwakil IlyasMoutawwakil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tremendous work 🙏 LGTM !

@rkazants

rkazants commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

@echarlaix, can you please double check these failures https://github.com/huggingface/optimum-intel/actions/runs/26757786426/job/78913206681?pr=1753:

FAILED tests/openvino/test_decoder.py::OVModelForCausalLMIntegrationTest::test_pipeline_44_phimoe - AttributeError: 'PreTrainedConfig' object has no attribute 'max_position_embeddings'
FAILED tests/openvino/test_decoder.py::OVModelForCausalLMIntegrationTest::test_pipeline_51_gpt_oss - AttributeError: 'PreTrainedConfig' object has no attribute 'max_position_embeddings'
FAILED tests/openvino/test_decoder.py::OVModelForCausalLMIntegrationTest::test_pipeline_52_gpt_oss_mxfp4 - AttributeError: 'PreTrainedConfig' object has no attribute 'max_position_embeddings'
FAILED tests/openvino/test_decoder.py::OVModelForCausalLMIntegrationTest::test_pipeline_53_afmoe - TypeError: 'AfmoeExperts' object is not subscriptable

Comment thread optimum/exporters/openvino/base.py Outdated
Comment thread optimum/exporters/openvino/base.py Outdated
Comment thread optimum/exporters/openvino/convert.py Outdated
Comment thread optimum/intel/openvino/modeling.py Outdated
Comment thread setup.py
Comment thread setup.py
Comment thread optimum/exporters/openvino/model_patcher.py Outdated
Comment thread optimum/exporters/openvino/model_patcher.py Outdated
Comment thread optimum/exporters/openvino/patching_utils.py Outdated
echarlaix and others added 3 commits June 2, 2026 12:18
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
@echarlaix echarlaix removed the openvino-slow Runs OpenVINO slow tests with different versions of transformers label Jun 2, 2026
@echarlaix

Copy link
Copy Markdown
Collaborator Author

@echarlaix, can you please double check these failures https://github.com/huggingface/optimum-intel/actions/runs/26757786426/job/78913206681?pr=1753:

FAILED tests/openvino/test_decoder.py::OVModelForCausalLMIntegrationTest::test_pipeline_44_phimoe - AttributeError: 'PreTrainedConfig' object has no attribute 'max_position_embeddings' FAILED tests/openvino/test_decoder.py::OVModelForCausalLMIntegrationTest::test_pipeline_51_gpt_oss - AttributeError: 'PreTrainedConfig' object has no attribute 'max_position_embeddings' FAILED tests/openvino/test_decoder.py::OVModelForCausalLMIntegrationTest::test_pipeline_52_gpt_oss_mxfp4 - AttributeError: 'PreTrainedConfig' object has no attribute 'max_position_embeddings' FAILED tests/openvino/test_decoder.py::OVModelForCausalLMIntegrationTest::test_pipeline_53_afmoe - TypeError: 'AfmoeExperts' object is not subscriptable

@rkazants the failing tests you shared are related to transformers main (not related to this PR but from incompatibility between optimum-intel and transformers main), let me know if you're referring to something else

@echarlaix echarlaix requested review from rkazants June 2, 2026 13:17
@echarlaix echarlaix added the openvino-slow Runs OpenVINO slow tests with different versions of transformers label Jun 2, 2026
@echarlaix echarlaix merged commit e6f612a into main Jun 2, 2026
71 of 82 checks passed
@echarlaix echarlaix deleted the optimumonnx branch June 2, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

openvino-slow Runs OpenVINO slow tests with different versions of transformers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants