We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfa02eb commit 858a0f6Copy full SHA for 858a0f6
src/llmcompressor/modeling/prepare.py
@@ -1,3 +1,5 @@
1
+import warnings
2
+
3
import tqdm
4
from compressed_tensors.utils import replace_module
5
from transformers import PreTrainedModel
@@ -20,6 +22,14 @@ def replace_modules_for_calibration(
20
22
model: PreTrainedModel,
21
23
calibrate_all_experts: bool = True,
24
) -> PreTrainedModel:
25
+ # This function is deprecated. Use moe_calibration_context instead.
26
+ warnings.warn(
27
+ "replace_modules_for_calibration is deprecated. \
28
+ Use moe_calibration_context instead.",
29
+ DeprecationWarning,
30
+ stacklevel=2,
31
+ )
32
33
for name, module in tqdm.tqdm(list(model.named_modules())):
34
cls_name = module.__class__.__name__
35
if cls_name in replacements:
0 commit comments