Skip to content

Commit

Permalink
update hooks in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
  • Loading branch information
kylesayrs committed Nov 15, 2024
1 parent d22ad02 commit 840a41b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/llmcompressor/modifiers/calibration/test_kv_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
def _prep_for_calibration(module: torch.nn.Module):
if is_attention_module(module):
module.register_forward_pre_hook(
calibrate_kv_cache_input_hook(), with_kwargs=True
calibrate_kv_cache_input_hook, with_kwargs=True
)
module.register_forward_hook(calibrate_kv_cache_output_hook())
module.register_forward_hook(calibrate_kv_cache_output_hook)
module.quantization_status = QuantizationStatus.CALIBRATION


Expand Down
2 changes: 1 addition & 1 deletion tests/llmcompressor/observers/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _prep_for_input_quant_calibration(module: torch.nn.Module):
if not quantization_scheme:
return

module.register_forward_pre_hook(calibrate_input_hook())
module.register_forward_pre_hook(calibrate_input_hook)
module.quantization_status = QuantizationStatus.CALIBRATION


Expand Down

0 comments on commit 840a41b

Please sign in to comment.