allenai / allenai/scibert

max_len returns unexpected value

オープン
#93 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
1.7k
フォーク
232
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi,

I noticed something weird about the `max_len` attribute of the `tokenizer`

```python
from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("allenai/scibert_scivocab_uncased")
print(tokenizer.max_len) # => 1000000000000000019884624838656
```

Whereas I expected it to be 512, as in

```python
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
print(tokenizer.max_len) # => 512
```

is this a bug? Or is `max_len` not the appropriate attribute to use if I want to know the max length for the inputs of the model?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。