Skip to content

Commit

Permalink
upgrade arc perf test to transformers 4.37 (#11842)
Browse files Browse the repository at this point in the history
* fix load low bit com dtype (#11832)

* feat: add mixed_precision argument on ppl longbench evaluation

* fix: delete extra code

* feat: upgrade arc perf test to transformers 4.37

* fix: add missing codes

* fix: keep perf test for qwen-vl-chat in transformers 4.36

* fix: remove extra space

* fix: resolve pr comment

* fix: add empty line

* fix: add pip install for spr and core test

* fix: delete extra comments

* fix: remove python -m for pip

* Revert "fix load low bit com dtype (#11832)"

This reverts commit 6841a9a.

---------

Co-authored-by: Zhao Changmin <[email protected]>
Co-authored-by: Jinhe Tang <[email protected]>
  • Loading branch information
3 people authored Aug 19, 2024
1 parent 1ac3440 commit a78e0b9
Show file tree
Hide file tree
Showing 10 changed files with 105 additions and 105 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/llm_performance_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ jobs:
source /opt/intel/oneapi/setvars.sh
export USE_XETLA=OFF
export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
cp python/llm/test/benchmark/arc-perf-test.yaml python/llm/dev/benchmark/all-in-one/config.yaml
pip install transformers==4.36.2
cp python/llm/test/benchmark/arc-perf-transformers-436.yaml python/llm/dev/benchmark/all-in-one/config.yaml
cd python/llm/dev/benchmark/all-in-one
mkdir test_batch1
mkdir test_batch2
Expand All @@ -167,15 +168,15 @@ jobs:
mv *.csv test_batch1
# batch_size 2
cd ../../../../../
cp python/llm/test/benchmark/arc-perf-test-batch2.yaml python/llm/dev/benchmark/all-in-one/config.yaml
cp python/llm/test/benchmark/arc-perf-transformers-436-batch2.yaml python/llm/dev/benchmark/all-in-one/config.yaml
cd python/llm/dev/benchmark/all-in-one
# change csv name
sed -i 's/batch1/batch2/g' run.py
python run.py
mv *.csv test_batch2
# batch_size 4
cd ../../../../../
cp python/llm/test/benchmark/arc-perf-test-batch4.yaml python/llm/dev/benchmark/all-in-one/config.yaml
cp python/llm/test/benchmark/arc-perf-transformers-436-batch4.yaml python/llm/dev/benchmark/all-in-one/config.yaml
cd python/llm/dev/benchmark/all-in-one
# change csv name
sed -i 's/batch2/batch4/g' run.py
Expand Down Expand Up @@ -384,7 +385,7 @@ jobs:
python -m pip install --upgrade einops
python -m pip install --upgrade tiktoken
python -m pip install --upgrade transformers_stream_generator
python -m pip install transformers==4.37.0
# specific for test on certain commits
- name: Download llm binary
if: ${{ github.event_name == 'workflow_dispatch' && (inputs.checkout-ref != 'main') }}
Expand Down Expand Up @@ -491,7 +492,7 @@ jobs:
run: |
date_for_test_version=$(date -d yesterday +%Y-%m-%d)
sed -i "s/date.today()/\"$date_for_test_version\"/g" python/llm/dev/benchmark/all-in-one/run.py
pip install transformers==4.37.0
mv python/llm/test/benchmark/core-perf-test.yaml python/llm/dev/benchmark/all-in-one/config.yaml
cd python/llm/dev/benchmark/all-in-one
export http_proxy=${HTTP_PROXY}
Expand Down Expand Up @@ -1346,4 +1347,4 @@ jobs:
# shell: cmd
# run: |
# call conda env remove -n igpu-perf -y


30 changes: 0 additions & 30 deletions python/llm/test/benchmark/arc-perf-test-batch2.yaml

This file was deleted.

36 changes: 0 additions & 36 deletions python/llm/test/benchmark/arc-perf-test-batch4.yaml

This file was deleted.

32 changes: 0 additions & 32 deletions python/llm/test/benchmark/arc-perf-test.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions python/llm/test/benchmark/arc-perf-transformers-436-batch2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repo_id:
- 'Qwen/Qwen-VL-Chat'
local_model_hub: '/mnt/disk1/models'
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: 2 # default to 1
in_out_pairs:
- '32-32'
- '1024-128'
- '2048-256'
test_api:
- "transformer_int4_fp16_gpu" # on Intel GPU
cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'
18 changes: 18 additions & 0 deletions python/llm/test/benchmark/arc-perf-transformers-436-batch4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repo_id:
- 'Qwen/Qwen-VL-Chat'
local_model_hub: '/mnt/disk1/models'
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: 4 # default to 1
in_out_pairs:
- '32-32'
- '1024-128'
- '2048-256'
test_api:
- "transformer_int4_fp16_gpu" # on Intel GPU
cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
exclude:
- 'Qwen/Qwen-VL-Chat:2048'
task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'
16 changes: 16 additions & 0 deletions python/llm/test/benchmark/arc-perf-transformers-436.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repo_id:
- 'Qwen/Qwen-VL-Chat'
local_model_hub: '/mnt/disk1/models'
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-32'
- '1024-128'
- '2048-256'
test_api:
- "transformer_int4_fp16_gpu" # on Intel GPU
cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'
15 changes: 15 additions & 0 deletions python/llm/test/benchmark/arc-perf-transformers-437-batch2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ repo_id:
- 'microsoft/phi-3-vision-128k-instruct'
- 'Qwen/Qwen2-7B-Instruct'
- 'microsoft/Phi-3-mini-128k-instruct'
# following models were just immigrated from transformer 4.36
- 'meta-llama/Llama-2-7b-chat-hf'
- 'meta-llama/Llama-2-13b-chat-hf'
- 'THUDM/chatglm3-6b-4bit'
- 'baichuan-inc/Baichuan2-7B-Chat'
- 'baichuan-inc/Baichuan2-13B-Chat-4bit'
- 'THUDM/glm-4-9b-chat'
- 'openbmb/MiniCPM-2B-sft-bf16'
#- 'SmerkyG/rwkv-5-world-7b' #this model only fp32 is supported for now, fp16 and bf16 are not supported
- '01-ai/Yi-6B-Chat'
- 'mistralai/Mistral-7B-Instruct-v0.2'
- 'deepseek-ai/deepseek-coder-7b-instruct-v1.5'
- '01-ai/Yi-1.5-6B-Chat'
local_model_hub: '/mnt/disk1/models'
warm_up: 1
num_trials: 3
Expand All @@ -19,4 +32,6 @@ in_out_pairs:
test_api:
- "transformer_int4_fp16_gpu" # on Intel GPU
cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
exclude:
- 'baichuan-inc/Baichuan2-13B-Chat-4bit:2048'
task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'
19 changes: 18 additions & 1 deletion python/llm/test/benchmark/arc-perf-transformers-437-batch4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ repo_id:
- 'microsoft/phi-3-vision-128k-instruct'
- 'Qwen/Qwen2-7B-Instruct'
- 'microsoft/Phi-3-mini-128k-instruct'
# following models were just immigrated from transformer 4.36
- 'meta-llama/Llama-2-7b-chat-hf'
- 'meta-llama/Llama-2-13b-chat-hf'
- 'THUDM/chatglm3-6b-4bit'
- 'baichuan-inc/Baichuan2-7B-Chat'
- 'baichuan-inc/Baichuan2-13B-Chat-4bit'
- 'THUDM/glm-4-9b-chat'
- 'openbmb/MiniCPM-2B-sft-bf16'
#- 'SmerkyG/rwkv-5-world-7b' #this model only fp32 is supported for now, fp16 and bf16 are not supported
- '01-ai/Yi-6B-Chat'
- 'mistralai/Mistral-7B-Instruct-v0.2'
- 'deepseek-ai/deepseek-coder-7b-instruct-v1.5'
- '01-ai/Yi-1.5-6B-Chat'
local_model_hub: '/mnt/disk1/models'
warm_up: 1
num_trials: 3
Expand All @@ -22,4 +35,8 @@ cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu w
exclude:
- 'Qwen/Qwen1.5-7B-Chat:2048'
- 'meta-llama/Meta-Llama-3-8B-Instruct:2048'
task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'
- 'meta-llama/Llama-2-13b-chat-hf:2048'
- 'baichuan-inc/Baichuan2-7B-Chat:2048'
- 'baichuan-inc/Baichuan2-13B-Chat-4bit:1024'
- 'baichuan-inc/Baichuan2-13B-Chat-4bit:2048'
task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'
15 changes: 15 additions & 0 deletions python/llm/test/benchmark/arc-perf-transformers-437.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ repo_id:
- 'microsoft/phi-3-vision-128k-instruct'
- 'Qwen/Qwen2-7B-Instruct'
- 'microsoft/Phi-3-mini-128k-instruct'
# following models were just immigrated from transformer 4.36
- 'meta-llama/Llama-2-7b-chat-hf'
- 'meta-llama/Llama-2-13b-chat-hf'
- 'THUDM/chatglm3-6b-4bit'
- 'baichuan-inc/Baichuan2-7B-Chat'
- 'baichuan-inc/Baichuan2-13B-Chat-4bit'
- 'THUDM/glm-4-9b-chat'
- 'openbmb/MiniCPM-2B-sft-bf16'
#- 'SmerkyG/rwkv-5-world-7b' #this model only fp32 is supported for now, fp16 and bf16 are not supported
- '01-ai/Yi-6B-Chat'
- 'mistralai/Mistral-7B-Instruct-v0.2'
- 'deepseek-ai/deepseek-coder-7b-instruct-v1.5'
- '01-ai/Yi-1.5-6B-Chat'
local_model_hub: '/mnt/disk1/models'
warm_up: 1
num_trials: 3
Expand All @@ -19,4 +32,6 @@ in_out_pairs:
test_api:
- "transformer_int4_fp16_gpu" # on Intel GPU
cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
exclude:
- 'baichuan-inc/Baichuan2-13B-Chat-4bit:2048'
task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'

0 comments on commit a78e0b9

Please sign in to comment.