Downloads · 30 days
18
1% of all-time downloads
seonghyeonye/flipped_3B
flipped_3B is a machine learning model from seonghyeonye. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Official repository: seonghyeonye/Flipped-Learning FLIPPED uses a unique meta-learning method to show zero-shot task generalization on classification natural language prompts, outperforming GPT-3 and T0-11B on many ta…
Downloads · 30 days
18
1% of all-time downloads
All-time downloads
1.9K
Public
Repo size
22.8 GB
Likes
3
Public
Click a slice to open those files.
.bin11.4 GB · 100%
From the Hugging Face model README
Official repository: seonghyeonye/Flipped-Learning
FLIPPED uses a unique meta-learning method to show zero-shot task generalization on classification natural language prompts, outperforming GPT-3 and T0-11B on many tasks with a 4x smaller scale. It is a series of encoder-decoder model trained on a numerous classification dataset. We show inputs and its corresponding outputs of each instances in each dataset to FLIPPED, and train it to generate its possible instruction. We add unlikelihood loss in order not to generate the instruction when given the same input, but a wrong output. To obtain FLIPPED, we fine-tune a T5 model in a given scale on a multitask mixture covering many different classification NLP tasks.
You can use the models to perform inference on tasks by specifying your input-output NLP query in a "input: {input}\noutput: {output}" form , and the model will predict the instruction. For example, You can try "input: <extra_id_0> this is the best cast iron skillet you will ever buy<extra_id_1>\noutput: Positive" as an input, and the model will hopefully generate "Title: Review:".
Our overall explanation models along with ablations can be found in our paper. We recommend using the FLIPPED-11B checkpoint as it leads (on average) to the best performances on a variety of NLP tasks.
| Model | Number of parameters |
|---|---|
| Flipped_11B | 11 billion |
| Flipped_3B | 3 billion |
| Here is how to download the model in PyTorch: |
import torch
from transformers import T5Tokenizer, T5ForConditionalGeneration
model = T5ForConditionalGeneration.from_pretrained("seonghyeonye/flipped_3B")
tokenizer = T5Tokenizer.from_pretrained("seonghyeonye/flipped_3B")
If you want to use another checkpoint, please replace the path in T5Tokenizer and T5ForConditionalGeneration.
We also provide a quick Jupyter Notebook where you can inference with our method.
Note: the model was trained with fp32 activations. As such, we highly discourage running inference with fp16.
FLIPPED models are based on T5, a Transformer-based encoder-decoder language model pre-trained with a masked language modeling-style objective on C4. At a high level, the input text along with output label is fed to the encoder and the instruction text is produced by the decoder. The model is fine-tuned to autoregressively generate the target. We also feed input text along with a wrong input, adding an unlikelihood loss in order not to make model produce the proper instruction in that case. Here are our training details. Training details:
We trained different variants T0 with different mixtures of datasets.
| Model | Training datasets |
|---|---|
| FLIPPED_11B | - Multiple-Choice QA: CommonsenseQA, DREAM, QUAIL, QuaRTz, Social IQA, WiQA, Cosmos, QASC, Quarel, SciQ<br>- Sentiment: Amazon, App Reviews, IMDB, Rotten Tomatoes, Yelp<br>- Topic Classification: AG News, DBPedia<br>- Paraphrase Identification: MRPC, PAWS, QQP |
| FLIPPED_3B | Same as FLIPPED_11B |
| We only choose prompts examples that has output lables, which can be found on the dataset page. |
We evaluate our models on following datasets:
| Task category | Datasets |
|---|---|
| Natural language inference | ANLI(R1, R2, R3), CB, RTE |
| Coreference resolution | WSC, Winogrande |
| Word sense disambiguation | WiC |
| Sentence completion | COPA, HellaSwag, Story Cloze |
| QA | PIQA, ARC-Challenge, OpenbookQA |
| We also evaluate FLIPPED on a subset of BIG-bench benchmark: |
We evaluate the robustness of models on following datasets with changing the output label of the datasets. The substitute words can be found in our paper.
| Task category | (Datasets, Template name) |
|---|---|
| Unseen tasks | (WSC, does the pronoun refer to), (CB, can we infer), (RTE, MNLI crowdsource) |
| Seen tasks | (IMDB, Reviewer Enjoyment Yes No), (PAWS, Meaning) |
| The template name we used can be found in the promptsource template library. |
@article{ye2022guess,
title={Guess the Instruction! Flipped Learning Makes Language Models Stronger Zero-Shot Learners},
author={Ye, Seonghyeon and Kim, Doyoung and Jang, Joel and Shin, Joongbo and Seo, Minjoon},
journal={arXiv preprint arXiv:2210.02969},
year={2022}
}