Skip to content

Commit

Permalink
Update README and more changes, rebase to main (#1259)
Browse files Browse the repository at this point in the history
  • Loading branch information
shepark authored and regisss committed Aug 16, 2024
1 parent 09551d9 commit 41e0a3f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 27 deletions.
15 changes: 10 additions & 5 deletions examples/contrastive-image-text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ python run_clip.py \
--gaudi_config_name Habana/clip \
--throughput_warmup_steps 3 \
--dataloader_num_workers 16 \
--bf16
--bf16 \
--trust_remote_code
```


Expand Down Expand Up @@ -151,7 +152,8 @@ python ../gaudi_spawn.py --world_size 8 --use_mpi run_clip.py \
--mediapipe_dataloader \
--use_hpu_graphs_for_training \
--bf16 \
--distribution_strategy fast_ddp
--distribution_strategy fast_ddp \
--trust_remote_code
```

> `--mediapipe_dataloader` only works on Gaudi2.
Expand Down Expand Up @@ -182,7 +184,8 @@ python ../gaudi_spawn.py --world_size 8 --use_deepspeed run_clip.py \
--use_hpu_graphs_for_inference \
--gaudi_config_name Habana/clip \
--throughput_warmup_steps 3 \
--deepspeed path_to_my_deepspeed_config
--deepspeed path_to_my_deepspeed_config \
--trust_remote_code
```

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.
Expand Down Expand Up @@ -231,7 +234,8 @@ python ../gaudi_spawn.py --use_mpi --world_size 8 run_bridgetower.py \
--logging_steps 10 \
--dataloader_num_workers 1 \
--mediapipe_dataloader \
--distribution_strategy fast_ddp
--distribution_strategy fast_ddp \
--trust_remote_code
```

> `--mediapipe_dataloader` only works on Gaudi2.
Expand Down Expand Up @@ -260,7 +264,8 @@ python run_clip.py \
--use_hpu_graphs_for_inference \
--gaudi_config_name Habana/clip \
--bf16 \
--mediapipe_dataloader
--mediapipe_dataloader \
--trust_remote_code
```

> `--mediapipe_dataloader` only works on Gaudi2.
20 changes: 0 additions & 20 deletions examples/text-generation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,24 +215,6 @@ python run_generation.py \
> The prompt length is limited to 16 tokens. Prompts longer than this will be truncated.

### Use PEFT models for generation

You can also provide the path to a PEFT model to perform generation with the argument `--peft_model`.

For example:
```bash
python run_generation.py \
--model_name_or_path meta-llama/Llama-2-7b-hf \
--use_hpu_graphs \
--use_kv_cache \
--batch_size 1 \
--bf16 \
--max_new_tokens 100 \
--prompt "Here is my prompt" \
--peft_model goliaro/llama-2-7b-lora-full
```


### Using growing bucket optimization

With `--bucket_size`, instead of padding up the kv-cache up to full size before starting, we grow the cache/input in multiples of `bucket_size`. This helps increase throughput and also reduce number of compilations if the dataset has varying prompt lengths.
Expand Down Expand Up @@ -603,8 +585,6 @@ deepspeed --num_gpus 8 run_lm_eval.py \
-o eval.json
```

> If the dataset you want to use requires the execution of remote code, please set the following environment variable: `HF_DATASETS_TRUST_REMOTE_CODE=true`

## Text-Generation Pipeline

Expand Down
4 changes: 2 additions & 2 deletions examples/visual-question-answering/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ python run_openclip_vqa.py \
```

Models that have been validated:
- [BiomedCLIP-PubMedBERT_256-vit_base_patch16_224](https://huggingface.co/microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224)
- [microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224](https://huggingface.co/microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224)
- [laion/CLIP-ViT-g-14-laion2B-s12B-b42K](https://huggingface.co/laion/CLIP-ViT-g-14-laion2B-s12B-b42K)
- [apple/DFN5B-CLIP-ViT-H-14](https://huggingface.co/apple/DFN5B-CLIP-ViT-H-14/tree/main)
- [apple/DFN5B-CLIP-ViT-H-14](https://huggingface.co/apple/DFN5B-CLIP-ViT-H-14/tree/main)

0 comments on commit 41e0a3f

Please sign in to comment.