-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into zhzhang/mamba_for_main
- Loading branch information
Showing
131 changed files
with
7,361 additions
and
3,797 deletions.
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
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
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 |
---|---|---|
|
@@ -98,7 +98,7 @@ slow_tests_deepspeed: test_installs | |
|
||
slow_tests_diffusers: test_installs | ||
python -m pip install -r examples/stable-diffusion/requirements.txt | ||
python -m pytest tests/test_diffusers.py -v -s -k "test_textual_inversion" | ||
python -m pytest tests/test_diffusers.py -v -s -k "textual_inversion" | ||
python -m pip install peft==0.7.0 | ||
python -m pytest tests/test_diffusers.py -v -s -k "test_train_text_to_image_" | ||
python -m pytest tests/test_diffusers.py -v -s -k "test_train_controlnet" | ||
|
@@ -107,6 +107,7 @@ slow_tests_diffusers: test_installs | |
|
||
# Run text-generation non-regression tests | ||
slow_tests_text_generation_example: test_installs | ||
python -m pip install triton==3.1.0 autoawq | ||
BUILD_CUDA_EXT=0 python -m pip install -vvv --no-build-isolation git+https://github.com/HabanaAI/AutoGPTQ.git | ||
python -m pip install git+https://github.com/HabanaAI/[email protected] | ||
python -m pytest tests/test_text_generation_example.py tests/test_encoder_decoder.py -v -s --token $(TOKEN) | ||
|
@@ -120,6 +121,11 @@ slow_tests_openclip_vqa_example: test_installs | |
python -m pip install -r examples/visual-question-answering/openclip_requirements.txt | ||
python -m pytest tests/test_openclip_vqa.py | ||
|
||
# Run video comprehension tests | ||
slow_tests_video_llava_example: test_installs | ||
python -m pip install -r examples/video-comprehension/requirements.txt | ||
python -m pytest tests/test_video_llava.py | ||
|
||
slow_tests_fsdp: test_installs | ||
python -m pytest tests/test_fsdp_examples.py -v -s --token $(TOKEN) | ||
|
||
|
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
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 |
---|---|---|
|
@@ -107,52 +107,6 @@ On 8 HPUs, this script should run in ~12 minutes and yield an accuracy of **80.4 | |
> If you get an error reporting unused parameters in the model, you can specify `--ddp_find_unused_parameters True`. Using this parameter might affect the training speed. | ||
|
||
## DeepSpeed | ||
|
||
> You need to install DeepSpeed with: | ||
> ```bash | ||
> pip install git+https://github.com/HabanaAI/[email protected] | ||
> ``` | ||
DeepSpeed can be used with almost the same command as for a multi-card run: | ||
- `use_mpi` should be replaced by `use_deepspeed`, | ||
- an additional `--deepspeed path_to_my_deepspeed config` argument should be provided, for instance `--deepspeed ../../tests/configs/deepspeed_zero_2.json`. | ||
For example: | ||
```bash | ||
PT_HPU_LAZY_MODE=0 python ../gaudi_spawn.py \ | ||
--world_size 8 --use_deepspeed run_audio_classification.py \ | ||
--model_name_or_path facebook/wav2vec2-base \ | ||
--dataset_name common_language \ | ||
--audio_column_name audio \ | ||
--label_column_name language \ | ||
--output_dir /tmp/wav2vec2-base-lang-id \ | ||
--overwrite_output_dir \ | ||
--remove_unused_columns False \ | ||
--do_train \ | ||
--do_eval \ | ||
--learning_rate 3e-4 \ | ||
--max_length_seconds 8 \ | ||
--attention_mask False \ | ||
--warmup_ratio 0.1 \ | ||
--num_train_epochs 10 \ | ||
--per_device_train_batch_size 16 \ | ||
--per_device_eval_batch_size 32 \ | ||
--seed 0 \ | ||
--use_habana \ | ||
--use_lazy_mode False\ | ||
--gaudi_config_name Habana/wav2vec2 \ | ||
--throughput_warmup_steps 3 \ | ||
--deepspeed ../../tests/configs/deepspeed_zero_2.json \ | ||
--trust_remote_code True | ||
``` | ||
[The documentation](https://huggingface.co/docs/optimum/habana/usage_guides/deepspeed) provides more information about how to use DeepSpeed within Optimum Habana. | ||
|
||
> If your model classification head dimensions do not fit the number of labels in the dataset, you can specify `--ignore_mismatched_sizes` to adapt it. | ||
|
||
## Inference | ||
|
||
To run only inference, you can start from the commands above and you just have to remove the training-only arguments such as `--do_train`, `--per_device_train_batch_size`, `--num_train_epochs`, etc... | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
datasets>=1.14.0 | ||
evaluate | ||
numba==0.60.0 | ||
librosa |
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
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
Oops, something went wrong.