[docs]defget_investigation_patterns(verbose:int=0)->List["PatternOptimization"]:# noqa: F821""" Returns a default list of patterns for investigations. They do nothing but prints information if verbose > 0. .. runpython:: :showcode: import pprint from experimental_experiment.xoptim.patterns_investigation import ( get_investigation_patterns ) pprint.pprint(get_investigation_patterns()) """from.element_wiseimportBinaryInvestigationfrom.llm_patternsimport(FunctionPackedMatMulPattern,FunctionPowTanhPattern,FunctionSplitRotaryMulPattern,)return[BinaryInvestigation(verbose=verbose),FunctionPackedMatMulPattern(verbose=verbose),FunctionPowTanhPattern(verbose=verbose),FunctionSplitRotaryMulPattern(verbose=verbose),]
[docs]classSimplifyingEasyPatternFunction(EasyPatternOptimization):""" Base class to build investigation patterns. See :class:`experimental_experiment.xoptim.patterns_investigation. llm_patterns.FunctionPowTanhPattern` to see how to use it. """@classmethoddeff_name(cls)->str:returncls.__name__.replace("Pattern","").replace("Function","")