|
| 1 | +# Benchmarking Helm Chart |
| 2 | + |
| 3 | +This Helm chart deploys the `inference-perf` benchmarking tool. This guide will walk you through deploying a basic benchmarking job. By default, the `shareGPT` dataset is used for configuration. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +Before you begin, ensure you have the following: |
| 8 | + |
| 9 | +* **Helm 3+**: [Installation Guide](https://helm.sh/docs/intro/install/) |
| 10 | +* **Kubernetes Cluster**: Access to a Kubernetes cluster |
| 11 | +* **Gateway Deployed**: Your inference server/gateway must be deployed and accessible within the cluster. |
| 12 | + |
| 13 | + |
| 14 | +**Hugging Face Token Secret** |
| 15 | + |
| 16 | +The benchmark requires a Hugging Face token to pull tokenizers. Create a Kubernetes Secret named `hf-token` (or a custom name you provide) in your target namespace, containing your Hugging Face token. |
| 17 | + |
| 18 | + To create this secret: |
| 19 | + ```bash |
| 20 | + export _HF_TOKEN='<YOUR_HF_TOKEN>' |
| 21 | + kubectl create secret generic hf-token --from-literal=token=$_HF_TOKEN |
| 22 | + ``` |
| 23 | + |
| 24 | +## Deployment |
| 25 | + |
| 26 | +To deploy the benchmarking chart: |
| 27 | + |
| 28 | +```bash |
| 29 | +export IP='<YOUR_IP>' |
| 30 | +export PORT='<YOUR_PORT>' |
| 31 | +helm install benchmark . -f benchmark-values.yaml \ |
| 32 | + --set hfTokenSecret.name=hf-token \ |
| 33 | + --set hfTokenSecret.key=token \ |
| 34 | + --set "config.server.base_url=http://${IP}:${PORT}" |
| 35 | +``` |
| 36 | + |
| 37 | +**Parameters to customize:** |
| 38 | + |
| 39 | +* `benchmark`: A unique name for this deployment. |
| 40 | +* `hfTokenSecret.name`: The name of your Kubernetes Secret containing the Hugging Face token (default: `hf-token`). |
| 41 | +* `hfTokenSecret.key`: The key in your Kubernetes Secret pointing to the Hugging Face token (default: `token`). |
| 42 | +* `config.server.base_url`: The base URL (IP and port) of your inference server. |
| 43 | + |
| 44 | +### Storage Parameters |
| 45 | + |
| 46 | +The following is how to add storage to the config. |
| 47 | +By default we save to local storage however once the inference-perf job is completed the pod is deleted. |
| 48 | + |
| 49 | +```yaml |
| 50 | +storage: |
| 51 | + local_storage: |
| 52 | + path: "reports-{timestamp}" # Local directory path |
| 53 | + report_file_prefix: null # Optional filename prefix |
| 54 | + google_cloud_storage: # Optional GCS configuration |
| 55 | + bucket_name: "your-bucket-name" # Required GCS bucket |
| 56 | + path: "reports-{timestamp}" # Optional path prefix |
| 57 | + report_file_prefix: null # Optional filename prefix |
| 58 | + simple_storage_service: |
| 59 | + bucket_name: "your-bucket-name" # Required S3 bucket |
| 60 | + path: "reports-{timestamp}" # Optional path prefix |
| 61 | + report_file_prefix: null # Optional filename prefix |
| 62 | +``` |
| 63 | +
|
| 64 | +## Uninstalling the Chart |
| 65 | +
|
| 66 | +To uninstall the deployed chart: |
| 67 | +
|
| 68 | +```bash |
| 69 | +helm uninstall my-benchmark |
| 70 | +``` |
| 71 | + |
0 commit comments