-
Notifications
You must be signed in to change notification settings - Fork 226
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
Enable pyTorch-IMage-Models (TIMM) with HPUs #1459
Enable pyTorch-IMage-Models (TIMM) with HPUs #1459
Conversation
The code quality check failed, please run |
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. |
Co-authored-by: regisss <[email protected]>
Co-authored-by: regisss <[email protected]>
Co-authored-by: regisss <[email protected]>
Co-authored-by: regisss <[email protected]>
Co-authored-by: regisss <[email protected]>
Co-authored-by: regisss <[email protected]>
Co-authored-by: regisss <[email protected]>
Co-authored-by: regisss <[email protected]>
Co-authored-by: regisss <[email protected]>
@ZhengHongming888 Can you add a link to the scripts these examples are inspired of please? You can put it in the docstring at the beginning of each file |
@regisss updated please check! Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally can you create a test_timm.py
file in https://github.com/huggingface/optimum-habana/tree/main/tests where you quickly test the example scripts please?
For example just running a few training/inference steps to make sure the examples work.
Thanks @regisss Done please check! Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Co-authored-by: regisss <[email protected]>
Co-authored-by: regisss <[email protected]>
What does this PR do?
This PR contains the scripts that showcases how to inference/fine-tune the TIMM models on intel's HPUs with the lazy/graph modes. We support the training for single/multiple HPU cards both two. Currently we support several most downloadable models from Hugging Face as below list.
...
Here we support the below features:
Here we show how to fine-tune the imagenette2-320 dataset and model with timm/resnet50.a1_in1k from Hugging Face.
python train_hpu_lazy.py \ --data-dir ./imagenette2-320/ \ --device 'hpu' \ --model resnet50.a1_in1k
python train_hpu_graph.py \ --data-dir ./imagenette2-320/ \ --device 'hpu' \ --model resnet50.a1_in1k
torchrun --nnodes 1 --nproc_per_node 2 \ train_hpu_lazy.py \ --data-dir ./imagenette2-320/ \ --device 'hpu' \ --model resnet50.a1_in1k
torchrun --nnodes 1 --nproc_per_node 2 \ train_hpu_graph.py \ --data-dir ./imagenette2-320/ \ --device 'hpu' \ --model resnet50.a1_in1k
Welcome for any suggestions/comments. Thanks.
Before submitting