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

Add Optimum CLI backbone #593

Merged
merged 9 commits into from
Dec 19, 2022
Merged

Add Optimum CLI backbone #593

merged 9 commits into from
Dec 19, 2022

Conversation

fxmarty
Copy link
Contributor

@fxmarty fxmarty commented Dec 15, 2022

This PR adds the backbone for an Optimum CLI, largely inspired from Transformers. Two commands are for now available:

optimum-cli export
optimum-cli env

and the export can handle several sub parsers, with the only one supported currently being

optimum-cli export onnx [ARGS]

that just maps to python -m optimum.exporters.onnx [ARGS].

In the future, this CLI could support things like

optimum-cli onnxruntime optimize -Ox --model model_name_or_path
optimum-cli onnxruntime quantize --dynamic --arch avx2 --model model_name_or_path
optimum-cli habana ???? (if relevant)
optimum-cli openvino quantize ???? (if relevant)
optimum-cli intel-neural-compressor quantize ???? (if relevant)

Fixes #188

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 15, 2022

The documentation is not available anymore as the PR was closed or merged.

@michaelbenayoun
Copy link
Member

For me that looks very interesting!
Especially because it looks easily extendible and do not make much assumptions on the underlying features.

Copy link
Contributor

@regisss regisss left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@JingyaHuang JingyaHuang left a comment

Choose a reason for hiding this comment

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

LGTM

@fxmarty fxmarty merged commit bc8f33e into huggingface:main Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a optimum-cli
5 participants