Skip to content
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

Update tests for transformers 4.36 #10858

Merged
merged 63 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
f9d0107
update unit test
jenniew Apr 23, 2024
a86c35f
update
jenniew Apr 23, 2024
8a6e0f2
update
jenniew Apr 23, 2024
d658968
update
jenniew Apr 23, 2024
66639dc
update
jenniew Apr 23, 2024
e77cee4
update
jenniew Apr 23, 2024
f1d6944
fix gpu attention test
jenniew Apr 24, 2024
c2fa88b
update
jenniew Apr 24, 2024
b255ac5
update
jenniew Apr 24, 2024
a82199a
update
jenniew Apr 24, 2024
7e7d09c
update
jenniew Apr 25, 2024
8f1c355
update
jenniew Apr 25, 2024
0e7f73a
Merge branch 'main' of https://github.com/intel-analytics/ipex-llm in…
jenniew Apr 25, 2024
e0c4407
update
jenniew Apr 25, 2024
c51b7ea
update example test
jenniew Apr 26, 2024
a442768
replace replit code
jenniew Apr 26, 2024
5563f28
update
jenniew Apr 26, 2024
b575c48
update
jenniew Apr 26, 2024
cc0ed30
update
jenniew Apr 26, 2024
04333ae
update
jenniew Apr 26, 2024
8ecdeac
set safe_serialization false
jenniew Apr 27, 2024
49a6933
perf test
jenniew Apr 30, 2024
e52180c
merge
jenniew Apr 30, 2024
9217662
update
jenniew Apr 30, 2024
3ad25b7
update
jenniew May 1, 2024
8ee92d2
update
jenniew May 1, 2024
45d2383
update
jenniew May 1, 2024
e968252
update
jenniew May 1, 2024
d59f68c
update
jenniew May 1, 2024
f44e9a4
update
jenniew May 1, 2024
f9ece00
update
jenniew May 1, 2024
bf8aece
update
jenniew May 2, 2024
98789db
update
jenniew May 2, 2024
d459a82
update
jenniew May 2, 2024
51134d4
update
jenniew May 3, 2024
39c104b
update
jenniew May 3, 2024
5d32b59
update
jenniew May 3, 2024
da72111
update
jenniew May 4, 2024
687ba8b
update
jenniew May 4, 2024
8099a2c
update
jenniew May 4, 2024
270ecb8
update
jenniew May 5, 2024
bc847bf
update
jenniew May 5, 2024
0fcaa40
update
jenniew May 5, 2024
26aa194
update
jenniew May 6, 2024
22d0bf6
update
jenniew May 6, 2024
65ea875
update
jenniew May 7, 2024
4f98a38
update
jenniew May 7, 2024
c64ec33
update
jenniew May 7, 2024
9c9e92d
update
jenniew May 8, 2024
4b04c45
update
jenniew May 8, 2024
8638cea
merge
jenniew May 8, 2024
a533ae8
delete
jenniew May 8, 2024
4af1445
update
jenniew May 8, 2024
1f91353
update
jenniew May 8, 2024
0696491
update
jenniew May 8, 2024
6922dc7
update
jenniew May 8, 2024
6417726
update
jenniew May 14, 2024
e30a397
merge
jenniew May 15, 2024
ec2cd5e
update
jenniew May 15, 2024
bc1fec0
merge
jenniew May 17, 2024
55fee3b
Merge branch 'main' of https://github.com/intel-analytics/ipex-llm in…
jenniew May 22, 2024
dcd8115
revert
jenniew May 23, 2024
936fafe
update
jenniew May 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/llm-harness-evaluation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,6 @@ jobs:
shell: bash
run: |
pip install --upgrade datasets==2.14.6
if [ "${{ matrix.model_name }}" = "Mistral-7B-v0.1" ]; then
pip install --upgrade transformers==4.36
else
pip install --upgrade transformers==4.31
fi


- name: Run harness
shell: bash
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/llm-ppl-evaluation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,11 @@ jobs:
echo "MODEL_PATH=${ORIGIN_DIR}/${{ matrix.model_name }}/" >> "$GITHUB_ENV"
MODEL_PATH=${ORIGIN_DIR}/${{ matrix.model_name }}/
wget -r -nH -nc --no-verbose --cut-dirs=1 ${LLM_FTP_URL}/llm/${{ matrix.model_name }} -P ${ORIGIN_DIR}

- name: Upgrade packages
shell: bash
run: |
pip install --upgrade datasets==2.14.6
if [ "${{ matrix.model_name }}" = "Mistral-7B-v0.1" ]; then
pip install --upgrade transformers==4.36
else
pip install --upgrade transformers==4.31
fi
pip install --upgrade datasets==2.14.6

- name: Run perplexity
shell: bash
Expand Down
167 changes: 19 additions & 148 deletions .github/workflows/llm_performance_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,11 @@ jobs:
source /opt/intel/oneapi/setvars.sh
bash python/llm/test/run-llm-install-tests.sh

- name: Test on xpu(transformers==4.31.0)
- name: Test on xpu(transformers==4.36.2)
shell: bash
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

source /opt/intel/oneapi/setvars.sh
export USE_XETLA=OFF
export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
Expand All @@ -104,20 +103,6 @@ jobs:
sed -i 's/{today}/{today}_test1/g' run.py
python run.py

- name: Test on xpu(transformers==4.34.0)
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
export USE_XETLA=OFF
export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
# upgrade transformers for model Mistral-7B-v0.1
python -m pip install transformers==4.34.0
cp python/llm/test/benchmark/arc-perf-transformers-434.yaml python/llm/dev/benchmark/all-in-one/config.yaml
cd python/llm/dev/benchmark/all-in-one
# change csv name
sed -i 's/test1/test2/g' run.py
python run.py

- name: Test on xpu(transformers==4.37.0)
shell: bash
run: |
Expand All @@ -129,7 +114,7 @@ jobs:
cp python/llm/test/benchmark/arc-perf-transformers-437.yaml python/llm/dev/benchmark/all-in-one/config.yaml
cd python/llm/dev/benchmark/all-in-one
# change csv name
sed -i 's/test2/test3/g' run.py
sed -i 's/test1/test2/g' run.py
python run.py

- name: Concat csv and generate html
Expand All @@ -151,7 +136,7 @@ jobs:
run: |
cd python/llm/dev/benchmark/all-in-one
python ../../../test/benchmark/check_results.py -c test1 -y ../../../test/benchmark/arc-perf-test.yaml
python ../../../test/benchmark/check_results.py -c test2 -y ../../../test/benchmark/arc-perf-transformers-434.yaml
python ../../../test/benchmark/check_results.py -c test2 -y ../../../test/benchmark/arc-perf-transformers-437.yaml
find . -name "*test*.csv" -delete
if [ ${{ github.event_name }} == "schedule" ] || [ ${{ github.event_name }} == "workflow_dispatch" ]; then
curl -T ./*.csv ${LLM_FTP_URL}/llm/nightly_perf/gpu/
Expand Down Expand Up @@ -279,6 +264,7 @@ jobs:
exit 1
fi


- name: Test on core ${{ matrix.platform }}
shell: bash
run: |
Expand Down Expand Up @@ -325,8 +311,8 @@ jobs:
# - name: Prepare for install ipex-llm from source
# shell: bash
# run: |
# sed -i 's/"bigdl-core-xe-21==" + VERSION + "/"bigdl-core-xe-21/g' python/llm/setup.py
# sed -i 's/"bigdl-core-xe-21==" + VERSION/"bigdl-core-xe-21"/g' python/llm/setup.py
# sed -i 's/"bigdl-core-xe-21==" + CORE_XE_VERSION/"bigdl-core-xe-21"/g' python/llm/setup.py
# sed -i 's/"bigdl-core-xe-esimd-21==" + CORE_XE_VERSION/"bigdl-core-xe-esimd-21"/g' python/llm/setup.py

# - name: Install ipex-llm and other related packages (install from source)
# shell: cmd
Expand Down Expand Up @@ -426,33 +412,10 @@ jobs:

call conda deactivate

- name: Prepare igpu perf test for Mistral (32-32)
shell: bash
run: |
sed -i 's/{today}_test1/{today}_test2/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_434.yaml

- name: Test on igpu for Mistral (32-32)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.34.0

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_434.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: 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/{today}_test1/{today}_test2/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)
Expand Down Expand Up @@ -495,14 +458,14 @@ 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}_test2/{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)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.31.0
pip install transformers==4.36.2

set SYCL_CACHE_PERSISTENT=1
set BIGDL_LLM_XMX_DISABLED=1
Expand All @@ -517,33 +480,10 @@ jobs:

call conda deactivate

- name: Prepare igpu perf test for Mistral (1024-128)
shell: bash
run: |
sed -i 's/{today}_test1/{today}_test2/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_434.yaml

- name: Test on igpu for Mistral (1024-128)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.34.0

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_434.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: 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/{today}_test1/{today}_test2/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)
Expand Down Expand Up @@ -585,14 +525,14 @@ 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}_test2/{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)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.31.0
pip install transformers==4.36.2

set SYCL_CACHE_PERSISTENT=1
set BIGDL_LLM_XMX_DISABLED=1
Expand All @@ -607,33 +547,10 @@ jobs:

call conda deactivate

- name: Prepare igpu perf test for Mistral (2048-256)
shell: bash
run: |
sed -i 's/{today}_test1/{today}_test2/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_434.yaml

- name: Test on igpu for Mistral (2048-256)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.34.0

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_434.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: 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/{today}_test1/{today}_test2/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)
Expand Down Expand Up @@ -675,14 +592,14 @@ jobs:
shell: bash
run: |
sed -i 's/2048-256/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}_test2/{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_loadlowbit.yaml

- name: Test on igpu (load_low_bit 1024-128)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.31.0
pip install transformers==4.36.2

set SYCL_CACHE_PERSISTENT=1
set BIGDL_LLM_XMX_DISABLED=1
Expand All @@ -697,33 +614,10 @@ jobs:

call conda deactivate

- name: Prepare igpu perf test for Mistral (load_low_bit 1024-128)
shell: bash
run: |
sed -i 's/{today}_test1/{today}_test2/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_loadlowbit_434.yaml

- name: Test on igpu for Mistral (load_low_bit 1024-128)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.34.0

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_loadlowbit_434.yaml config.yaml
set PYTHONIOENCODING=utf-8
python run.py >> %CSV_SAVE_PATH%\1024-128_loadlowbit\log\%LOG_FILE% 2>&1
if %ERRORLEVEL% neq 0 (exit /b 1)

call conda deactivate

- name: Prepare igpu perf test for Qwen 1.5 (load_low_bit 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/{today}_test1/{today}_test2/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_loadlowbit_437.yaml

- name: Test on igpu for Qwen 1.5 (load_low_bit 1024-128)
Expand Down Expand Up @@ -763,14 +657,14 @@ jobs:
- name: Prepare igpu perf test (int4+fp16 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}_test2/{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 (int4+fp16 1024-128)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.31.0
pip install transformers==4.36.2

set SYCL_CACHE_PERSISTENT=1
set BIGDL_LLM_XMX_DISABLED=1
Expand All @@ -785,33 +679,10 @@ jobs:

call conda deactivate

- name: Prepare igpu perf test for Mistral (int4+fp16 1024-128)
shell: bash
run: |
sed -i 's/{today}_test1/{today}_test2/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_434.yaml

- name: Test on igpu for Mistral (int4+fp16 1024-128)
shell: cmd
run: |
call conda activate igpu-perf
pip install transformers==4.34.0

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_434.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)

call conda deactivate

- name: Prepare igpu perf test for Qwen 1.5 (int4+fp16 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/{today}_test1/{today}_test2/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_437.yaml

- name: Test on igpu for Qwen 1.5 (int4+fp16 1024-128)
Expand Down
Loading
Loading