Add benchmark util for transformers 4.42 (#11725)
* add new benchmark_util.py Add new benchmark_util.py for transformers>=4.43.1. The old one renamed to benchmark_util_prev.py. * Small fix to import code * Update __init__.py * fix file names * Update lint-python Update lint-python to exclude benchmark_util_4_29.py benchmark_util_4_43.py * Update benchmark_util_4_43.py * add benchmark_util for transformers 4.42
This commit is contained in:
parent
4676af2054
commit
e7f7141781
3 changed files with 4266 additions and 2 deletions
|
|
@ -21,7 +21,7 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
|||
PYTHON_ROOT_DIR="$SCRIPT_DIR/.."
|
||||
echo $PYTHON_ROOT_DIR
|
||||
PATHS_TO_CHECK="$SCRIPT_DIR/../../src"
|
||||
PATTERNS_TO_EXCLUDE="__init__.py,log4Error.py,$SCRIPT_DIR/../../src/ipex_llm/langchain/*,$SCRIPT_DIR/../../src/ipex_llm/transformers/gguf/models/model_implement/yuan2/*,benchmark_util_4_29.py,benchmark_util_4_43.py,tgi_api_server.py"
|
||||
PATTERNS_TO_EXCLUDE="__init__.py,log4Error.py,$SCRIPT_DIR/../../src/ipex_llm/langchain/*,$SCRIPT_DIR/../../src/ipex_llm/transformers/gguf/models/model_implement/yuan2/*,benchmark_util_4_29.py,benchmark_util_4_42.py,benchmark_util_4_43.py,tgi_api_server.py"
|
||||
PEP8_REPORT_PATH="$PYTHON_ROOT_DIR/test/pep8-report.txt"
|
||||
PYLINT_REPORT_PATH="$PYTHON_ROOT_DIR/test/pylint-report.txt"
|
||||
PYLINT_INSTALL_INFO="$PYTHON_ROOT_DIR/test/pylint-info.txt"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ import transformers
|
|||
|
||||
trans_version = transformers.__version__
|
||||
|
||||
if trans_version >= "4.43.1":
|
||||
if trans_version >= "4.43.0":
|
||||
from .benchmark_util_4_43 import BenchmarkWrapper
|
||||
elif trans_version >= "4.42.0":
|
||||
from .benchmark_util_4_42 import BenchmarkWrapper
|
||||
else:
|
||||
from .benchmark_util_4_29 import BenchmarkWrapper
|
||||
|
|
|
|||
4262
python/llm/src/ipex_llm/utils/benchmark_util_4_42.py
Normal file
4262
python/llm/src/ipex_llm/utils/benchmark_util_4_42.py
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue