Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to Include Named Entity Recognition and Relation Extraction Model Finetuning Examples and Guidance Request #2119

Open
HarikrishnanK9 opened this issue Oct 1, 2024 · 6 comments

Comments

@HarikrishnanK9
Copy link

HarikrishnanK9 commented Oct 1, 2024

Feature request

As an NLP enthusiast working on Named Entity Recognition (NER) and Relation Extraction (RE) tasks, I would like to request the inclusion of NER and RE-related examples, best practices, and guidance for fine-tuning models specifically for these tasks on your GitHub page.
The documentation on fine-tuning models for NER and RE would help guide researchers in developing state-of-the-art models without having to reinvent the wheel.Currently Finetuning examples for NER and RE tasks are not available there.These techniques have relevance in identifying technical terms,chemical names,etc from texts and recognize the relationship between identified domain specified technical terms.

Motivation

ner models are critical in various technologies to identify particular domain related words from an input text,Especially if we are dealing with business terms,chemical names,particle names,and other domain specific technical terms.2nd importance is identify the relation between identified entities.Eg: sentence:Apple acquired Beats for $3 billion in 2014;Entities:Apple, Beats, $3 billion,2014;Relation:acquired

Pre-requisite

First there must be an appropriate dataset for finetuning, including 1)sentences,2)entities corresponding to that sentence in next column and 3)finally relation between identified entities.Dataset must include diverse domain specific datas like finance,medical,chemical,news,politics,etc then only a general kind of model can identify entities generally.If the purpose is domain specific then particulr domain specific dataset is a must.

@BenjaminBossan
Copy link
Member

I agree that having such examples could be useful for many users. If you have an existing example that uses full fine-tuning that we can take as a starting point, that would be very helpful. I also added a call for contribution tag so that hopefully someone from the community with expertise on this topic can step in.

@JINO-ROHIT
Copy link
Contributor

Hi guys, Im happy to take this up, but do we have any example guidelines? Like should we open a seperate folder and should it be a jupyter notebook or py scripts?

@BenjaminBossan
Copy link
Member

Thanks a lot for offering to work on this @JINO-ROHIT.

There is no specific template we expect from examples. If you check the examples directory, you'll see it's a bit chaotic. I would suggest to add either a script or notebook (whatever you like most) to the examples/token_classification directory (as NER would be considered "token classification").

As a dataset, I know that conll is used for NER but maybe there is a better dataset by now or @HarikrishnanK9 has something else in mind.

As to the PEFT method, probably LoRA would be a good start.

@JINO-ROHIT
Copy link
Contributor

gotcha, im on it

@HarikrishnanK9
Copy link
Author

@JINO-ROHIT @BenjaminBossan Apologies for the delayed response. Over the past few days, I’ve been exploring NER and Relation Extraction (RE), fine-tuning, along with codes and datasets on platforms like Kaggle and various GitHub repositories.Unfortunately, I wasn’t able to complete it as planned ,Anyway I’m happy to hear that @JINO-ROHIT is also ready to take over the task. If I succeed with any of the codes, I will share it with you immediately.

@JINO-ROHIT
Copy link
Contributor

Hey @HarikrishnanK9 have a look at the PR and let us know if this is something along the lines you were looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants