The most common hooking functions are supported out of the box by Unseal.
Some of the methods can be used directly as a function in a hook, others return such a function and some will return the hook itself. This will be indicated in the docstring.
This method can be used directly in the construction of a hook.
unseal.hooks.common_hooks.save_output
This method is a factory and returns a function that can be used in a hook to replace the activation of a layer.
unseal.hooks.common_hooks.replace_activation
unseal.hooks.common_hooks.transformers_get_attention
unseal.hooks.common_hooks.create_attention_hook
unseal.hooks.common_hooks.create_logit_hook
unseal.hooks.common_hooks.gpt_attn_wrapper