Git Product home page Git Product logo

Comments (9)

jalammar avatar jalammar commented on May 12, 2024 1

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:
!pip install git+https://github.com/jalammar/ecco.git

from ecco.

jalammar avatar jalammar commented on May 12, 2024

Hi Anshoo,

Thank you so much for your kind words!

  1. We are currently working on BERT support for activation exploration. We don't have immediate plans for supporting other models but we're listening to the community.
  2. We are working on more extensive documentation that should make it easier for people to adapt Ecco for their needs and use-cases. Thank you for the initiative.
  3. Your best bet is Captum - https://captum.ai/tutorials/Bert_SQUAD_Interpret

from ecco.

anshoomehra avatar anshoomehra commented on May 12, 2024

Hi Anshoo,

Thank you so much for your kind words!

  1. We are currently working on BERT support for activation exploration. We don't have immediate plans for supporting other models but we're listening to the community.
  2. We are working on more extensive documentation that should make it easier for people to adapt Ecco for their needs and use-cases. Thank you for the initiative.
  3. Your best bet is Captum - https://captum.ai/tutorials/Bert_SQUAD_Interpret

@jalammar Appreciate your time responding to this inquiry & the reference to Captum.

from ecco.

yegorkryukov avatar yegorkryukov commented on May 12, 2024

@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!

from ecco.

yegorkryukov avatar yegorkryukov commented on May 12, 2024

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?

from ecco.

jalammar avatar jalammar commented on May 12, 2024

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.

from ecco.

Lim-Sung-Jun avatar Lim-Sung-Jun commented on May 12, 2024

Hello, @jalammar

Is there example of using a BERT?
I've seen a lot examples of GPT..

I want to use saliency on BERT's head, not INPUT TOKEN.

from ecco.

jalammar avatar jalammar commented on May 12, 2024

@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.

from ecco.

Lim-Sung-Jun avatar Lim-Sung-Jun commented on May 12, 2024

@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!

from ecco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.