model = RobertaModel.from_pretrained("allegro/herbert-klej-cased-v1")
encoded_input = tokenizer.encode("Kto ma lepszą sztukę, ma lepszy rząd – to jasne.", return_tensors="pt")
outputs = model(encoded_input)
HerBERT can also be loaded using AutoTokenizer and AutoModel:
import torch
from transformers import AutoModel, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("allegro/herbert-klej-cased-tokenizer-v1")
model = AutoModel.from_pretrained("allegro/herbert-klej-cased-v1")
```
This model was contributed by rmroczkowski. The original code can be found
here.
HerbertTokenizer
[[autodoc]] HerbertTokenizer
HerbertTokenizerFast
[[autodoc]] HerbertTokenizerFast
