-
Notifications
You must be signed in to change notification settings - Fork 217
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
fix readme cmds for clip-roberta #1603
Open
hsubramony
wants to merge
2
commits into
v1.15-release
Choose a base branch
from
hsub_clip_cmd
base: v1.15-release
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+38
−30
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,33 +128,34 @@ PT_HPU_LAZY_MODE=0 python run_clip.py \ | |
Run the following command for distributed training: | ||
|
||
```bash | ||
PT_HPU_LAZY_MODE=0 \ | ||
python ../gaudi_spawn.py --world_size 8 --use_mpi run_clip.py \ | ||
--output_dir ./clip-roberta-finetuned \ | ||
--model_name_or_path ./clip-roberta \ | ||
--data_dir $PWD/data \ | ||
--dataset_name ydshieh/coco_dataset_script \ | ||
--dataset_config_name=2017 \ | ||
--image_column image_path \ | ||
--caption_column caption \ | ||
--remove_unused_columns=False \ | ||
--do_train --do_eval \ | ||
--per_device_train_batch_size="512" \ | ||
PT_HPU_LAZY_MODE=0 PT_ENABLE_INT64_SUPPORT=1 \ | ||
python3 ../gaudi_spawn.py --world_size 8 --use_mpi run_clip.py \ | ||
--output_dir=/tmp/clip_roberta \ | ||
--model_name_or_path=./clip-roberta \ | ||
--data_dir=./data \ | ||
--dataset_name="ydshieh/coco_dataset_script" \ | ||
--dataset_config_name="2017" \ | ||
--image_column="image_path" \ | ||
--caption_column="caption" \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to change 136-139 |
||
--remove_unused_columns="False" \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to change 140 |
||
--do_train --do_eval \ | ||
--mediapipe_dataloader \ | ||
--per_device_train_batch_size="64" \ | ||
--per_device_eval_batch_size="64" \ | ||
--learning_rate="5e-5" --warmup_steps="0" --weight_decay 0.1 \ | ||
--learning_rate="5e-5" --warmup_steps="0" --weight_decay="0.1" \ | ||
--overwrite_output_dir \ | ||
--save_strategy epoch \ | ||
--use_habana \ | ||
--gaudi_config_name Habana/clip \ | ||
--throughput_warmup_steps 3 \ | ||
--dataloader_num_workers 16 \ | ||
--mediapipe_dataloader \ | ||
--bf16 \ | ||
--sdp_on_bf16 \ | ||
--distribution_strategy fast_ddp \ | ||
--trust_remote_code \ | ||
--use_lazy_mode=False \ | ||
--gaudi_config_name="Habana/clip" \ | ||
--throughput_warmup_steps=30 \ | ||
--save_strategy="no" \ | ||
--dataloader_num_workers=2 \ | ||
--use_hpu_graphs \ | ||
--max_steps=100 \ | ||
--torch_compile_backend=hpu_backend \ | ||
--torch_compile | ||
--torch_compile \ | ||
--logging_nan_inf_filter \ | ||
--trust_remote_code | ||
``` | ||
|
||
> `--mediapipe_dataloader` only works on Gaudi2. | ||
|
@@ -165,29 +166,36 @@ python ../gaudi_spawn.py --world_size 8 --use_mpi run_clip.py \ | |
Run the following command for training with DeepSpeed: | ||
|
||
```bash | ||
PT_HPU_LAZY_MODE=0 \ | ||
python ../gaudi_spawn.py --world_size 8 --use_deepspeed run_clip.py \ | ||
--output_dir ./clip-roberta-finetuned \ | ||
--model_name_or_path ./clip-roberta \ | ||
--data_dir $PWD/data \ | ||
--dataset_name ydshieh/coco_dataset_script \ | ||
--dataset_config_name=2017 \ | ||
--image_column image_path \ | ||
--caption_column caption \ | ||
--remove_unused_columns=False \ | ||
--do_train --do_eval \ | ||
--per_device_train_batch_size="512" \ | ||
PT_HPU_LAZY_MODE=0 PT_ENABLE_INT64_SUPPORT=1 \ | ||
python3 ../gaudi_spawn.py --world_size 8 --use_deepspeed run_clip.py \ | ||
--output_dir=/tmp/clip_roberta \ | ||
--model_name_or_path=./clip-roberta \ | ||
--data_dir=./data \ | ||
--dataset_name="ydshieh/coco_dataset_script" \ | ||
--dataset_config_name="2017" \ | ||
--image_column="image_path" \ | ||
--caption_column="caption" \ | ||
--remove_unused_columns="False" \ | ||
--do_train --do_eval \ | ||
--mediapipe_dataloader \ | ||
--per_device_train_batch_size="64" \ | ||
--per_device_eval_batch_size="64" \ | ||
--learning_rate="5e-5" --warmup_steps="0" --weight_decay 0.1 \ | ||
--learning_rate="5e-5" --warmup_steps="0" --weight_decay="0.1" \ | ||
--overwrite_output_dir \ | ||
--save_strategy epoch \ | ||
--use_habana \ | ||
--gaudi_config_name Habana/clip \ | ||
--throughput_warmup_steps 3 \ | ||
--deepspeed path_to_my_deepspeed_config \ | ||
--trust_remote_code \ | ||
--use_lazy_mode=False \ | ||
--gaudi_config_name="Habana/clip" \ | ||
--throughput_warmup_steps=30 \ | ||
--save_strategy="no" \ | ||
--dataloader_num_workers=2 \ | ||
--use_hpu_graphs \ | ||
--max_steps=100 \ | ||
--torch_compile_backend=hpu_backend \ | ||
--torch_compile | ||
--torch_compile \ | ||
--logging_nan_inf_filter \ | ||
--trust_remote_code \ | ||
--deepspeed <path_to_my_deepspeed_config> | ||
|
||
``` | ||
|
||
You can look at the [documentation](https://huggingface.co/docs/optimum/habana/usage_guides/deepspeed) for more information about how to use DeepSpeed in Optimum Habana. | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
should we change this back?