# Context window decreased after finetuning?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcontext-window-decreased-after-finetuning%2F61029%3E%5C
**Category:** 🤗Transformers\
**Created:** [November 4, 2023, 11:37am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcontext-window-decreased-after-finetuning%2F61029 "2023-11-04T11:37:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![piotr-ai](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@piotr-ai](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fpiotr-ai)%5C
**Post date:** [November 4, 2023, 11:37am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcontext-window-decreased-after-finetuning%2F61029%2F1 "2023-11-04T11:37:27Z")

</div>

Hello,  
I did fine tune a model with 4k window using tokenizer with max\_length=512 because of memory usage.  
Now the fine tuned model doesn’t generate anything after 512. Is that expected?
