llmcompressor.utils.fsdp.context
fix_fsdp_module_name(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 | Type | Description | Default |
---|---|---|---|
name | str | name to strip | required |
Returns:
Type | Description |
---|---|
str | stripped name |
Source code in src/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.