timoschick / pet

This repository contains the code for "Exploiting Cloze Questions for Few-Shot Text Classification and Natural Language Inference"
https://arxiv.org/abs/2001.07676
Apache License 2.0
1.62k stars 283 forks source link

What is the role of a verbalizer in text generation? #43

Closed ghost closed 2 years ago

ghost commented 3 years ago

The paper said GenPET wouldn't have a verbalizer. I know you said that the code in that feature branch had some stuff that wasn't talked about in the arxiv preprint. Is this one of them?

timoschick commented 3 years ago

Indeed GenPET does not need a verbalizer - you can still find verbalizers in the code because the feature branch also supports regular PET (which does require verbalizers). However, verbalizers are not used for text generation which is why GenerativePVP has a default verbalizer function that just returns an empty list. When you define a subclass of GenerativePVP for your own task, you do not need to (and should not) specify any verbalizer at all.