-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update tests for transformers 4.36 #10858
Conversation
…to transformer4.36_tests
Examples are also verified. https://github.com/analytics-zoo/nano/issues/1120 |
workflow_dispatch: | ||
workflow_call: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# llm-cpp-build: # please uncomment it for PR tests | ||
# uses: ./.github/workflows/llm-binary-build.yml | ||
llm-cpp-build: # please uncomment it for PR tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert these changes before PR merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be other places changed for PR tests that should be reverted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted
- 'Qwen/Qwen-7B-Chat' | ||
- 'BAAI/AquilaChat-7B' | ||
- 'baichuan-inc/Baichuan2-7B-Chat' | ||
- 'baichuan-inc/Baichuan2-13B-Chat-4bit' | ||
- 'bigscience/bloomz-7b1' | ||
- 'fnlp/moss-moon-003-sft-4bit' | ||
# - 'fnlp/moss-moon-003-sft-4bit' # moss-moon-003-sft cannot work on transformers 4.34+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this supposed to be fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the tokenizer issue of moss-moon-003-sft model, because moss-moon-003-sft haven't fix the tokenizer issue to compatible with transformers 4.34+, we can not fix it. See the issue: https://github.com/analytics-zoo/nano/issues/1145
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then shall we keep transformers 4.31 in the test as well for this model?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know whether we need to keep such test for transformers 4.31 since ipex-llm would be updated to support transformers 4.36. @jason-dai Do we need to keep tests which only works on transformers 4.31?
@@ -75,7 +75,7 @@ jobs: | |||
echo "runner=$runner" >> $GITHUB_OUTPUT | |||
|
|||
llm-whisper-evaluation: | |||
# if: ${{ github.event.schedule || github.event.inputs.artifact == 'llm-whisper-evaluation' || github.event.inputs.artifact == 'all' }} # please comment it for PR tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this change to make this PR more clean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted
http://10.239.44.136:8888/pr_perf_gpu/ Need to check the performance before the merge. |
workflow_dispatch: | ||
workflow_call: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# llm-cpp-build: # please uncomment it for PR tests | ||
# uses: ./.github/workflows/llm-binary-build.yml | ||
llm-cpp-build: # please uncomment it for PR tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be other places changed for PR tests that should be reverted
@@ -18,10 +18,6 @@ export OMP_NUM_THREADS=$THREAD_NUM | |||
python -m pytest -s ${LLM_INFERENCE_TEST_DIR}/test_transformers_api.py -v | |||
python -m pytest -s ${LLM_INFERENCE_TEST_DIR}/test_optimize_model_api.py -v | |||
|
|||
python -m pip install transformers==4.34.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the testing for Transformers 4.34 is no longer necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be, mistral is put in transformers 4.36, which replaces 4.34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the testing for Transformers 4.34 is no longer necessary, since I move mistral test into general test cases.
|
||
llm-performance-test-on-arc: | ||
if: ${{ github.event.schedule || github.event_name == 'workflow_dispatch' || github.event.inputs.artifact == 'llm-performance-test-on-arc' || github.event.inputs.artifact == 'all' }} # please comment it for PR tests | ||
# needs: llm-cpp-build # please uncomment it for PR tests | ||
#if: ${{ github.event.schedule || github.event_name == 'workflow_dispatch' || github.event.inputs.artifact == 'llm-performance-test-on-arc' || github.event.inputs.artifact == 'all' }} # please comment it for PR tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For arc/core/spr perf test, except for the code that needs to be reverted, other changes LGTM. For igpu test, please refer to yuwen’s comment.
self.assertTrue(res) | ||
|
||
def test_transformers_auto_model_for_causal_lm_int4(self): | ||
model_path = os.environ.get('ORIGINAL_REPLIT_CODE_PATH') | ||
model_path = os.environ.get('ORIGINAL_CODESHELL_7B_PATH') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replit-code-v1-3b cannot run with transformers 4.36, so another code generation model is used here instead :)
@@ -99,7 +99,7 @@ jobs: | |||
echo "LLAMA_ORIGIN_PATH=${ORIGIN_DIR}/llama-7b-hf" >> "$GITHUB_ENV" | |||
echo "BLOOM_ORIGIN_PATH=${ORIGIN_DIR}/bloom-7b1" >> "$GITHUB_ENV" | |||
echo "ORIGINAL_CHATGLM2_6B_PATH=${ORIGIN_DIR}/chatglm2-6b" >> "$GITHUB_ENV" | |||
echo "ORIGINAL_REPLIT_CODE_PATH=${ORIGIN_DIR}/replit-code-v1-3b" >> "$GITHUB_ENV" | |||
echo "ORIGINAL_CODESHELL_7B_PATH=${ORIGIN_DIR}/CodeShell-7B-Chat" >> "$GITHUB_ENV" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replit-code-v1-3b cannot run with transformers 4.36, so another code generation model is used here instead :)
@hkvision @lalalapotter According to the performance report, seems mpt-7b-chat has some performance gap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Arc related changes LGTM.
paths: | ||
- ".github/workflows/llm_performance_tests.yml" | ||
- "python/llm/test/benchmark/**" | ||
- "python/llm/dev/benchmark/all-in-one/**" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should revert the change in this file which was for PR tests; any only leave necessary changes :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Update tests for transformers 4.36.2
Related issue: https://github.com/analytics-zoo/nano/issues/1289
Move mistral related test to main tests as mistral is working under transformers 4.36. Removed 4.34 tests