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 80db2ce commit e06bbadCopy full SHA for e06bbad
src/compressed_tensors/transform/apply.py
@@ -20,6 +20,13 @@
20
21
22
def apply_transform_config(model: torch.nn.Module, config: TransformConfig):
23
+ """
24
+ Apply a transform config to a model. Weight transforms are fused into weights, while
25
+ activation transforms are attached as submodules and trigger via pytorch hooks
26
+
27
+ :param model: model to apply config to
28
+ :param config: transform config to apply
29
30
for name, scheme in config.config_groups.items():
31
factory = TransformFactory.from_scheme(scheme, name=name)
32
factory.apply_to_model(model)
0 commit comments