Skip to content
Merged
Show file tree
Hide file tree
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 src/llmcompressor/entrypoints/model_free/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import Mapping, TypeVar

import torch
from compressed_tensors.utils.match import _match_name
from compressed_tensors.utils.match import match_name
from loguru import logger
from transformers.file_utils import CONFIG_NAME

Expand Down Expand Up @@ -84,7 +84,7 @@ def natural_key(s: str) -> list[str | int]:
for name in names:
# match until we get a full set
for target in targets:
if _match_name(name, target):
if match_name(name, target):
if matches[target] is None:
matches[target] = name
else:
Expand Down
4 changes: 2 additions & 2 deletions src/llmcompressor/entrypoints/model_free/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import torch
from compressed_tensors.quantization import QuantizationScheme
from compressed_tensors.utils.match import _match_name
from compressed_tensors.utils.match import match_name
from safetensors.torch import load_file, save_file
from torch.nn import Module

Expand All @@ -31,7 +31,7 @@ def iter_quantizable_tensors(
for name in list(tensors.keys()):
module_name, param_name = name.rsplit(".", 1)
is_linear_weight = param_name == "weight" and not module_name.endswith("norm")
is_ignored = any(_match_name(module_name, ign) for ign in ignore)
is_ignored = any(match_name(module_name, ign) for ign in ignore)
if not is_linear_weight or is_ignored:
continue

Expand Down
Loading