File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
gptqmodel/nn_modules/qlinear Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,13 @@ def import_bitblas():
4646
4747 if BITBLAS_DATABASE_PATH is None :
4848 from bitblas .cache import get_database_path
49- BITBLAS_DATABASE_PATH = get_database_path ()
49+ from importlib .metadata import version
50+
51+ bitblas_version = version (distribution_name = "bitblas" )
52+ gptqmodel_version = version (distribution_name = "gptqmodel" )
53+
54+ # for stability, tvm compiled caches are stored keyed by bot bitblas and gptqmodel version
55+ BITBLAS_DATABASE_PATH = f"{ get_database_path ()} _v{ bitblas_version } _gptqmodel_v{ gptqmodel_version } "
5056
5157
5258def unpack_qzeros (qzeros , bits ):
Original file line number Diff line number Diff line change @@ -13,3 +13,4 @@ threadpoolctl>=3.5.0
1313packaging >= 24.1
1414ninja >= 1.11.1.1
1515bitblas >= 0.0.1.dev12
16+ importlib >= 1.0.4
Original file line number Diff line number Diff line change 77import unittest # noqa: E402
88
99import torch # noqa: E402
10- from gptqmodel .nn_modules .qlinear .qlinear_bitblas import QuantLinear as BitBLASQuantLinear # noqa: E402
10+ from gptqmodel .nn_modules .qlinear .qlinear_bitblas import BitBLASQuantLinear # noqa: E402
1111
1212try :
1313 from gptqmodel_exllama_kernels import prepare_buffers , set_tuning_params # noqa: F401
You can’t perform that action at this time.
0 commit comments