llmcompressor.pipelines.sequential.ast_helpers
Functions:
-
autowrap_forwards–Replace the
forwardmethod of the given modules with a recompiled version where
autowrap_forward
Replace the forward method of the given module with a recompiled version where all untraceble code patterns are removed and replaced with torch.fx function wrappers.
For a list of untraceable code patterns and their explainations, see https://github.com/vllm-project/llm-compressor/pull/1411
Parameters:
-
(moduleModule) –module whose forward method should be replaced
-
(ignoreList[str]) –explicit list of function names to wrap
Source code in llmcompressor/pipelines/sequential/ast_helpers.py
autowrap_forwards
Replace the forward method of the given modules with a recompiled version where all untraceble code patterns are removed and replaced with torch.fx function wrappers
Parameters:
-
(modulesList[Module]) –list of modules whose forward methods should be replaced
-
(ignoreList[str]) –explicit list of function names to wrap