-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BART Support #31
Comments
Hi Anshoo, Thank you so much for your kind words!
|
@jalammar Appreciate your time responding to this inquiry & the reference to Captum. |
@jalammar Looks like 'facebook/bart-large-mnli' is now supported? When I instantiate it I get the following error: lm = ecco.from_pretrained('facebook/bart-large-mnli')
AttributeError Traceback (most recent call last)
<ipython-input-5-a9021088d96a> in <module>()
1 import ecco
----> 2 lm = ecco.from_pretrained('facebook/bart-large-mnli')
2 frames
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in __getattr__(self, name)
1176 return modules[name]
1177 raise AttributeError("'{}' object has no attribute '{}'".format(
-> 1178 type(self).__name__, name))
1179
1180 def __setattr__(self, name: str, value: Union[Tensor, 'Module']) -> None:
AttributeError: 'BartForConditionalGeneration' object has no attribute 'shared' Any suggestions on how I can fix this? Thanks in advance! |
Unfortunately BART support wasn't completely there yet. I just made a couple of updates, could you try it now? Install the latest version of the repo: |
Thank you Jay. The model now loads. I'm trying to understand how to use it with the MNLI model. That model accepts a premise and a label. Where the premise is a piece of text ('Computer shut down unexpectedly') and a label ('politics'). So, the model spits out its prediction whether the label is correct for the premise. I can't figure out how to pass those two elements (premise and label) to any functions in the ecco lm. Any advice? |
My guess would be that that they put them in the same string separated by the [sep] token. The paper or model docs should explain that, I think. |
Hello, @jalammar Is there example of using a BERT? I want to use saliency on BERT's head, not INPUT TOKEN. |
@Lim-Sung-Jun There are examples of using BERT for neuron activation, but not for primary feature attribution/saliency. That hasn't been built out yet. I have create issue #64 to track the feature request and invite people to support it. |
I really appreciate your support! |
@jalammar et al,
Can't thank you enough for your thoughtful approach with "Illustrated Transformers" & for further uncovering Transformers (visually) with the help of "Ecco". These articles not just helping folks fundamentally understand things better but are acting as a stimulator for responsible future research. So thank you for the great work!! [ I apologize for the distraction, couldn't resist my gratitude while I had this opportunity to write to you! ]
I am primarily working on BART, T5, PEGASUS base & fine-tuned variants for my research on summarization & extreme summarization objectives for my company. I understand that ecco support generative models, perhaps the support for mentioned is not there yet.
Best,
Anshoo
The text was updated successfully, but these errors were encountered: