Skip to content

Commit e06bbad

Browse files
committed
add docstrign
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
1 parent 80db2ce commit e06bbad

File tree

1 file changed

+7
-0
lines changed
  • src/compressed_tensors/transform

1 file changed

+7
-0
lines changed

src/compressed_tensors/transform/apply.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020

2121

2222
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+
"""
2330
for name, scheme in config.config_groups.items():
2431
factory = TransformFactory.from_scheme(scheme, name=name)
2532
factory.apply_to_model(model)

0 commit comments

Comments
 (0)