llmcompressor.utils.fsdp.context
Functions:
-
fix_fsdp_module_name
–Remove FSDP wrapper prefixes from a module name.
-
main_process_first_context
–Creates a context manager where the main process runs the block before all other
fix_fsdp_module_name
Remove FSDP wrapper prefixes from a module name. Accounts for scenario where FSDP_WRAPPED_MODULE is at the end of the name, as well as in the middle.
Parameters:
-
name
str
) –name to strip
Returns:
-
str
–stripped name
Source code in llmcompressor/utils/fsdp/context.py
main_process_first_context
Creates a context manager where the main process runs the block before all other processes. Returns a nullcontext when called from a single process application.