Skip to content

Commit 884db4b

Browse files
committed
fix style
Signed-off-by: Kyle Sayers <[email protected]>
1 parent b047914 commit 884db4b

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

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/transform/quip_example.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
_, ct_version = _is_package_available("compressed_tensors", return_version=True)
2323
_, tfms_version = _is_package_available("transformers", return_version=True)
2424
if version.parse(ct_version) < version.parse("0.10.3.dev"):
25-
print(version.parse(ct_version))
2625
raise ValueError("Please install compressed-tensors>=0.10.3 or from source")
2726
if version.parse(tfms_version) < version.parse("4.56.dev"):
2827
raise ValueError("Please install transformers>=4.56 or from source")

src/llmcompressor/modifiers/transform/quip/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
class QuIPModifier(Modifier):
2020
"""
2121
Implements the transforms according to
22-
[QuIP#: Even Better LLM Quantization with Hadamard Incoherence and Lattice Codebooks](https://arxiv.org/pdf/2402.04396) # noqa: E501
23-
[QuIP: 2-Bit Quantization of Large Language Models With Guarantees](https://arxiv.org/abs/2307.13304) # noqa: E501
22+
[QuIP#: Even Better LLM Quantization with Hadamard Incoherence and Lattice Codebooks](https://arxiv.org/pdf/2402.04396)
23+
[QuIP: 2-Bit Quantization of Large Language Models With Guarantees](https://arxiv.org/abs/2307.13304)
2424
2525
Transforms (rotations) are extra layers added to a model which reduce the accuracy
2626
loss induced by quantization. This is achieved through "rotating" weights and
@@ -42,7 +42,7 @@ class QuIPModifier(Modifier):
4242
to both weight fusing and online rotations
4343
:param ignore: Modules to ignore when attaching transforms
4444
:param transform_config: Optional transform config for overriding provided arguments
45-
"""
45+
""" # noqa: E501
4646

4747
transform_type: Literal["hadamard", "random-hadamard", "random-matrix"] = Field(
4848
default="random-hadamard"

0 commit comments

Comments
 (0)