OpenPrompt icon indicating copy to clipboard operation
OpenPrompt copied to clipboard

How to use AutoModel and AutoTokenizer with OpenPrompt?

Open HodaMemar opened this issue 2 years ago • 2 comments

Dear All Thank you for this amazing library. Many clinical models in Huggingface like PubMedBert or ClinicalBert use different tokenizers and models that are accessible via AutoModel and AutoTokenizer. For example, I work with PubMedbert as below:

  • pubmed_bert_model = AutoModel.from_pretrained('microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext')
    
  • pubmed_bert_tokenizer = AutoTokenizer.from_pretrained('microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext')
    

Is there some way to use them in load_plm function? I read the #124 issue but I don't understand it well. Thank you!

HodaMemar avatar Jan 15 '23 11:01 HodaMemar

Hi did you find a way to use them?

doussa2504 avatar Apr 12 '23 20:04 doussa2504

Hi did you find a way to use them?

Hi. Please refer to issue #199. Of course, I asked another question that was sent in that issue. Please inform me if you find a way

HodaMemar avatar Apr 14 '23 06:04 HodaMemar