# Fine-tuning transformers for relation classification

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-transformers-for-relation-classification%2F2399%3E%5C
**Category:** Beginners\
**Created:** [December 1, 2020, 9:54pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-transformers-for-relation-classification%2F2399 "2020-12-01T21:54:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kstathou](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/kstathou/32/722_2.png) [@kstathou](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkstathou)%5C
**Post date:** [December 1, 2020, 9:54pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-transformers-for-relation-classification%2F2399%2F1 "2020-12-01T21:54:32Z")

</div>

Hi all,

I am working on a relation classification task and I already have a training set with highlighted entities. After doing some research, it seems that ERNIE and [ERNIE 2.0](https://arxiv.org/abs/1907.12412) would be good candidates for fine-tuning. They are also kindly provided in the model hub by [nghuyong](https://huggingface.co/nghuyong/ernie-2.0-en)!

Would you suggest any other models for a relation classification task? Any other tips are welcome too 🙂

I’m adding below an example of how the text data look like:

```auto
'[HT]John Doe[HT] was an important contributor to our [TL]software project[TL].'

```

And the classes are `Positive, Negative, Unknown`.

Thank you!
