-
Notifications
You must be signed in to change notification settings - Fork 0
KIE bench 추가 (VQA 단독모델, full benchmark) #15
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
Changes from all commits
5ef502e
d3ad89e
dea7bfb
0266ddf
0461777
73cc319
9afcc1d
0591aa2
2057e1a
0ec3f07
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,40 @@ | |||||||||||
task: "KIE_bench" | |||||||||||
test_split: test | |||||||||||
|
|||||||||||
# Dataset configuration options | |||||||||||
dataset_path: "/app/docfm/datasets/benchmark/key_information_extraction/v3.1_HuggingFace" | |||||||||||
dataset_name: "KIE_bench" | |||||||||||
dataset_kwargs: | |||||||||||
load_from_disk: true | |||||||||||
process_docs: null | |||||||||||
|
|||||||||||
# Prompting / in-context formatting options | |||||||||||
doc_to_visual: !function utils.KIE_bench_doc_to_visual | |||||||||||
doc_to_text: !function utils.KIE_bench_doc_to_text | |||||||||||
doc_to_target: !function utils.KIE_bench_doc_to_target | |||||||||||
doc_to_choice: null | |||||||||||
|
|||||||||||
# Generation settings | |||||||||||
output_type: generate_until | |||||||||||
generation_kwargs: {} | |||||||||||
|
|||||||||||
# Post-processing and metrics | |||||||||||
process_results: !function utils.KIE_bench_process_results | |||||||||||
metric_list: | |||||||||||
- metric: UpScore | |||||||||||
aggregation: !function utils.KIE_bench_aggregate_results | |||||||||||
higher_is_better: true | |||||||||||
|
|||||||||||
|
|||||||||||
# Model-specific prompt configurations | |||||||||||
lmms_eval_specific_kwargs: | |||||||||||
default: | |||||||||||
pre_prompt: "Extract information from the given image based on this schema: " | |||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 마지막에 \n이 필요할까요? 밑에 utils.py 를 보면 pre_prompt, question, post_prompt를 구분자 없이 붙이고 있는데, post_prompt는 맨 앞에 \n이 있더라구요. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. \n이 들어간 이유기존의 프롬프트는 info-extractor-engine 의 main branch에서 가져온 것인데요.
위와 같이 정의되어있습니다. 여기에서 빈 줄을 따라 만들었기에 '\n'이 포함된 형태로 사용되었습니다.
고려해야할 점schema 포함 여부에 따른 프롬프트 변화기존에는 LLM의 평가를 위한 프롬프트이고 schema는 formatting을 위한 자료로서 따로 입력되는 형태였다면, lmms-eval에서는 VLM을 평가하기 위한 프롬프트이고, schema가 포함되어야 합니다.
이러한 문제를 해결하기 위해 lmms-eval 에서는 [이미지][pre prompt - schema - post prompt] 형태로 입력했습니다. schema 이후 줄바꿈을 해야하는가?
|
|||||||||||
post_prompt: "\n1. If you cannot find the information or the value is not mentioned, return nothing.\n2. If you can find more than one value for a key, return all the values in an array.\n3. Return the value only if the given key’s value exists in the provided content. If it does not exist, return empty string." | |||||||||||
metadata: | |||||||||||
- version: 0.0 | |||||||||||
|
|||||||||||
|
|||||||||||
# Additional metadata | |||||||||||
|
|||||||||||
- version: 0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분은 lmms-eval 최신 코드를 적용하신 것 같은데 맞을까요?
나중에 최신 main 으로 rebase 한번 해야겠군요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 맞습니다.
말씀하신대로 똑같은 fix가 적용되어 있던데, main rebase작업 자체도 큰 일 같아 일단 해당 부분만 처리해두었습니다