Finetuning

#1
by HassanStar - opened

can you please explain more how to finetune it on new classification task and the code to use?

It is likely that the model already works with your task without additional fine-tuning, as it supports zero-shot classification. You can try the sample code provided on the model card.

Hi @HassanStar , you have two options for fine-tuning: (1) you do standard fine-tuning as with any BERT model. This would delete the universal NLI task head and create a new classification head for your task. (2) you can continuously fine-tune the model including the universal NLI head (this is recommended if you have roughly <= 1000 datapoints. If you have more data than 2000, normal fine-tuning is probably better). You can find example code for this in notebook nr. 4 here: https://github.com/MoritzLaurer/summer-school-transformers-2023

and as @akhtet said, you can also use it without fine-tuning with the example code from the model card.

Sign up or log in to comment