From b27e5a27b920c917e5586d7204a5401df90c6651 Mon Sep 17 00:00:00 2001 From: Yuwen Hu <54161268+Oscilloscope98@users.noreply.github.com> Date: Wed, 24 Jan 2024 18:15:39 +0800 Subject: [PATCH] Remove the check for meta device in _replace_with_low_bit_linear (#9984) --- python/llm/src/bigdl/llm/transformers/convert.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python/llm/src/bigdl/llm/transformers/convert.py b/python/llm/src/bigdl/llm/transformers/convert.py index 3d133762..45a23ed4 100644 --- a/python/llm/src/bigdl/llm/transformers/convert.py +++ b/python/llm/src/bigdl/llm/transformers/convert.py @@ -203,7 +203,6 @@ def _replace_with_low_bit_linear(model, qtype, modules_to_not_convert=None, if is_linear and name not in modules_to_not_convert: # Check if the current key is not in the `modules_to_not_convert` if (not any(key in ".".join(current_key_name) for key in modules_to_not_convert) and - module.weight.data.device.type != 'meta' and not isinstance(module, LowBitLinear)): in_features, out_features, mp_group = linear_args with init_empty_weights():