From 41e0a3f298ec4bd0866884733416f6bad98745dd Mon Sep 17 00:00:00 2001 From: "Seunghyuk Park (shepark)" Date: Fri, 16 Aug 2024 00:25:22 -0700 Subject: [PATCH] Update README and more changes, rebase to main (#1259) --- examples/contrastive-image-text/README.md | 15 ++++++++++----- examples/text-generation/README.md | 20 -------------------- examples/visual-question-answering/README.md | 4 ++-- 3 files changed, 12 insertions(+), 27 deletions(-) diff --git a/examples/contrastive-image-text/README.md b/examples/contrastive-image-text/README.md index d19ddcaad8..142a1cd2b0 100644 --- a/examples/contrastive-image-text/README.md +++ b/examples/contrastive-image-text/README.md @@ -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 ``` @@ -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. @@ -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. @@ -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. @@ -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. diff --git a/examples/text-generation/README.md b/examples/text-generation/README.md index 4a5aca643b..29b754731d 100755 --- a/examples/text-generation/README.md +++ b/examples/text-generation/README.md @@ -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. @@ -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 diff --git a/examples/visual-question-answering/README.md b/examples/visual-question-answering/README.md index ed4d2a8a66..c2b725bd6c 100644 --- a/examples/visual-question-answering/README.md +++ b/examples/visual-question-answering/README.md @@ -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) \ No newline at end of file + - [apple/DFN5B-CLIP-ViT-H-14](https://huggingface.co/apple/DFN5B-CLIP-ViT-H-14/tree/main)