# TextGeneration Inference Model

**URL:** <https://discuss.huggingface.co/t/textgeneration-inference-model/55927>\
**Category:** Inference Endpoints on the Hub\
**Created:** [September 21, 2023, 9:50pm UTC](https://discuss.huggingface.co/t/textgeneration-inference-model/55927 "2023-09-21T21:50:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmkhan](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@Ahmkhan](https://discuss.huggingface.co/u/Ahmkhan)\
**Post date:** [September 21, 2023, 9:50pm UTC](https://discuss.huggingface.co/t/textgeneration-inference-model/55927/1 "2023-09-21T21:50:46Z")

</div>

Hi,

Is there a way to calculate time taken to first token generating using TGI Model? Does TGI gives this metric by default in the generated response output or some other way to capture this time?

---

<div class="post-metadata">

**Author:** ![Narsil](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/narsil/32/40029_2.png) [@Narsil](https://discuss.huggingface.co/u/Narsil)\
**Post date:** [September 22, 2023, 8:11am UTC](https://discuss.huggingface.co/t/textgeneration-inference-model/55927/2 "2023-09-22T08:11:33Z")

</div>

This is the prefill time that you can see either in the prom metrics or `text-generation-benchmark`. Cheers.

---

<div class="post-metadata">

**Author:** ![Ahmkhan](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@Ahmkhan](https://discuss.huggingface.co/u/Ahmkhan)\
**Post date:** [September 22, 2023, 4:03pm UTC](https://discuss.huggingface.co/t/textgeneration-inference-model/55927/3 "2023-09-22T16:03:21Z")

</div>

> [@Narsil](#):
>
> text-generation-benchmark

What is text-generation-benchmark ? Is it separate repo?
