Open rodgzilla opened 6 years ago
Look good to me! I will merge your PR.
I can help you test the SimilarityHead
, but not before the end of August, so if someone want to tackle this question during the summer, please do!
There are a few discussion related to this on OpenAI's repo that are probably worth following:
Hi!
In the research paper, the authors tackle many different problems using the same base architecture, it is one the main strength of this article. Unfortunately, the actual version of the code only allows to work with multiple choices tasks such as ROCStories.
This is what I would like to fix in a future patch. By providing multiple model heads dedicated to other tasks that multiple choices problems, we can allow a lot more people to use this code.
I have already started working on this and I would like to get your opinions on a few design choices.
This is the new version of the
DoubleHeadModel
class:The
__init__
method takes a new argumenttask_head_type
which can be one of the following things:"multiple_choice"
for multiple choice problems (corresponds to currentClfHead
) such as ROCStories."similarity"
for similarity tasks such Quora Question Pairs (QQP) and the Semantic Textual Similarity benchmark (STS-B)."inference"
for Natural Language Inference (NLI) tasks such as SNLI, QNLI and MNLI. Inference problems are treated as classification problems with 3 classes: entailment, contradiction and neutral.("classification", n_class)
for classification tasks such as the Corpus of Linguistic Acceptability (CoLA) and the Stanford Sentiment Treebank (SST-2).The code for the various heads is the following:
Do you think that this new design is reasonable?
If this code seems ok, I would like to test it before creating a pull request. Unfortunately I will not have the time to test
SimilarityHead
. Would anyone like to work with me on this ?