Skip to content

Commit

Permalink
[LLM] Add qwen1.5-7B in iGPU perf (#10127)
Browse files Browse the repository at this point in the history
* Add qwen1.5 test config yaml with transformers 4.37.0

* Update for yaml file
  • Loading branch information
Oscilloscope98 authored Feb 7, 2024
1 parent e841b66 commit 5c42294
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 4 deletions.
102 changes: 99 additions & 3 deletions .github/workflows/llm_performance_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,30 @@ jobs:
call conda deactivate
- name: Prepare igpu perf test for Qwen1.5 (32-32)
shell: bash
run: |
sed -i 's/{today}_test2/{today}_test3/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_437.yaml
- name: Test on igpu for Qwen1.5 (32-32)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.37.0
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
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_437.yaml config.yaml
set PYTHONIOENCODING=utf-8
python run.py >> %CSV_SAVE_PATH%\32-32\log\%LOG_FILE% 2>&1
if %ERRORLEVEL% neq 0 (exit /b 1)
call conda deactivate
- name: Concat csv and generate html (32-32)
shell: cmd
run: |
Expand All @@ -449,7 +473,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}_test2/{today}_test1/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/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)
Expand Down Expand Up @@ -496,6 +520,30 @@ jobs:
call conda deactivate
- name: Prepare igpu perf test for Qwen 1.5 (1024-128)
shell: bash
run: |
sed -i 's/{today}_test2/{today}_test3/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_437.yaml
- name: Test on igpu for Qwen 1.5 (1024-128)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.37.0
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
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_437.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)
call conda deactivate
- name: Concat csv and generate html (1024-128)
shell: cmd
run: |
Expand All @@ -518,7 +566,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}_test2/{today}_test1/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/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/2048-256.yaml
- name: Test on igpu (2048-256)
Expand Down Expand Up @@ -565,6 +613,30 @@ jobs:
call conda deactivate
- name: Prepare igpu perf test for Qwen 1.5 (2048-256)
shell: bash
run: |
sed -i 's/{today}_test2/{today}_test3/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_437.yaml
- name: Test on igpu for Qwen 1.5 (2048-256)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.37.0
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
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_437.yaml config.yaml
set PYTHONIOENCODING=utf-8
python run.py >> %CSV_SAVE_PATH%\2048-256\log\%LOG_FILE% 2>&1
if %ERRORLEVEL% neq 0 (exit /b 1)
call conda deactivate
- name: Concat csv and generate html (2048-256)
shell: cmd
run: |
Expand All @@ -588,7 +660,7 @@ jobs:
run: |
# hide time info
sed -i 's/2048-256/32-512/g' python/llm/dev/benchmark/all-in-one/run.py
sed -i 's/{today}_test2/{today}_test1/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/path to your local model hub/$MODEL_HUB_DIR/g" python/llm/test/benchmark/igpu-perf/32-512.yaml
- name: Test on igpu (32-512)
Expand Down Expand Up @@ -635,6 +707,30 @@ jobs:
call conda deactivate
- name: Prepare igpu perf test for Qwen 1.5 (32-512)
shell: bash
run: |
sed -i 's/{today}_test2/{today}_test3/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-512_437.yaml
- name: Test on igpu for Qwen 1.5 (32-512)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.37.0
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
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-512_437.yaml config.yaml
set PYTHONIOENCODING=utf-8
python run.py >> %CSV_SAVE_PATH%\32-512\log\%LOG_FILE% 2>&1
if %ERRORLEVEL% neq 0 (exit /b 1)
call conda deactivate
- name: Concat csv and generate html (32-512)
shell: cmd
run: |
Expand Down
2 changes: 1 addition & 1 deletion python/llm/test/benchmark/concat_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def main():

merged_df = pd.concat([pd.read_csv(file, index_col=0) for file in csv_files], ignore_index=True)
merged_df.reset_index(drop=True, inplace=True)
merged_csv = csv_files[0].replace("_test1", "").replace("_test2", "")
merged_csv = csv_files[0].replace("_test1", "").replace("_test2", "").replace("_test3", "")
merged_df.to_csv(merged_csv)

if __name__ == "__main__":
Expand Down
13 changes: 13 additions & 0 deletions python/llm/test/benchmark/igpu-perf/1024-128_437.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repo_id:
- 'Qwen/Qwen1.5-7B-Chat'
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)
13 changes: 13 additions & 0 deletions python/llm/test/benchmark/igpu-perf/2048-256_437.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repo_id:
- 'Qwen/Qwen1.5-7B-Chat'
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:
- '2048-256'
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)
13 changes: 13 additions & 0 deletions python/llm/test/benchmark/igpu-perf/32-32_437.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repo_id:
- 'Qwen/Qwen1.5-7B-Chat'
local_model_hub: 'path to your local model hub'
warm_up: 3
num_trials: 5
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:
- '32-32'
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)
13 changes: 13 additions & 0 deletions python/llm/test/benchmark/igpu-perf/32-512_437.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repo_id:
- 'Qwen/Qwen1.5-7B-Chat'
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:
- '32-512'
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)

0 comments on commit 5c42294

Please sign in to comment.