# QNLI on custom dataset using RoBERTa/BERT

**URL:** <https://discuss.huggingface.co/t/qnli-on-custom-dataset-using-roberta-bert/6271>\
**Category:** Intermediate\
**Created:** [May 20, 2021, 1:37pm UTC](https://discuss.huggingface.co/t/qnli-on-custom-dataset-using-roberta-bert/6271 "2021-05-20T13:37:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oqq09](https://avatars.discourse-cdn.com/v4/letter/o/f08c70/32.png) [@oqq09](https://discuss.huggingface.co/u/oqq09)\
**Post date:** [May 20, 2021, 1:37pm UTC](https://discuss.huggingface.co/t/qnli-on-custom-dataset-using-roberta-bert/6271/1 "2021-05-20T13:37:37Z")

</div>

Is there any conceptual/practical mistake I am committing in using “roberta-base” or “bert-base-uncased” pre-trained model as a Sequence Classifier for QNLI task on a custom dataset?  
Say I have a dataset of questions and answers (related to general business) where human annotators determine if a sentence has the answer to a question (labels 0 and 1). I instantiate one of the aforementioned pre-trained models with SequenceClassification head and fine-tune it with the data just like the GLUE tasks colab example given in the transformers documentation. Tokenize questions and answers, encode them with [CLS] and [SEP] tokens and then fine-tune the model and use it to make predictions.
