Skip to content

Commit

Permalink
[Datasets] Added POPE and Aligned. (#11)
Browse files Browse the repository at this point in the history
* Update generation_kwargs in pope.yaml

* Update pope_doc_to_text function
  • Loading branch information
Luodian authored Jan 23, 2024
1 parent b025c0e commit 4c3c2c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions lmms_eval/tasks/pope/pope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ doc_to_visual: !function utils.pope_doc_to_visual
doc_to_text: !function utils.pope_doc_to_text
doc_to_target: "answer"
generation_kwargs:
until:
- "ASSISTANT:"
max_new_tokens: 128
temperature: 0
top_p: 0
num_beams: 1
do_sample: false
process_results: !function utils.pope_process_results
metric_list:
- metric: pope_accuracy
Expand Down
2 changes: 1 addition & 1 deletion lmms_eval/tasks/pope/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def pope_doc_to_visual(doc):
def pope_doc_to_text(doc):
# Assuming the 'doc' dictionary has a key 'question' with the question text
question = doc["question"].strip()
return f"{question}\nAnswer the question with 'yes' or 'no'."
return f"{question}\nAnswer the question using a single word or phrase."


def pope_process_results(doc, results):
Expand Down

0 comments on commit 4c3c2c6

Please sign in to comment.