# How to get sentence embedding using a fine-tuned model

**URL:** <https://discuss.huggingface.co/t/how-to-get-sentence-embedding-using-a-fine-tuned-model/36931>\
**Category:** Intermediate\
**Created:** [April 18, 2023, 6:28am UTC](https://discuss.huggingface.co/t/how-to-get-sentence-embedding-using-a-fine-tuned-model/36931 "2023-04-18T06:28:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gl-nlp-2](https://avatars.discourse-cdn.com/v4/letter/g/3ab097/32.png) [@gl-nlp-2](https://discuss.huggingface.co/u/gl-nlp-2)\
**Post date:** [April 18, 2023, 6:28am UTC](https://discuss.huggingface.co/t/how-to-get-sentence-embedding-using-a-fine-tuned-model/36931/1 "2023-04-18T06:28:34Z")

</div>

I have fine-tuned a bert model using this script – [transformers/run\_glue.py at main · huggingface/transformers · GitHub](https://github.com/huggingface/transformers/blob/main/examples/pytorch/text-classification/run_glue.py)

I was wondering how I can use the fine-tuned model to get sentence embedding.

Please suggest.
