Added clarification to apply_fn parameter of apply_to_modules (#2831)

Co-authored-by: Awni Hannun <[email protected]>
This commit is contained in:
Chaoran Yu
2025-11-26 15:40:56 -08:00
committed by GitHub
co-authored by Awni Hannun
parent dd79d3c465
commit b054838780
2 changed files with 28 additions and 5 deletions
+4 -1
View File
@@ -407,7 +407,10 @@ class Module(dict):
instance).
Args:
apply_fn (Callable): The function to apply to the modules.
apply_fn (Callable): The function to apply to the modules which
takes two parameters. The first parameter is the string path of
the module (e.g. ``"model.layers.0.linear"``). The second
parameter is the module object.
Returns:
The module instance after updating submodules.