# Fine-tuning: Under the hood

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-under-the-hood%2F46407%3E%5C
**Category:** Intermediate\
**Created:** [July 11, 2023, 11:07am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-under-the-hood%2F46407 "2023-07-11T11:07:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rveen](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/rveen/32/15438_2.png) [@Rveen](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRveen)%5C
**Post date:** [July 11, 2023, 11:07am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-under-the-hood%2F46407%2F1 "2023-07-11T11:07:55Z")

</div>

Does anyone know what happens under the hood when we finetune a pretrained model (eg. BERT) via huggingface transformers?

I know there are multiple ways to fine-tune, such as freezing the first layers and training a fully connected layer at the end of the model.

Which approach is used by the Huggingface Transformers library? I am writing a paper and my experiments involve fine-tuning models from huggingface and I would like to know about the specifics of finetuning so I can write about it in my paper.

Thank you
