allenai / allenai/scibert

max_len returns unexpected value

Aberta
#93 0 comentários 2 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
1.7k
Forks
232
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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?

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.