senek
senek

Reputation: 61

BERT model conversion from DeepPavlov to HuggingFace format

I have a folder with the ruBERT model, which was fine-tuned with the application of the Deeppavlov library.

The folder contains the following model files:

enter image description here

How do I convert it to Huggingface format so that I can load it this way?

from transformers import TFAutoModelForSequenceClassification

model_name = "folder_with_ruBERT"
auto_model_rubert = TFAutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name, do_lower_case = False)

Upvotes: 1

Views: 98

Answers (1)

com
com

Reputation: 2704

There is no need to convert the tf checkpoints into huggingface format. The DeepPavlov's pretrained language models are already available as huggingface models.

https://huggingface.co/DeepPavlov

Upvotes: 2

Related Questions