Downloads · 30 days
8
19% of all-time downloads
ctu-aic/flan-t5-large
flan-t5-large is a feature extraction model from ctu-aic. Use it when you need embeddings to search or compare text. It is set up for transformers.
This model's tokenizer is extended with CS, SK and PL accents using the following code:
Downloads · 30 days
8
19% of all-time downloads
All-time downloads
43
Public
Repo size
6 GB
Likes
0
Public
Click a slice to open those files.
.bin3 GB · 100%
From the Hugging Face model README
This model's tokenizer is extended with CS, SK and PL accents using the following code:
from transformers import (
AutoModel,
AutoTokenizer,
)
model_id = "google/flan-t5-large"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModel.from_pretrained(model_id)
accents = "áčďéěíňóřšťúůýž" # CS
accents += "ąćęłńóśźż" # PL
accents += "áäčďéíĺľňóôŕšťúýž" # SK
accents += accents.upper()
accents = set(c for c in accents)
new_tokens = accents - set(tokenizer.vocab.keys())
tokenizer.add_tokens(list(new_tokens))
model.resize_token_embeddings(len(tokenizer))