Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX Change check if past_key_values is empty
After transformers merged this PR: huggingface/transformers#33703 The bool of past_key_values (a Cache instance) would change from False to True in one of our checks. Use get_seq_length() method instead, which is consistent before and after that commit. I checked the tests with the new change for both transformers before and after that commit and they passed, so this change should be backwards compatible.
- Loading branch information