osainz59 / Ask2Transformers

A Framework for Textual Entailment based Zero Shot text classification
https://osainz59.github.io/Ask2Transformers/
Apache License 2.0
151 stars 15 forks source link

Please update the README? #1

Closed davidwang20 closed 3 years ago

davidwang20 commented 3 years ago

This seems like it would be really cool to use but unfortunately the example code in the readme is no longer valid, and I've been struggling for a long time to get this thing to work. It seems "NLITopicClassifier" now requires an additional argument to specify which pretrained model to use, but not all of them work.

Provide further explanation or documentation?

davidwang20 commented 3 years ago

For example, here is the stack trace when I try to run NLITopicClassifier using 'gpt2' as the first argument of its contructor in exactly the usage provided in the README:

image

osainz59 commented 3 years ago

Hi! You are right, I should give more information about which are the pretrained models expected to be used with the NLITopicClassifier class. I will push a hotfix asap with the indications.

But for now, the only models that are expected to work are the ones that are already fine-tuned on the MNLI task. For instance you can try the following ones: "roberta-large-mnli", "facebook/bart-large-mnli", "microsoft/deberta-v2-xlarge-mnli", "joeddav/xlm-roberta-large-xnli", etc ... Remember that to use some of them you will need to update your Transformers version.

davidwang20 commented 3 years ago

I tried with microsoft/deberta-v2-xlarge-mnli and so far its working well. Outside of lack of documentation it is a very cool project 👍.