This repository was archived by the owner on Apr 8, 2025. It is now read-only.
Vectorize Question Answering Prediction Head#603
Merged
Conversation
Contributor
Author
|
Master (passages per second) This branch (passages per second) |
Contributor
Author
|
Current squad dev performance with deepset/roberta-base-squad2 (evaluated with official script) cf. numbers reported in model card The performance is somewhat worse than it should be but could be related to #552 and #602 |
Contributor
Author
|
Ran test/benchmark/question_answering_benchmarks.py. There is no signficant difference in performance or speed between this branch and master |
Timoeller
approved these changes
Oct 29, 2020
Contributor
Timoeller
left a comment
There was a problem hiding this comment.
Beautiful vectorization. Ready to merge from my side.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a more efficient way of disqualifying invalid start-end spans. Invalid spans are now assigned very low logit scores early on in the modelling pipeline. This is done through vector operations. This will be an improvement over the older method whereby all candidate spans are sorted by their scores and only later ruled out if they are invalid (e.g. end comes before start, either start or end points to padding).
This should also fix #572 where modelling times could vary wildly depending on whether the question is relevant or irrelevant.