"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "94306352f489c7c2a8dc18af89e2efe0a76a5159"
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