allenai / allenai/scibert

max_len returns unexpected value

未关闭
#93 0 条评论 2 个 reaction 已指派 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 摘要。