This is the T5-11B model described in our paper DREAM: Improving Situational QA by First Elaborating the Situation, NAACL 2022 (Arxiv link: https://arxiv.org/abs/2112.08656, ACL Anthology link: https://aclanthology.org/2022.naacl-main.82/)
What is DREAM π?
DREAM can be used to:
Build scene elaborations in a dataset-neutral way πΌοΈ
π Improve QA performance across different end-tasks and on different models π
When people π§βπ» answer questions about a specific situation, cognitive science π§ suggests that they form a mental picture πΌοΈ of that situation. Will language models π€ answer such questions more accurately if provided with additional details about the question situation πΌοΈ ?
We train a new model, DREAM π , to answer questions that elaborate the scenes πΌοΈ that situated questions are about, and then provide those elaborations as additional context π to a QA model π€ . Our results show that DREAM π is able to create more β accurate, β useful, and β consistent scene elaborations than a representative SOTA π, zero-shot model (Macaw π¦ ).
Remarkably, using DREAMβs π scene elaborations πΌοΈ as additional context improvesπ the answer accuracy across different downstream QA systems π€ and on different end-tasks π (including beyond that obtainable by further fine-tuning the QA system on DREAMβs training data π). Our approach is question-agnostic π«, leaves end-task QA models unchanged β¨, and thus easily portable to other QA models π, suggesting exciting opportunities for further improving and exploiting scene elaborations to better solve new problems. π‘
We invite you to try out DREAM π for your own application!
How to use DREAM π?
We provide a quick example of how you can try out DREAM with just a few lines of code:
>>> from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
>>> model = AutoModelForSeq2SeqLM.from_pretrained("allenai/DREAM")
>>> tokenizer = AutoTokenizer.from_pretrained("t5-11b")
>>> input_string = "$answer$ ; $question$ = [SITUATION] hitting someones car in the drive thru on purpose. [QUERY] rot"
>>> input_ids = tokenizer.encode(input_string, return_tensors="pt")
>>> output = model.generate(input_ids, max_length=200)
>>> tokenizer.batch_decode(output, skip_special_tokens=True)
["$answer$ = It's wrong to damage other people's property."]
As discussed in our paper, DREAM supports the following possible dimensions for each input situation S:
1. M : motivation of character(s) before S.
2. E: emotion of character(s) after S.
3. ROT : general Rule of Thumb (ROT) about whether action described in S is socially acceptable or not (also known as social norm).
4. Con: likely consequence of action in S.
To get DREAM's output for these dimensions, use the corresponding terms below after the "[QUERY] " tag in your input string:
motivation
emotion
rot
consequence
More details about DREAM π ...
For more details about DREAM, please refer to our:
- πPaper: https://aclanthology.org/2022.naacl-main.82/
- π»Dataset & Model: https://github.com/allenai/dream/
For additional instructions about using the DREAM model and sample commands, please refer to https://github.com/allenai/dream/blob/main/model/README_DREAM_model.md.
- Downloads last month
- 4