huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
134.98k stars 27k forks source link

How can I fine-tune on custom model #5630

Closed pinedbean closed 4 years ago

pinedbean commented 4 years ago

❓ Questions & Help

Details

I would like to use TFBert as encoder then I will add additional layer on-top of it (with custom model class)

So, I would like to fine-tune all layer down to encoder layer

Specifically, I would like to do BERT-BiLSTM-CRF for NER task

Is there a way to do it?

Thank you for your answer

A link to original question on Stack Overflow:

aixuedegege commented 4 years ago

You can try this: https://github.com/huggingface/transformers/pull/3009/commits/489dd7608c5b3d4acaf997a2b4fbccc3d7144cf3

but there is no bilstm layer. You can add it by yourself

stale[bot] commented 4 years ago

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.