Add benchmark_util for transformers >= 4.44.0 (#12171)

* Create benchmark_util_4_45.py

* Update __init__.py

* Update lint-python

* Update benchmark_util_4_45.py

* Update benchmark_util_4_45.py

* Create benchmark_util_4_44.py
This commit is contained in:
Zijie Li 2024-10-14 03:40:12 -04:00 committed by GitHub
parent 8e35800abe
commit 7d80db710e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9290 additions and 2 deletions

View file

@ -21,7 +21,7 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
PYTHON_ROOT_DIR="$SCRIPT_DIR/.." PYTHON_ROOT_DIR="$SCRIPT_DIR/.."
echo $PYTHON_ROOT_DIR echo $PYTHON_ROOT_DIR
PATHS_TO_CHECK="$SCRIPT_DIR/../../src" 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_42.py,benchmark_util_4_43.py,tgi_api_server.py,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,benchmark_util_4_44.py,benchmark_util_4_45.py,tgi_api_server.py,api_server.py"
PEP8_REPORT_PATH="$PYTHON_ROOT_DIR/test/pep8-report.txt" PEP8_REPORT_PATH="$PYTHON_ROOT_DIR/test/pep8-report.txt"
PYLINT_REPORT_PATH="$PYTHON_ROOT_DIR/test/pylint-report.txt" PYLINT_REPORT_PATH="$PYTHON_ROOT_DIR/test/pylint-report.txt"
PYLINT_INSTALL_INFO="$PYTHON_ROOT_DIR/test/pylint-info.txt" PYLINT_INSTALL_INFO="$PYTHON_ROOT_DIR/test/pylint-info.txt"

View file

@ -23,7 +23,9 @@ import transformers
trans_version = transformers.__version__ trans_version = transformers.__version__
if trans_version >= "4.45.0": if trans_version >= "4.45.0":
pass from .benchmark_util_4_45 import BenchmarkWrapper
elif trans_version >= "4.44.0":
from .benchmark_util_4_44 import BenchmarkWrapper
elif trans_version >= "4.43.0": elif trans_version >= "4.43.0":
from .benchmark_util_4_43 import BenchmarkWrapper from .benchmark_util_4_43 import BenchmarkWrapper
elif trans_version >= "4.42.0": elif trans_version >= "4.42.0":

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff