Skip to content

Commit

Permalink
Update examples batchsize in README (huggingface#1123)
Browse files Browse the repository at this point in the history
  • Loading branch information
shepark committed Jul 11, 2024
1 parent b6d2f3d commit f0568ff
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion examples/audio-classification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ python ../gaudi_spawn.py \
--max_length_seconds 8 \
--attention_mask False \
--warmup_ratio 0.1 \
--num_train_epochs 10 \
--num_train_epochs 5 \
--per_device_train_batch_size 16 \
--per_device_eval_batch_size 32 \
--seed 0 \
Expand Down
6 changes: 3 additions & 3 deletions examples/image-classification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ python run_image_classification.py \
--do_eval \
--learning_rate 3e-5 \
--num_train_epochs 5 \
--per_device_train_batch_size 64 \
--per_device_train_batch_size 128 \
--per_device_eval_batch_size 64 \
--evaluation_strategy epoch \
--save_strategy epoch \
Expand Down Expand Up @@ -195,7 +195,7 @@ python ../gaudi_spawn.py \
--do_eval \
--learning_rate 2e-4 \
--num_train_epochs 5 \
--per_device_train_batch_size 64 \
--per_device_train_batch_size 128 \
--per_device_eval_batch_size 64 \
--evaluation_strategy epoch \
--save_strategy epoch \
Expand Down Expand Up @@ -235,7 +235,7 @@ python ../gaudi_spawn.py \
--do_eval \
--learning_rate 2e-4 \
--num_train_epochs 5 \
--per_device_train_batch_size 64 \
--per_device_train_batch_size 128 \
--per_device_eval_batch_size 64 \
--evaluation_strategy epoch \
--save_strategy epoch \
Expand Down
2 changes: 1 addition & 1 deletion examples/language-modeling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ python ../gaudi_spawn.py \
--model_name_or_path EleutherAI/gpt-j-6b \
--dataset_name wikitext \
--dataset_config_name wikitext-2-raw-v1 \
--per_device_train_batch_size 4 \
--per_device_train_batch_size 16 \
--per_device_eval_batch_size 4 \
--do_train \
--do_eval \
Expand Down
6 changes: 3 additions & 3 deletions examples/question-answering/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ PT_HPU_LAZY_MODE=0 python run_qa.py \
--dataset_name squad \
--do_train \
--do_eval \
--per_device_train_batch_size 24 \
--per_device_train_batch_size 32 \
--per_device_eval_batch_size 8 \
--learning_rate 3e-5 \
--num_train_epochs 2 \
Expand Down Expand Up @@ -78,7 +78,7 @@ PT_HPU_LAZY_MODE=0 python ../gaudi_spawn.py \
--dataset_name squad \
--do_train \
--do_eval \
--per_device_train_batch_size 24 \
--per_device_train_batch_size 32 \
--per_device_eval_batch_size 8 \
--learning_rate 3e-5 \
--num_train_epochs 2 \
Expand Down Expand Up @@ -106,7 +106,7 @@ python ../gaudi_spawn.py \
--dataset_name squad \
--do_train \
--do_eval \
--per_device_train_batch_size 24 \
--per_device_train_batch_size 32 \
--per_device_eval_batch_size 8 \
--learning_rate 3e-5 \
--num_train_epochs 2 \
Expand Down
16 changes: 8 additions & 8 deletions examples/stable-diffusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ python text_to_image_generation.py \
--model_name_or_path runwayml/stable-diffusion-v1-5 \
--prompts "An image of a squirrel in Picasso style" \
--num_images_per_prompt 20 \
--batch_size 4 \
--batch_size 7 \
--image_save_dir /tmp/stable_diffusion_images \
--use_habana \
--use_hpu_graphs \
Expand Down Expand Up @@ -90,7 +90,7 @@ python text_to_image_generation.py \
--model_name_or_path stabilityai/stable-diffusion-2-1 \
--prompts "An image of a squirrel in Picasso style" \
--num_images_per_prompt 10 \
--batch_size 2 \
--batch_size 7 \
--height 768 \
--width 768 \
--image_save_dir /tmp/stable_diffusion_images \
Expand All @@ -116,7 +116,7 @@ python text_to_image_generation.py \
--model_name_or_path "Intel/ldm3d-4c" \
--prompts "An image of a squirrel in Picasso style" \
--num_images_per_prompt 10 \
--batch_size 2 \
--batch_size 7 \
--height 768 \
--width 768 \
--image_save_dir /tmp/stable_diffusion_images \
Expand Down Expand Up @@ -158,7 +158,7 @@ python text_to_image_generation.py \
--model_name_or_path stabilityai/stable-diffusion-xl-base-1.0 \
--prompts "Sailing ship painting by Van Gogh" \
--num_images_per_prompt 20 \
--batch_size 4 \
--batch_size 7 \
--image_save_dir /tmp/stable_diffusion_xl_images \
--scheduler euler_discrete \
--use_habana \
Expand Down Expand Up @@ -271,7 +271,7 @@ python text_to_image_generation.py \
--prompts "futuristic-looking woman" \
--control_image https://hf.co/datasets/huggingface/documentation-images/resolve/main/diffusers/input_image_vermeer.png \
--num_images_per_prompt 20 \
--batch_size 4 \
--batch_size 7 \
--image_save_dir /tmp/controlnet_images \
--use_habana \
--use_hpu_graphs \
Expand All @@ -288,7 +288,7 @@ python text_to_image_generation.py \
--prompts "futuristic-looking woman" "a rusty robot" \
--control_image https://hf.co/datasets/huggingface/documentation-images/resolve/main/diffusers/input_image_vermeer.png \
--num_images_per_prompt 10 \
--batch_size 4 \
--batch_size 7 \
--image_save_dir /tmp/controlnet_images \
--use_habana \
--use_hpu_graphs \
Expand Down Expand Up @@ -325,7 +325,7 @@ python text_to_image_generation.py \
--control_image https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/sd_controlnet/pose.png \
--control_preprocessing_type "none" \
--num_images_per_prompt 20 \
--batch_size 4 \
--batch_size 7 \
--image_save_dir /tmp/controlnet_images \
--use_habana \
--use_hpu_graphs \
Expand All @@ -344,7 +344,7 @@ python text_to_image_generation.py \
--prompts "bird" \
--seed 0 \
--num_images_per_prompt 10 \
--batch_size 2 \
--batch_size 7 \
--image_save_dir /tmp/controlnet-2-1_images \
--use_habana \
--use_hpu_graphs \
Expand Down
9 changes: 5 additions & 4 deletions examples/text-classification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ python run_glue.py \
--task_name mrpc \
--do_train \
--do_eval \
--per_device_train_batch_size 32 \
--per_device_train_batch_size 64 \
--learning_rate 3e-5 \
--num_train_epochs 3 \
--max_seq_length 128 \
Expand All @@ -78,7 +78,7 @@ python ../gaudi_spawn.py \
--task_name mrpc \
--do_train \
--do_eval \
--per_device_train_batch_size 32 \
--per_device_train_batch_size 64 \
--per_device_eval_batch_size 8 \
--learning_rate 3e-5 \
--num_train_epochs 3 \
Expand Down Expand Up @@ -106,7 +106,7 @@ python ../gaudi_spawn.py \
--task_name mrpc \
--do_train \
--do_eval \
--per_device_train_batch_size 32 \
--per_device_train_batch_size 64 \
--per_device_eval_batch_size 8 \
--learning_rate 3e-5 \
--num_train_epochs 3 \
Expand Down Expand Up @@ -156,6 +156,7 @@ python run_glue.py \
--do_eval \
--max_seq_length 128 \
--output_dir ./output/mrpc/ \
--per_device_eval_batch_size 8 \
--use_habana \
--use_lazy_mode \
--use_hpu_graphs_for_inference \
Expand All @@ -178,7 +179,7 @@ python ../gaudi_spawn.py \
--task_name mrpc \
--do_train \
--do_eval \
--per_device_train_batch_size 32 \
--per_device_train_batch_size 64 \
--per_device_eval_batch_size 8 \
--learning_rate 3e-5 \
--num_train_epochs 3 \
Expand Down
2 changes: 1 addition & 1 deletion examples/text-generation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ python ../gaudi_spawn.py --use_deepspeed --world_size 8 run_generation.py \
--bf16 \
--use_hpu_graphs \
--use_kv_cache \
--batch_size 52 \
--batch_size 180 \
--attn_softmax_bf16 \
--limit_hpu_graphs \
--reuse_cache \
Expand Down

0 comments on commit f0568ff

Please sign in to comment.