Skip to content

Commit

Permalink
Add AI2D evaluation without masks (#325)
Browse files Browse the repository at this point in the history
* Fix `LMMS_EVAL_PLUGINS`

* Add AI2D (without masks)
  • Loading branch information
zhijian-liu authored Oct 16, 2024
1 parent 1311c6e commit 8c2d89b
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions lmms_eval/tasks/ai2d/ai2d_no_mask.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
dataset_path: Efficient-Large-Model/ai2d-no-mask
task: "ai2d_no_mask"
dataset_kwargs:
token: True
test_split: test
output_type: generate_until
doc_to_visual: !function utils.ai2d_doc_to_visual
doc_to_text: !function utils.ai2d_doc_to_text
doc_to_target: !function utils.ai2d_doc_to_target

lmms_eval_specific_kwargs:
default:
prompt_format: mcq
pre_prompt: ""
post_prompt: "\nAnswer with the option's letter from the given choices directly."
gpt4v:
prompt_format: mcq
pre_prompt: ""
post_prompt: "\nAbove choices are given in {option}. {content} format.\nPlease answer with the option letter from the given choices directly."
qwen_vl:
prompt_format: qa
pre_prompt: ""
post_prompt: " Answer:"
xcomposer2_4khd:
prompt_format: mcq_xcomposer
pre_prompt: "[UNUSED_TOKEN_146]user\nQuestion: "
post_prompt: "[UNUSED_TOKEN_145]\n[UNUSED_TOKEN_146]assistant\nThe answer is"

model_specific_target_kwargs:
default: "mcq"
qwen_vl: "qa"

generation_kwargs:
max_new_tokens: 16
temperature: 0
do_sample: False

filter_list:
- name: "flexible-extract"
filter:
- function: !function utils.MultiChoiceRegexFilter
group_select: 0
ignore_case: true
ignore_punctuation: true
regex_pattern: "([A-Z])\\."

metric_list:
- metric: exact_match
aggregation: mean
higher_is_better: true
ignore_case: true
ignore_punctuation: true

metadata:
- version: 0.0

0 comments on commit 8c2d89b

Please sign in to comment.