Buckets:

rtrm's picture
download
raw
7.32 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Metrics&quot;,&quot;local&quot;:&quot;metrics&quot;,&quot;sections&quot;:[],&quot;depth&quot;:1}">
<link href="/docs/text-generation-inference/main/en/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload">
<link rel="modulepreload" href="/docs/text-generation-inference/main/en/_app/immutable/entry/start.1810066f.js">
<link rel="modulepreload" href="/docs/text-generation-inference/main/en/_app/immutable/chunks/scheduler.362310b7.js">
<link rel="modulepreload" href="/docs/text-generation-inference/main/en/_app/immutable/chunks/singletons.fa2b0eb7.js">
<link rel="modulepreload" href="/docs/text-generation-inference/main/en/_app/immutable/chunks/index.7f53ec41.js">
<link rel="modulepreload" href="/docs/text-generation-inference/main/en/_app/immutable/chunks/paths.284aef40.js">
<link rel="modulepreload" href="/docs/text-generation-inference/main/en/_app/immutable/entry/app.8cfc1931.js">
<link rel="modulepreload" href="/docs/text-generation-inference/main/en/_app/immutable/chunks/index.57dfc70d.js">
<link rel="modulepreload" href="/docs/text-generation-inference/main/en/_app/immutable/nodes/0.543c9bd9.js">
<link rel="modulepreload" href="/docs/text-generation-inference/main/en/_app/immutable/chunks/each.e59479a4.js">
<link rel="modulepreload" href="/docs/text-generation-inference/main/en/_app/immutable/nodes/33.2ae93f33.js">
<link rel="modulepreload" href="/docs/text-generation-inference/main/en/_app/immutable/chunks/EditOnGithub.9633c464.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Metrics&quot;,&quot;local&quot;:&quot;metrics&quot;,&quot;sections&quot;:[],&quot;depth&quot;:1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <h1 class="relative group"><a id="metrics" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#metrics"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Metrics</span></h1> <p data-svelte-h="svelte-ny8d9s">TGI exposes multiple metrics that can be collected via the <code>/metrics</code> Prometheus endpoint.
These metrics can be used to monitor the performance of TGI, autoscale deployment and to help identify bottlenecks.</p> <p data-svelte-h="svelte-gv6qxl">The following metrics are exposed:</p> <table data-svelte-h="svelte-4239tp"><thead><tr><th>Metric Name</th> <th>Description</th> <th>Type</th> <th>Unit</th></tr></thead> <tbody><tr><td><code>tgi_batch_current_max_tokens</code></td> <td>Maximum tokens for the current batch</td> <td>Gauge</td> <td>Count</td></tr> <tr><td><code>tgi_batch_current_size</code></td> <td>Current batch size</td> <td>Gauge</td> <td>Count</td></tr> <tr><td><code>tgi_batch_decode_duration</code></td> <td>Time spent decoding a batch per method (prefill or decode)</td> <td>Histogram</td> <td>Seconds</td></tr> <tr><td><code>tgi_batch_filter_duration</code></td> <td>Time spent filtering batches and sending generated tokens per method (prefill or decode)</td> <td>Histogram</td> <td>Seconds</td></tr> <tr><td><code>tgi_batch_forward_duration</code></td> <td>Batch forward duration per method (prefill or decode)</td> <td>Histogram</td> <td>Seconds</td></tr> <tr><td><code>tgi_batch_inference_count</code></td> <td>Inference calls per method (prefill or decode)</td> <td>Counter</td> <td>Count</td></tr> <tr><td><code>tgi_batch_inference_duration</code></td> <td>Batch inference duration</td> <td>Histogram</td> <td>Seconds</td></tr> <tr><td><code>tgi_batch_inference_success</code></td> <td>Number of successful inference calls per method (prefill or decode)</td> <td>Counter</td> <td>Count</td></tr> <tr><td><code>tgi_batch_next_size</code></td> <td>Batch size of the next batch</td> <td>Histogram</td> <td>Count</td></tr> <tr><td><code>tgi_queue_size</code></td> <td>Current queue size</td> <td>Gauge</td> <td>Count</td></tr> <tr><td><code>tgi_request_count</code></td> <td>Total number of requests</td> <td>Counter</td> <td>Count</td></tr> <tr><td><code>tgi_request_duration</code></td> <td>Total time spent processing the request (e2e latency)</td> <td>Histogram</td> <td>Seconds</td></tr> <tr><td><code>tgi_request_generated_tokens</code></td> <td>Generated tokens per request</td> <td>Histogram</td> <td>Count</td></tr> <tr><td><code>tgi_request_inference_duration</code></td> <td>Request inference duration</td> <td>Histogram</td> <td>Seconds</td></tr> <tr><td><code>tgi_request_input_length</code></td> <td>Input token length per request</td> <td>Histogram</td> <td>Count</td></tr> <tr><td><code>tgi_request_max_new_tokens</code></td> <td>Maximum new tokens per request</td> <td>Histogram</td> <td>Count</td></tr> <tr><td><code>tgi_request_mean_time_per_token_duration</code></td> <td>Mean time per token per request (inter-token latency)</td> <td>Histogram</td> <td>Seconds</td></tr> <tr><td><code>tgi_request_queue_duration</code></td> <td>Time spent in the queue per request</td> <td>Histogram</td> <td>Seconds</td></tr> <tr><td><code>tgi_request_skipped_tokens</code></td> <td>Speculated tokens per request</td> <td>Histogram</td> <td>Count</td></tr> <tr><td><code>tgi_request_success</code></td> <td>Number of successful requests</td> <td>Counter</td> <td></td></tr> <tr><td><code>tgi_request_validation_duration</code></td> <td>Time spent validating the request</td> <td>Histogram</td> <td>Seconds</td></tr></tbody></table> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/text-generation-inference/blob/main/docs/source/reference/metrics.md" target="_blank"><span data-svelte-h="svelte-1kd6by1">&lt;</span> <span data-svelte-h="svelte-x0xyl0">&gt;</span> <span data-svelte-h="svelte-1dajgef"><span class="underline ml-1.5">Update</span> on GitHub</span></a> <p></p>
<script>
{
__sveltekit_1dfb6m4 = {
assets: "/docs/text-generation-inference/main/en",
base: "/docs/text-generation-inference/main/en",
env: {}
};
const element = document.currentScript.parentElement;
const data = [null,null];
Promise.all([
import("/docs/text-generation-inference/main/en/_app/immutable/entry/start.1810066f.js"),
import("/docs/text-generation-inference/main/en/_app/immutable/entry/app.8cfc1931.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 33],
data,
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
7.32 kB
·
Xet hash:
500661f11f269d627bc9113dd11c142eb04d1294ff6478e93d75d9e16379364e

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.