# Using model() instead of model.generate()

**URL:** <https://discuss.huggingface.co/t/using-model-instead-of-model-generate/116329>\
**Category:** 🤗Transformers\
**Created:** [November 8, 2024, 5:15am UTC](https://discuss.huggingface.co/t/using-model-instead-of-model-generate/116329 "2024-11-08T05:15:30Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Vidushee](https://avatars.discourse-cdn.com/v4/letter/v/ecccb3/32.png) [@Vidushee](https://discuss.huggingface.co/u/Vidushee)\
**Post date:** [November 8, 2024, 6:03am UTC](https://discuss.huggingface.co/t/using-model-instead-of-model-generate/116329/3 "2024-11-08T06:03:50Z")

</div>

Can you explain a bit more about your answer ? isn’t it just calling the forward pass ?  
And how about this ?

> [@Generate without using the generate method](https://discuss.huggingface.co/t/generate-without-using-the-generate-method/11379):
>
> Posting this here for visibility. What if you want to decode the output of a generative seq2seq model (like T5, BART, etc.) yourself, without using the .generate() method? The code example below illustrates this. Suppose that the model is given a long text, for which it needs to generate a summary. We illustrate here how to manually decode the generated ids autoregressively. In each iteration, we add the predicted token id by the model to the decoder\_input\_ids, which are then fed as input to th…

---

_[View the full topic](https://discuss.huggingface.co/t/using-model-instead-of-model-generate/116329)._
