Skip to content

Commit

Permalink
more clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
dsikka committed Oct 22, 2024
1 parent 10b7a6c commit d25697d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/compressed_tensors/quantization/lifecycle/forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
from typing import Callable, Optional

import torch

# from compressed_tensors.quantization.cache import QuantizedKVParameterCache
from compressed_tensors.quantization.quant_args import (
QuantizationArgs,
QuantizationStrategy,
Expand Down
4 changes: 2 additions & 2 deletions src/compressed_tensors/quantization/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def iter_named_leaf_modules(model: Module) -> Generator[Tuple[str, Module], None
"""
for name, submodule in model.named_modules():
children = list(submodule.children())
# would the observer ever be attached when this function is called?
# TODO: verify if an observer would ever be attached in this case/remove check
if len(children) == 0 and "observer" in name:
yield name, submodule
else:
Expand Down Expand Up @@ -257,9 +257,9 @@ def iter_named_quantizable_modules(
:returns: generator tuple of (name, submodule)
"""
for name, submodule in model.named_modules():
# TODO: verify if an observer would ever be attached in this case/remove check
if include_children:
children = list(submodule.children())
# would the observer ever be attached when this function is called?
if len(children) == 0 and "observer" not in name:
yield name, submodule
else:
Expand Down

0 comments on commit d25697d

Please sign in to comment.