# Best solution to train multiclass model

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbest-solution-to-train-multiclass-model%2F16246%3E%5C
**Category:** Beginners\
**Created:** [March 30, 2022, 9:14am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbest-solution-to-train-multiclass-model%2F16246 "2022-03-30T09:14:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GenV](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/genv/32/12132_2.png) [@GenV](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FGenV)%5C
**Post date:** [March 30, 2022, 9:14am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbest-solution-to-train-multiclass-model%2F16246%2F1 "2022-03-30T09:14:37Z")

</div>

Hello,  
I would like to train an NLP model that outputs a pair of labels (label1, label2), where label1 belongs to a set of possible labels, and label2 belongs to another set of possible labels, different from the first. I was currently thinking of using BERT for multiclassing, seeing the labels as 0/1, creating a single vector.

So, if label1 belongs to a set of 5 labels, and label2 belongs to a set of 4 labels, I would create a single label of 9 values → ` [0, 0, 0, 0, 1, 0, 0, 1, 0]` as an example.

It’s correct? Can I do it in better ways?  
Thank you.
