udify icon indicating copy to clipboard operation
udify copied to clipboard

Using other transformer models

Open VasilisTz1 opened this issue 4 years ago • 2 comments

Hello,

I am trying to use the XLMRoberta model instead of BERT and I made the following changes to the bert_pretrained.py:

from transformers import XLMRobertaTokenizer
from transformers import XLMRobertaModel, XLMRobertaConfig

However, I get the following error:

super().__init__(vocab=bert_tokenizer.vocab, AttributeError: 'XLMRobertaTokenizer' object has no attribute 'vocab'

Any guidance would be much appreciated!

VasilisTz1 avatar Jan 11 '22 11:01 VasilisTz1

Hey @VasilisTz1 ,

Were you able to resolve this issue ?

ayushbits avatar May 04 '22 07:05 ayushbits

Hello @ayushbits,

No, there are a couple of changes that should be done I guess.

VasilisTz1 avatar May 04 '22 07:05 VasilisTz1