Instructions to use latincy/latin-bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use latincy/latin-bert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="latincy/latin-bert")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("latincy/latin-bert") model = AutoModel.from_pretrained("latincy/latin-bert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Breaking change in tokenizers 0.23
#4
by aimgo - opened
In tokenizers==0.23 BERTProcessing signature changes, causing the tokenizer to fail
tokenizer.post_processor = processors.BertProcessing(
~~~~~~~~~~~~~~~~~~~~~~~~~^
sep=("[SEP]", vocab["[SEP]"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cls=("[CLS]", vocab["[CLS]"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
TypeError: BertProcessing.__new__() got an unexpected keyword argument 'cls'
I believe this can be remedied by changing the call in tokenization_latin_bert_fast.py to:
tokenizer.post_processor = processors.BertProcessing(
("[SEP]", vocab["[SEP]"]),
("[CLS]", vocab["[CLS]"]),
)