-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: Add metrics documentation and add a 'Reference' section (#2230)
* doc: Add metrics documentation and add a 'Reference' section * doc: Add API reference * doc: Refactor API reference * fix: Message API link * Bad rebase * Moving the docs. --------- Co-authored-by: Nicolas Patry <[email protected]>
- Loading branch information
Showing
8 changed files
with
179 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 23 additions & 10 deletions
33
docs/source/messages_api.md → docs/source/reference/api_reference.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Metrics | ||
|
||
TGI exposes multiple metrics that can be collected via the `/metrics` Prometheus endpoint. | ||
These metrics can be used to monitor the performance of TGI, autoscale deployment and to help identify bottlenecks. | ||
|
||
The following metrics are exposed: | ||
|
||
| Metric Name | Description | Type | Unit | | ||
|--------------------------------------------|------------------------------------------------------------------------------------------|-----------|---------| | ||
| `tgi_batch_current_max_tokens` | Maximum tokens for the current batch | Gauge | Count | | ||
| `tgi_batch_current_size` | Current batch size | Gauge | Count | | ||
| `tgi_batch_decode_duration` | Time spent decoding a batch per method (prefill or decode) | Histogram | Seconds | | ||
| `tgi_batch_filter_duration` | Time spent filtering batches and sending generated tokens per method (prefill or decode) | Histogram | Seconds | | ||
| `tgi_batch_forward_duration` | Batch forward duration per method (prefill or decode) | Histogram | Seconds | | ||
| `tgi_batch_inference_count` | Inference calls per method (prefill or decode) | Counter | Count | | ||
| `tgi_batch_inference_duration` | Batch inference duration | Histogram | Seconds | | ||
| `tgi_batch_inference_success` | Number of successful inference calls per method (prefill or decode) | Counter | Count | | ||
| `tgi_batch_next_size` | Batch size of the next batch | Histogram | Count | | ||
| `tgi_queue_size` | Current queue size | Gauge | Count | | ||
| `tgi_request_count` | Total number of requests | Counter | Count | | ||
| `tgi_request_duration` | Total time spent processing the request (e2e latency) | Histogram | Seconds | | ||
| `tgi_request_generated_tokens` | Generated tokens per request | Histogram | Count | | ||
| `tgi_request_inference_duration` | Request inference duration | Histogram | Seconds | | ||
| `tgi_request_input_length` | Input token length per request | Histogram | Count | | ||
| `tgi_request_max_new_tokens` | Maximum new tokens per request | Histogram | Count | | ||
| `tgi_request_mean_time_per_token_duration` | Mean time per token per request (inter-token latency) | Histogram | Seconds | | ||
| `tgi_request_queue_duration` | Time spent in the queue per request | Histogram | Seconds | | ||
| `tgi_request_skipped_tokens` | Speculated tokens per request | Histogram | Count | | ||
| `tgi_request_success` | Number of successful requests | Counter | | | ||
| `tgi_request_validation_duration` | Time spent validating the request | Histogram | Seconds | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters