# What FineTuning can be done with a available models

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-finetuning-can-be-done-with-a-available-models%2F3795%3E%5C
**Category:** 🤗Transformers\
**Created:** [February 21, 2021, 2:45pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-finetuning-can-be-done-with-a-available-models%2F3795 "2021-02-21T14:45:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![theudster](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@theudster](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftheudster)%5C
**Post date:** [February 21, 2021, 2:45pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-finetuning-can-be-done-with-a-available-models%2F3795%2F1 "2021-02-21T14:45:49Z")

</div>

Hi, I am new to transformers and have a general question although I will ask it to my task at hand. I need to classify amino acid sequences and wanted to use the ProtBERT model to do so. This means I want to add a classification head at the end of the model.  
Having seen the tutorial , I have seen how to do this using DistilBertForSequenceClassification. I was wondering if such a module is available for all language models i.e is there ProtBertForSequenceClassification or is this available for only specific language models

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Post date:** [February 21, 2021, 3:05pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-finetuning-can-be-done-with-a-available-models%2F3795%2F2 "2021-02-21T15:05:35Z")

</div>

It seems the `ProtBERT` checkpoints use the bert architecture so you can use them with `BertForSequenceClassification`.

In general you can just try `AutoModelForSequenceClassification.from_pretrained(checkpoint_name)` and it will return an error if there is no sequence classification model in the library for the architecture you are using with `checkpoint_name`.

---

<div class="post-metadata">

**Author:** ![theudster](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@theudster](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftheudster)%5C
**Post date:** [February 21, 2021, 3:46pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-finetuning-can-be-done-with-a-available-models%2F3795%2F3 "2021-02-21T15:46:31Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![theudster](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@theudster](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftheudster)%5C
**Post date:** [February 23, 2021, 12:06pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-finetuning-can-be-done-with-a-available-models%2F3795%2F4 "2021-02-23T12:06:12Z")

</div>

Can this be used for MultiClass classification or only for 2?  
I am running into a this error:

[CUDA error: CUBLAS\_STATUS\_ALLOC\_FAILED when calling `cublasCreate(handle)`]

and have found that this may be an issue due to an inconsistency between number of labels and number of output units.

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Post date:** [February 23, 2021, 1:41pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-finetuning-can-be-done-with-a-available-models%2F3795%2F5 "2021-02-23T13:41:38Z")

</div>

The number of labels can be specified with `num_labels=xxx` in your call to `from_pretrained`.
