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

if crf needed when do ner? #444

Closed
alphanlp opened this issue Apr 3, 2019 · 5 comments
Closed

if crf needed when do ner? #444

alphanlp opened this issue Apr 3, 2019 · 5 comments
Labels
Discussion Discussion on a topic (keep it focused or open a new issue though) wontfix

Comments

@alphanlp
Copy link

alphanlp commented Apr 3, 2019

If crf needed when do ner? In BertForTokenClassification, just Linear is used to predict tag. If not, why?

@bheinzerling
Copy link

A CRF gives better NER F1 scores in some cases, but not necessarily in all cases. In the BERT paper, no CRF is used and hence also no CRF in this repository. I'd presume the BERT authors tested both with and without CRF and found that a CRF layer gives no improvement, since using a CRF is kind of the default setting nowadays.

@thomwolf
Copy link
Member

thomwolf commented Apr 3, 2019

Issue #64 is a good reference for discussion on NER.

@thomwolf thomwolf added BERT Discussion Discussion on a topic (keep it focused or open a new issue though) labels Apr 3, 2019
@stale
Copy link

stale bot commented Jun 2, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@shushanxingzhe
Copy link

This repository have showed how to add a CRF layer on transformers to get a better performance on token classification task.
https://github.com/shushanxingzhe/transformers_ner

@linhlt-it-ee
Copy link

github.com/shushanxingzhe/transformers_ner

your code does not work

birkskyum pushed a commit to birkskyum/transformers that referenced this issue Dec 15, 2023
* Add dinov2 models

* Add `BitImageProcessor`

* Update list of supported models
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Discussion on a topic (keep it focused or open a new issue though) wontfix
Projects
None yet
Development

No branches or pull requests

5 participants