tomaarsen HF Staff commited on
Commit
7977962
·
verified ·
1 Parent(s): 6f75de8

Add missing "model_type": "bert" to allow loading with Transformers v5.2

Browse files

Hello!

## Details
From Transformers v5.2 onwards, it won't be possible to load this model without a `model_type`.

You can try this with
```python
from transformers import AutoModel

model = AutoModel.from_pretrained("prajjwal1/bert-tiny", revision="refs/pr/16")
print(type(model))
```

- Tom Aarsen

Files changed (1) hide show
  1. config.json +1 -1
config.json CHANGED
@@ -1 +1 @@
1
- {"hidden_size": 128, "hidden_act": "gelu", "initializer_range": 0.02, "vocab_size": 30522, "hidden_dropout_prob": 0.1, "num_attention_heads": 2, "type_vocab_size": 2, "max_position_embeddings": 512, "num_hidden_layers": 2, "intermediate_size": 512, "attention_probs_dropout_prob": 0.1}
 
1
+ {"model_type": "bert", "hidden_size": 128, "hidden_act": "gelu", "initializer_range": 0.02, "vocab_size": 30522, "hidden_dropout_prob": 0.1, "num_attention_heads": 2, "type_vocab_size": 2, "max_position_embeddings": 512, "num_hidden_layers": 2, "intermediate_size": 512, "attention_probs_dropout_prob": 0.1}