"tests/test_tokenization_fast.py" did not exist on "ba8c4d0ac04acfcdbdeaed954f698d6d5ec3e532"
Optimize Token Classification models for TPU (#13096)
* Optimize Token Classification models for TPU As per the XLA document XLA cannot handle masked indexing well. So token classification models for BERT and others use an implementation based on `torch.where`. This implementation works well on TPU. ALBERT token classification model uses the masked indexing which causes performance issues on TPU. This PR fixes this issue by following the BERT implementation. * Same fix for ELECTRA * Same fix for LayoutLM
Showing
Please register or sign in to comment