For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python class
WeightRenaming
WeightRenaming
class max.pipelines.lib.WeightRenaming(pattern, replacement)
Bases: object
Renames weights by regular expression substitution.
Replaces every match of pattern in a weight’s name, as
re.sub() does, so replacement can refer to groups as
\1 or \g<name>. A pattern matches anywhere in the name unless
it is anchored.
-
Raises:
-
ValueError – If
patternis not a regular expression, uses look-around or a back-reference, or can match the empty string. -
Parameters:
pattern
pattern: str
The regular expression to replace.
prefix()
classmethod prefix(prefix)
Returns the rule that puts every name under prefix.
A pipeline model appends it to an entry’s rules to place a module in
a graph, as a speculative-decoding graph places its target under
target..
replacement
replacement: str
The text that replaces each match.