Skip to content

Commit b6553be

Browse files
jeejeeleeIsotr0pygemini-code-assist[bot]
authored
[Misc] Slight improvement of the BNB (#19418)
Signed-off-by: Jee Jee Li <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 64a9af5 commit b6553be

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

vllm/model_executor/layers/quantization/bitsandbytes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ def get_min_capability(cls) -> int:
7171

7272
@staticmethod
7373
def get_config_filenames() -> list[str]:
74-
return [
75-
"adapter_config.json",
76-
]
74+
return []
7775

7876
@classmethod
7977
def from_config(cls, config: dict[str, Any]) -> "BitsAndBytesConfig":

vllm/model_executor/model_loader/bitsandbytes_loader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@ def _unquantized_generator(self, hf_weights_files, use_safetensors,
392392
def _get_bnb_target_modules(self, model: nn.Module) -> None:
393393

394394
for name, module in model.named_modules():
395-
if isinstance(module, (LinearBase, )):
395+
if (isinstance(module, LinearBase) and
396+
hasattr(module.quant_method, "quant_config")):
396397
if modules_info := self.modules_mapping.get_sub_modules(name):
397398
# Map vllm's names to transformers's names.
398399
rep_name, sub_modules = modules_info

0 commit comments

Comments
 (0)