@@ -74,7 +74,7 @@ def apply_layerwise_casting(
7474    module : torch .nn .Module ,
7575    storage_dtype : torch .dtype ,
7676    compute_dtype : torch .dtype ,
77-     skip_modules_pattern : Union [str , Tuple [str , ...]] =  "default " ,
77+     skip_modules_pattern : Union [str , Tuple [str , ...]] =  "auto " ,
7878    skip_modules_classes : Optional [Tuple [Type [torch .nn .Module ], ...]] =  None ,
7979    non_blocking : bool  =  False ,
8080) ->  None :
@@ -109,17 +109,17 @@ def apply_layerwise_casting(
109109            The dtype to cast the module to before/after the forward pass for storage. 
110110        compute_dtype (`torch.dtype`): 
111111            The dtype to cast the module to during the forward pass for computation. 
112-         skip_modules_pattern (`Tuple[str, ...]`, defaults to `"default "`): 
112+         skip_modules_pattern (`Tuple[str, ...]`, defaults to `"auto "`): 
113113            A list of patterns to match the names of the modules to skip during the layerwise casting process. If set 
114-             to `"default "`, the default patterns are used. If set to `None`, no modules are skipped. If set to `None` 
114+             to `"auto "`, the default patterns are used. If set to `None`, no modules are skipped. If set to `None` 
115115            alongside `skip_modules_classes` being `None`, the layerwise casting is applied directly to the module 
116116            instead of its internal submodules. 
117117        skip_modules_classes (`Tuple[Type[torch.nn.Module], ...]`, defaults to `None`): 
118118            A list of module classes to skip during the layerwise casting process. 
119119        non_blocking (`bool`, defaults to `False`): 
120120            If `True`, the weight casting operations are non-blocking. 
121121    """ 
122-     if  skip_modules_pattern  ==  "default " :
122+     if  skip_modules_pattern  ==  "auto " :
123123        skip_modules_pattern  =  DEFAULT_SKIP_MODULES_PATTERN 
124124
125125    if  skip_modules_classes  is  None  and  skip_modules_pattern  is  None :
0 commit comments