-
Notifications
You must be signed in to change notification settings - Fork 1.4k
add yaml and modify concat_csv.py for transformers 4.43.1
#11758
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
Merged
Oscilloscope98
merged 4 commits into
intel:igpu-workflow-transformers-443
from
ch1y0q:443-igpu-perf
Aug 13, 2024
Merged
Changes from all commits
Commits
Show all changes
4 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 hidden or 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 |
|---|---|---|
|
|
@@ -714,6 +714,33 @@ jobs: | |
|
|
||
| call conda deactivate | ||
|
|
||
| - name: Prepare igpu perf test for transformers 4.43 (32-32 int4+fp16) | ||
| shell: bash | ||
| run: | | ||
| sed -i 's/{today}_test3/{today}_test4/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i "s/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/32-32_int4_fp16_443.yaml | ||
|
|
||
| - name: Test on igpu for transformers 4.43 (32-32 int4+fp16) | ||
| shell: cmd | ||
| run: | | ||
| call conda activate igpu-perf | ||
| pip install transformers==4.43.1 | ||
| pip install trl | ||
|
|
||
| set SYCL_CACHE_PERSISTENT=1 | ||
| set BIGDL_LLM_XMX_DISABLED=1 | ||
|
|
||
| cd python\llm\dev\benchmark\all-in-one | ||
| move ..\..\..\test\benchmark\igpu-perf\32-32_int4_fp16_443.yaml config.yaml | ||
| set PYTHONIOENCODING=utf-8 | ||
| python run.py >> %CSV_SAVE_PATH%\32-32_int4_fp16\log\%LOG_FILE% 2>&1 | ||
| if %ERRORLEVEL% neq 0 if %ERRORLEVEL% neq -1073740791 (exit /b 1) | ||
| python ..\..\..\test\benchmark\igpu-perf\check_csv_results.py --yaml-file config.yaml --suffix test4 | ||
| if %ERRORLEVEL% neq 0 (exit /b 1) | ||
|
|
||
| pip uninstall trl | ||
| call conda deactivate | ||
|
|
||
| - name: Concat csv and generate html (32-32 int4+fp16) | ||
| shell: cmd | ||
| run: | | ||
|
|
@@ -737,7 +764,7 @@ jobs: | |
| shell: bash | ||
| run: | | ||
| sed -i 's/32-32/1024-128/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i 's/{today}_test3/{today}_test1/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i 's/{today}_test4/{today}_test1/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i "s/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/1024-128_int4_fp16.yaml | ||
|
|
||
| - name: Test on igpu (1024-128 int4+fp16) | ||
|
|
@@ -811,6 +838,33 @@ jobs: | |
|
|
||
| call conda deactivate | ||
|
|
||
| - name: Prepare igpu perf test for transformers 4.43 (1024-128 int4+fp16) | ||
| shell: bash | ||
| run: | | ||
| sed -i 's/{today}_test3/{today}_test4/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i "s/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/1024-128_int4_fp16_443.yaml | ||
|
|
||
| - name: Test on igpu for transformers 4.43 (1024-128 int4+fp16) | ||
| shell: cmd | ||
| run: | | ||
| call conda activate igpu-perf | ||
| pip install transformers==4.43.1 | ||
| pip install trl | ||
|
|
||
| set SYCL_CACHE_PERSISTENT=1 | ||
| set BIGDL_LLM_XMX_DISABLED=1 | ||
|
|
||
| cd python\llm\dev\benchmark\all-in-one | ||
| move ..\..\..\test\benchmark\igpu-perf\1024-128_int4_fp16_443.yaml config.yaml | ||
| set PYTHONIOENCODING=utf-8 | ||
| python run.py >> %CSV_SAVE_PATH%\1024-128_int4_fp16\log\%LOG_FILE% 2>&1 | ||
| if %ERRORLEVEL% neq 0 (exit /b 1) | ||
| python ..\..\..\test\benchmark\igpu-perf\check_csv_results.py --yaml-file config.yaml --suffix test4 | ||
| if %ERRORLEVEL% neq 0 (exit /b 1) | ||
|
|
||
| pip uninstall trl | ||
| call conda deactivate | ||
|
|
||
| - name: Concat csv and generate html (1024-128 int4+fp16) | ||
| shell: cmd | ||
| run: | | ||
|
|
@@ -833,7 +887,7 @@ jobs: | |
| shell: bash | ||
| run: | | ||
| sed -i 's/1024-128/2048-256/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i 's/{today}_test3/{today}_test1/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i 's/{today}_test4/{today}_test1/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i "s/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/2048-256_int4_fp16.yaml | ||
|
|
||
| - name: Test on igpu (2048-256 int4+fp16) | ||
|
|
@@ -907,6 +961,33 @@ jobs: | |
|
|
||
| call conda deactivate | ||
|
|
||
| - name: Prepare igpu perf test for transformers 4.43 (2048-256 int4+fp16) | ||
| shell: bash | ||
| run: | | ||
| sed -i 's/{today}_test3/{today}_test4/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i "s/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/2048-256_int4_fp16_443.yaml | ||
|
|
||
| - name: Test on igpu for transformers 4.43 (2048-256 int4+fp16) | ||
| shell: cmd | ||
| run: | | ||
| call conda activate igpu-perf | ||
| pip install transformers==4.43.1 | ||
| pip install trl | ||
|
|
||
| set SYCL_CACHE_PERSISTENT=1 | ||
| set BIGDL_LLM_XMX_DISABLED=1 | ||
|
|
||
| cd python\llm\dev\benchmark\all-in-one | ||
| move ..\..\..\test\benchmark\igpu-perf\2048-256_int4_fp16_443.yaml config.yaml | ||
| set PYTHONIOENCODING=utf-8 | ||
| python run.py >> %CSV_SAVE_PATH%\2048-256_int4_fp16\log\%LOG_FILE% 2>&1 | ||
| if %ERRORLEVEL% neq 0 (exit /b 1) | ||
| python ..\..\..\test\benchmark\igpu-perf\check_csv_results.py --yaml-file config.yaml --suffix test4 | ||
| if %ERRORLEVEL% neq 0 (exit /b 1) | ||
|
|
||
| pip uninstall trl | ||
| call conda deactivate | ||
|
|
||
| - name: Concat csv and generate html (2048-256 int4+fp16) | ||
| shell: cmd | ||
| run: | | ||
|
|
@@ -929,7 +1010,7 @@ jobs: | |
| shell: bash | ||
| run: | | ||
| sed -i 's/2048-256/3072-384/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i 's/{today}_test3/{today}_test1/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i 's/{today}_test4/{today}_test1/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i "s/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/3072-384_int4_fp16.yaml | ||
|
|
||
| - name: Test on igpu (3072-384 int4+fp16) | ||
|
|
@@ -1003,6 +1084,33 @@ jobs: | |
|
|
||
| call conda deactivate | ||
|
|
||
| - name: Prepare igpu perf test for transformers 4.43 (3072-384 int4+fp16) | ||
| shell: bash | ||
| run: | | ||
| sed -i 's/{today}_test3/{today}_test4/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i "s/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/3072-384_int4_fp16_443.yaml | ||
|
|
||
| - name: Test on igpu for transformers 4.43 (3072-384 int4+fp16) | ||
| shell: cmd | ||
| run: | | ||
| call conda activate igpu-perf | ||
| pip install transformers==4.43.1 | ||
| pip install trl | ||
|
|
||
| set SYCL_CACHE_PERSISTENT=1 | ||
| set BIGDL_LLM_XMX_DISABLED=1 | ||
|
|
||
| cd python\llm\dev\benchmark\all-in-one | ||
| move ..\..\..\test\benchmark\igpu-perf\3072-384_int4_fp16_438.yaml config.yaml | ||
|
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.
|
||
| set PYTHONIOENCODING=utf-8 | ||
| python run.py >> %CSV_SAVE_PATH%\3072-384_int4_fp16\log\%LOG_FILE% 2>&1 | ||
| if %ERRORLEVEL% neq 0 (exit /b 1) | ||
| python ..\..\..\test\benchmark\igpu-perf\check_csv_results.py --yaml-file config.yaml --suffix test4 | ||
| if %ERRORLEVEL% neq 0 (exit /b 1) | ||
|
|
||
| pip uninstall trl | ||
| call conda deactivate | ||
|
|
||
| - name: Concat csv and generate html (3072-384 int4+fp16) | ||
| shell: cmd | ||
| run: | | ||
|
|
@@ -1025,7 +1133,7 @@ jobs: | |
| shell: bash | ||
| run: | | ||
| sed -i 's/3072-384/4096-512/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i 's/{today}_test3/{today}_test1/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i 's/{today}_test4/{today}_test1/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i "s/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/4096-512_int4_fp16.yaml | ||
|
|
||
| - name: Test on igpu (4096-512 int4+fp16) | ||
|
|
@@ -1099,6 +1207,36 @@ jobs: | |
|
|
||
| call conda deactivate | ||
|
|
||
| # NOTE: Gemma2 not working for 4096-512. | ||
| # When it works, uncomment this section and remember to change "'s/{today}_test3/{today}_test1/g'" in next section. | ||
|
|
||
| #- name: Prepare igpu perf test for transformers 4.43 (4096-512 int4+fp16) | ||
| # shell: bash | ||
| # run: | | ||
| # sed -i 's/{today}_test3/{today}_test4/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| # sed -i "s/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/4096-512_int4_fp16_443.yaml | ||
|
|
||
| #- name: Test on igpu for transformers 4.43 (4096-512 int4+fp16) | ||
| # shell: cmd | ||
| # run: | | ||
| # call conda activate igpu-perf | ||
| # pip install transformers==4.43.1 | ||
| # pip install trl | ||
| # | ||
| # set SYCL_CACHE_PERSISTENT=1 | ||
| # set BIGDL_LLM_XMX_DISABLED=1 | ||
| # | ||
| # cd python\llm\dev\benchmark\all-in-one | ||
| # move ..\..\..\test\benchmark\igpu-perf\4096-512_int4_fp16_443.yaml config.yaml | ||
| # set PYTHONIOENCODING=utf-8 | ||
| # python run.py >> %CSV_SAVE_PATH%\4096-512_int4_fp16\log\%LOG_FILE% 2>&1 | ||
| # if %ERRORLEVEL% neq 0 (exit /b 1) | ||
| # python ..\..\..\test\benchmark\igpu-perf\check_csv_results.py --yaml-file config.yaml --suffix test4 | ||
| # if %ERRORLEVEL% neq 0 (exit /b 1) | ||
| # | ||
| # pip uninstall trl | ||
| # call conda deactivate | ||
|
|
||
Oscilloscope98 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Concat csv and generate html (4096-512 int4+fp16) | ||
| shell: cmd | ||
| run: | | ||
|
|
@@ -1195,6 +1333,33 @@ jobs: | |
|
|
||
| call conda deactivate | ||
|
|
||
| - name: Prepare igpu perf test for transformers 4.43 (load_low_bit 1024-128 int4+fp16) | ||
| shell: bash | ||
| run: | | ||
| sed -i 's/{today}_test3/{today}_test4/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i "s/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/1024-128_int4_fp16_loadlowbit_443.yaml | ||
|
|
||
| - name: Test on igpu for transformers 4.43 (load_low_bit 1024-128 int4+fp16) | ||
| shell: cmd | ||
| run: | | ||
| call conda activate igpu-perf | ||
| pip install transformers==4.43.1 | ||
| pip install trl | ||
|
|
||
| set SYCL_CACHE_PERSISTENT=1 | ||
| set BIGDL_LLM_XMX_DISABLED=1 | ||
|
|
||
| cd python\llm\dev\benchmark\all-in-one | ||
| move ..\..\..\test\benchmark\igpu-perf\1024-128_int4_fp16_loadlowbit_443.yaml config.yaml | ||
| set PYTHONIOENCODING=utf-8 | ||
| python run.py >> %CSV_SAVE_PATH%\1024-128_int4_fp16_loadlowbit\log\%LOG_FILE% 2>&1 | ||
| if %ERRORLEVEL% neq 0 (exit /b 1) | ||
| python ..\..\..\test\benchmark\igpu-perf\check_csv_results.py --yaml-file config.yaml --suffix test4 | ||
| if %ERRORLEVEL% neq 0 (exit /b 1) | ||
|
|
||
| pip uninstall trl | ||
| call conda deactivate | ||
|
|
||
| - name: Concat csv and generate html (load_low_bit 1024-128 int4+fp16) | ||
| shell: cmd | ||
| run: | | ||
|
|
@@ -1216,7 +1381,7 @@ jobs: | |
| - name: Prepare igpu perf test (1024-128) | ||
| shell: bash | ||
| run: | | ||
| sed -i 's/{today}_test3/{today}_test1/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i 's/{today}_test4/{today}_test1/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i "s/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/1024-128.yaml | ||
|
|
||
| - name: Test on igpu (1024-128) | ||
|
|
@@ -1290,6 +1455,33 @@ jobs: | |
|
|
||
| call conda deactivate | ||
|
|
||
| - name: Prepare igpu perf test for transformers 4.43 (1024-128) | ||
| shell: bash | ||
| run: | | ||
| sed -i 's/{today}_test3/{today}_test4/g' python/llm/dev/benchmark/all-in-one/run.py | ||
| sed -i "s/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/1024-128_443.yaml | ||
|
|
||
| - name: Test on igpu for transformers 4.43 (1024-128) | ||
| shell: cmd | ||
| run: | | ||
| call conda activate igpu-perf | ||
| pip install transformers==4.43.1 | ||
| pip install trl | ||
|
|
||
| set SYCL_CACHE_PERSISTENT=1 | ||
| set BIGDL_LLM_XMX_DISABLED=1 | ||
|
|
||
| cd python\llm\dev\benchmark\all-in-one | ||
| move ..\..\..\test\benchmark\igpu-perf\1024-128_443.yaml config.yaml | ||
| set PYTHONIOENCODING=utf-8 | ||
| python run.py >> %CSV_SAVE_PATH%\1024-128\log\%LOG_FILE% 2>&1 | ||
| if %ERRORLEVEL% neq 0 (exit /b 1) | ||
| python ..\..\..\test\benchmark\igpu-perf\check_csv_results.py --yaml-file config.yaml --suffix test4 | ||
| if %ERRORLEVEL% neq 0 (exit /b 1) | ||
|
|
||
| pip uninstall trl | ||
| call conda deactivate | ||
|
|
||
| - name: Concat csv and generate html (1024-128) | ||
| shell: cmd | ||
| run: | | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| repo_id: | ||
| - 'google/gemma-2-2b-it' | ||
| - 'google/gemma-2-9b-it' | ||
| local_model_hub: 'path to your local model hub' | ||
| warm_up: 1 | ||
| num_trials: 3 | ||
| num_beams: 1 # default to greedy search | ||
| low_bit: 'sym_int4' # default to use 'sym_int4' (i.e. symmetric int4) | ||
| batch_size: 1 # default to 1 | ||
| in_out_pairs: | ||
| - '1024-128' | ||
| test_api: | ||
| - "transformer_int4_gpu_win" # on Intel GPU for Windows (catch GPU peak memory) | ||
| cpu_embedding: True # whether put embedding to CPU (only avaiable now for gpu win related test_api) |
24 changes: 12 additions & 12 deletions
24
python/llm/test/benchmark/igpu-perf/1024-128_int4_fp16.yaml
This file contains hidden or 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
8 changes: 4 additions & 4 deletions
8
python/llm/test/benchmark/igpu-perf/1024-128_int4_fp16_437.yaml
This file contains hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.