uf-hobi-informatics-lab / GatorTron

all scripts used in gatortron project
MIT License
100 stars 18 forks source link

How to use pretrained network for NER? #10

Open myigitavci opened 7 months ago

myigitavci commented 7 months ago

Thanks for sharing your work. How can I use the pretrained network for a downstream task such as NER? I am a beginner to LLMs and NVIDIA LLM frameworks. Would appreciate any help. Thanks!

mars203030 commented 7 months ago

Me too.. I appreciate your help

bugface commented 7 months ago

@myigitavci

You do not need to use Nvidia LLM framework.

We have a huggingface version gatortron model at https://huggingface.co/UFNLP/gatortron-base.

you can follow this HF tutorial (https://huggingface.co/docs/transformers/tasks/token_classification) and just replace the model with the Gatortron model

or you can follow our NER package: https://github.com/uf-hobi-informatics-lab/ClinicalTransformerNER

For both, you have to learn how to process the data in the required format, you can use conll-2003 dataset as the starting point.

Hope this can help you.

cc: @mars203030