Skip to content

Add GEM/xsum prompts #745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion promptsource/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

# These are users whose datasets should be included in the results returned by
# filter_english_datasets (regardless of their metadata)
INCLUDED_USERS = {"Zaid", "craffel"}
INCLUDED_USERS = {"Zaid", "craffel", "GEM"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
INCLUDED_USERS = {"Zaid", "craffel", "GEM"}
INCLUDED_USERS = {"Zaid", "craffel", "GEM"}



def highlight(input):
Expand Down
158 changes: 158 additions & 0 deletions promptsource/templates/GEM/xsum/templates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
dataset: GEM/xsum
templates:
019726f2-7140-4ab6-a18d-a5f9cc709a47: !Template
answer_choices: null
id: 019726f2-7140-4ab6-a18d-a5f9cc709a47
jinja: 'Summarize: {{document}} ||| {{target}}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
- ROUGE
- BLEU
original_task: true
name: summarize_DOC
reference: ''
2b9c75ca-2848-4a63-b3ce-b86ea2e2d7e8: !Template
answer_choices: null
id: 2b9c75ca-2848-4a63-b3ce-b86ea2e2d7e8
jinja: '{{document}}

This boils down to the simple idea that ||| {{target}}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
- ROUGE
- BLEU
original_task: true
name: DOC_boils_down_to_simple_idea_that
reference: ''
463de7e7-7ead-42ac-9c32-97ded6636940: !Template
answer_choices: null
id: 463de7e7-7ead-42ac-9c32-97ded6636940
jinja: '{{document}}

How would you rephrase that in a few words? ||| {{target}}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
- ROUGE
- BLEU
original_task: true
name: DOC_how_would_you_rephrase_few_words
reference: ''
7d3584c5-8864-4d11-bce9-65499cdef4cb: !Template
answer_choices: null
id: 7d3584c5-8864-4d11-bce9-65499cdef4cb
jinja: 'Summarize this document: {{document}}

Summary: ||| {{target}}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
- ROUGE
- BLEU
original_task: true
name: summarize_this_DOC_summary
reference: ''
88bc4152-7ddb-4624-bff4-3c9ec27d302f: !Template
answer_choices: null
id: 88bc4152-7ddb-4624-bff4-3c9ec27d302f
jinja: 'My college roommate asked me what this article means:


{{document}}


So I recapped it in layman''s terms: ||| {{target}}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
- ROUGE
- BLEU
original_task: true
name: college_roommate_asked_DOC_so_I_recap
reference: ''
a8d4ecfa-c944-44d5-878c-04fd5db59e64: !Template
answer_choices: null
id: a8d4ecfa-c944-44d5-878c-04fd5db59e64
jinja: 'Article: {{document}}


Summary: ||| {{target}}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
- ROUGE
- BLEU
original_task: true
name: article_DOC_summary
reference: Prefix-Tuning
cc0096ea-e9db-4e96-85b4-0740085fee55: !Template
answer_choices: null
id: cc0096ea-e9db-4e96-85b4-0740085fee55
jinja: '{{document}}


===


Given the above document, write one sentence to summarize: ||| {{target}}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
- ROUGE
- BLEU
original_task: true
name: DOC_given_above_write_one_sentence
reference: ''
d30a36f0-0055-41b4-8658-82c72c1b77a9: !Template
answer_choices: null
id: d30a36f0-0055-41b4-8658-82c72c1b77a9
jinja: '{{document}}


===


Write a summary of the text above : ||| {{target}}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
- ROUGE
- BLEU
original_task: true
name: DOC_write_summary_of_above
reference: ''
d84cc995-795e-406f-ad82-1eab79cc4f81: !Template
answer_choices: null
id: d84cc995-795e-406f-ad82-1eab79cc4f81
jinja: 'First, please read the article below.


{{document}}


Now, can you write me an extremely short abstract for it? ||| {{target}}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
- ROUGE
- BLEU
original_task: true
name: read_below_DOC_write_abstract
reference: ''
db54e9b5-8ca9-4266-a773-695a3dc5bbf4: !Template
answer_choices: null
id: db54e9b5-8ca9-4266-a773-695a3dc5bbf4
jinja: '{{document}}


TL;DR: ||| {{target}}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
- ROUGE
- BLEU
original_task: true
name: DOC_tldr
reference: GPT-2 TLDR