allenai / allenai/scibert

max_len returns unexpected value

Abierto
#93 0 comentarios 2 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
1.7k
Forks
232
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.