Skip to content

Commit f92d98a

Browse files
remove llmcompressor.transformers.oneshot references (#1729)
SUMMARY: Remove all references to `llmcompressor.transformers.oneshot` in our examples TEST PLAN: n/a Signed-off-by: Brian Dellabetta <[email protected]>
1 parent dd52183 commit f92d98a

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

examples/big_models_with_sequential_onloading/llama3.3_70b.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from datasets import load_dataset
22
from transformers import AutoModelForCausalLM, AutoTokenizer
33

4+
from llmcompressor import oneshot
45
from llmcompressor.modifiers.quantization import GPTQModifier
56
from llmcompressor.modifiers.smoothquant import SmoothQuantModifier
6-
from llmcompressor.transformers import oneshot
77
from llmcompressor.utils import dispatch_for_generation
88

99
# Select model and load it.

examples/multimodal_vision/qwen_2_5_vl_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from qwen_vl_utils import process_vision_info
77
from transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration
88

9+
from llmcompressor import oneshot
910
from llmcompressor.modifiers.quantization import GPTQModifier
10-
from llmcompressor.transformers import oneshot
1111
from llmcompressor.utils import dispatch_for_generation
1212

1313
# Load model.

examples/quantization_w4a16/llama3_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from datasets import load_dataset
22
from transformers import AutoModelForCausalLM, AutoTokenizer
33

4+
from llmcompressor import oneshot
45
from llmcompressor.modifiers.quantization import GPTQModifier
5-
from llmcompressor.transformers import oneshot
66
from llmcompressor.utils import dispatch_for_generation
77

88
# Select model and load it.

examples/quantization_w8a8_fp8/fp8_block_example.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
# * quantize the weights to fp8 with per channel via ptq
1717
# * quantize the activations to fp8 with dynamic per token
1818
recipe = QuantizationModifier(
19-
targets="Linear", scheme="FP8_BLOCK", ignore=["lm_head", "re:.*mlp.gate$"],
19+
targets="Linear",
20+
scheme="FP8_BLOCK",
21+
ignore=["lm_head", "re:.*mlp.gate$"],
2022
)
2123

2224
# Apply quantization.

examples/quantizing_moe/deepseek_r1_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from datasets import load_dataset
22
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
33

4+
from llmcompressor import oneshot
45
from llmcompressor.modeling import replace_modules_for_calibration
56
from llmcompressor.modifiers.quantization import GPTQModifier
6-
from llmcompressor.transformers import oneshot
77

88
# Select model and load it.
99

examples/quantizing_moe/qwen_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
from datasets import load_dataset
33
from transformers import AutoModelForCausalLM, AutoTokenizer
44

5+
from llmcompressor import oneshot
56
from llmcompressor.modifiers.quantization import GPTQModifier
6-
from llmcompressor.transformers import oneshot
77
from llmcompressor.utils import dispatch_for_generation
88

99
# select a Mixture of Experts model for quantization

0 commit comments

Comments
 (0)