EmilyAlsentzer / clinicalBERT

repository for Publicly Available Clinical BERT Embeddings
MIT License
673 stars 135 forks source link

How to run model and finetune it #42

Open nageshpindi opened 1 year ago

nageshpindi commented 1 year ago

Hi Guys, I need to know how to load the clinicalBERT model and run it. clinicalBERT exactly matches with my requirement and i was in searching online but i could't find any useful resources. Can you please help me on this model, Thanks in advanced.

Shivani-analyttica commented 2 months ago

Hi Guys, I need to know how to load the clinicalBERT model and run it. clinicalBERT exactly matches with my requirement and i was in searching online but i could't find any useful resources. Can you please help me on this model, Thanks in advanced.

You can use it through Transformers library, just make sure your system has python version that is compatible with pytorch and then you are good to go.

Load the model via the transformers library: -- (ref - hugging face) from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("emilyalsentzer/Bio_ClinicalBERT") model = AutoModel.from_pretrained("emilyalsentzer/Bio_ClinicalBERT")