yobx.torch.in_transformers.patches#
- yobx.torch.in_transformers.patches.get_patches_for(model: Module | None = None) List[PatchInfo][source]#
Returns the list of patches for a specific model. if model is None, patches everything it can.
Note
The function detects that
RotaryEmbedding.forwardis wrapped by checking if can find substringtransformers/modeling_rope_utils.pyinRotaryEmbedding.forward.__wrapped__. It does not seem to be the case with Python 3.10.