Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions inference_lib/src/fp_quant/utils/replace.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import torch
import re
from torch import nn

from .config import FPQuantConfig
Expand Down Expand Up @@ -40,7 +40,7 @@ def replace_with_fp_quant_linear(
# Check if the current key is not in the `quantization_config.modules_to_not_convert`
current_key_name_str = ".".join(current_key_name)
if not any(
current_key_name_str.endswith(key)
re.search(key, current_key_name_str) is not None
for key in fp_quant_linear_config.modules_to_not_convert
):
with init_empty_weights():
Expand Down