Downloads · 30 days
139
3% of all-time downloads
uzabase/luke-japanese-wordpiece-base
luke-japanese-wordpiece-base is a fill-mask model from uzabase. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as apache-2.0.
studio-ousia/luke-japanese-baseに対して次の変更を加えたモデルです。
Downloads · 30 days
139
3% of all-time downloads
All-time downloads
5.5K
Public
Parameters
286M
2.3 GB on disk
Likes
4
Public
Click a slice to open those files.
.bin1.1 GB · 50%
From the Hugging Face model README
studio-ousia/luke-japanese-baseに対して次の変更を加えたモデルです。
[UNK] (unknown) エンティティを扱えるようにしました詳細はブログ記事をご参照ください。
from transformers import AutoTokenizer, AutoModel
# 本モデル用のトークナイザのコードを使用するため、trust_remote_code=True の指定が必要です
tokenizer = AutoTokenizer.from_pretrained("uzabase/luke-japanese-wordpiece-base", trust_remote_code=True)
model = AutoModel.from_pretrained("uzabase/luke-japanese-wordpiece-base")
position_ids を含めるように変更しました。
position_ids が使われていましたが、これは RoBERTa 仕様のものであり、BERT を使った本モデルでは正しい値となっていませんでした。そこで、 BERT 向けの正しい position_ids の値がモデルに入力されるように、position_ids を明示的にトークナイザの出力に含めるようにしました。entity_vocab の各トークン("[PAD]" 等の特殊トークンを除く)の先頭に付いていた "None:" の文字列を除去しました。
"None:聖徳太子" となっていたトークンは "聖徳太子" に修正されています。