Skip to content

Support nn.Modules with tuple output #1215

@18jeffreyma

Description

@18jeffreyma

🚀 Feature

Current usage assumes that mdules must output a pytorch tensor and not a tuple: many modules in transformers library return multiple outputs, making captum not work with them (e.g. LlamaForCausalLM). This would be very useful in supporting more captum usage with auto-regressive models like Llama2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions