Small modifications to enhance the baseline performance like dev EM = 75%#2
Small modifications to enhance the baseline performance like dev EM = 75%#2akeyhero wants to merge 5 commits intoSkelterLabsInc:mainfrom
Conversation
Small modifications to enhance the baseline performance like dev EM = 75%
| " val += [padding] * pad_len\n", | ||
| " return val\n", | ||
| "\n", | ||
| " for i in range(0, input_len - max_seq_len + stride, stride):\n", |
There was a problem hiding this comment.
This range will be empty when input_len <= max_seq_len - stride
| " step = max_seq_len - question_len - stride\n", | ||
| " for i in range(0, max(context_len - stride, step), step):\n", |
There was a problem hiding this comment.
A stride is a sequence length of overlapping tokens in the Hugging Face manner. (if I am correct)
There was a problem hiding this comment.
There was a problem hiding this comment.
Thank you for your comment. That's so confusing 😭
| " answer_start_index = ctx_start\n", | ||
| " answer_end_index = len(offsets) - 1\n", | ||
| " while offsets[answer_start_index][0] < start_char:\n", | ||
| " while offsets[answer_start_index][1] < start_char:\n", |
There was a problem hiding this comment.
One may not like this change, but I prefer inclusive answer chunks.
e.g. where 分間 is a single token:
Original answer: 九十分
Previous answer chunk: 九十
Proposed answer chunk: 九十分間
There was a problem hiding this comment.
When I tested both options, I found that the inclusive answer chunks performed better.
Thank you.
| " while offsets[answer_end_index][1] > start_char + len(answer):\n", | ||
| " answer_end_index -= 1\n", |
There was a problem hiding this comment.
We will get a smaller index number by 1 when the following token length is >= 2.
|
Also, this typing of def get_answers(model: AutoModelForQuestionAnswering, |
|
Another finding is that we can get better performance instantly with Plus, with |
|
Thank you for the PR.
|
|
@akeyhero If you don't mind, can I commit the changes I want to this PR? |
|
@w4-ByunghoonSo Thank you. I've invited you to my forked repo to commit some changes. (Ignore it if you don't need the access to my repo) |
Thank you for sharing the great Japanese QA dataset!
I would like to share my changes, which improve the baseline performance by 10%+ (EM).
Inference log:
Performance by types: