
HuggingfaceからDeBERTaを使おうとしたら表題のエラー。
ValueError:Tokenizer class DebertaV2Tokenizer does not exist or is not currently imported.
モデルはこれ。

microsoft/deberta-base · Hugging Face
We’re on a journey to advance and democratize artificial intelligence through open source and open science.
huggingfaceではなく、本家のgithubを見てみる。
GitHub - microsoft/DeBERTa: The implementation of DeBERTa
The implementation of DeBERTa. Contribute to microsoft/DeBERTa development by creating an account on GitHub.
requirements.txt から足りないパッケージを発見した。
自分の環境では sentencepiece が足りなかった。
pip install sentencepiece
これで Tensorflow で DeBERTa が使えるようになった。
コメント