Skip to content

Commit

Permalink
Move authentication guide to README
Browse files Browse the repository at this point in the history
  • Loading branch information
dyastremsky committed Nov 7, 2024
1 parent 81a03d9 commit b2009cc
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 44 deletions.
18 changes: 18 additions & 0 deletions genai-perf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,24 @@ inference. Other modes such as the [embeddings](docs/embeddings.md) and

</br>

<!--
======================
AUTHENTICATION
======================
-->

## Authentication

GenAI-Perf can benchmark secure endpoints such as OpenAI, which requires API
key authentication. To do so, you must add your API key directly in the command.
At the end of your command, append the below flags. Replace the key with your
API key. The `--` flag allows arguments to pass directly into Perf Analyzer in
superuser mode. The `-H` flag is used to add HTTP headers.

```bash
-- -H "Authorization: Bearer ${API_KEY}" -H "Accept: text/event-stream"
```

<!--
======================
METRICS
Expand Down
22 changes: 0 additions & 22 deletions genai-perf/docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,6 @@ Example output:
└───────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴──────────┴──────────┘
```

### Running with Authentication
GenAI-Perf can benchmark secure endpoints such as OpenAI, which requires API
key authentication. To do so, you can add your API key directly in the command.
At the end of your command, append the below flags. Replace the key with your
API key. The `--` flag allows arguments to pass directly into Perf Analyzer in
superuser mode. The `-H` flag is used to add HTTP headers.

```bash
-- -H "Authorization: Bearer ${OPENAI_API_KEY}" -H "Accept: text/event-stream"
```

## Profile GPT-2 running on OpenAI Completions API-Compatible Server <a id="openai-completions"></a>

Serve the model on the vLLM server with [OpenAI Completions API](https://platform.openai.com/docs/api-reference/completions) endpoint:
Expand Down Expand Up @@ -211,14 +200,3 @@ Example output:
│ Request throughput (per sec) │ 2.28 │ N/A │ N/A │ N/A │ N/A │ N/A │
└───────────────────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘
```

### Running with Authentication
GenAI-Perf can benchmark secure endpoints such as OpenAI, which requires API
key authentication. To do so, you can add your API key directly in the command.
At the end of your command, append the below flags. Replace the key with your
API key. The `--` flag allows arguments to pass directly into Perf Analyzer in
superuser mode. The `-H` flag is used to add HTTP headers.

```bash
-- -H "Authorization: Bearer ${OPENAI_API_KEY}" -H "Accept: text/event-stream"
```
20 changes: 20 additions & 0 deletions templates/genai-perf-templates/README_template
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,26 @@ inference. Other modes such as the [embeddings](docs/embeddings.md) and

</br>

<!--
======================
AUTHENTICATION
======================
-->

## Authentication

GenAI-Perf can benchmark secure endpoints such as OpenAI, which requires API
key authentication. To do so, you must add your API key directly in the command.
At the end of your command, append the below flags. Replace the key with your
API key. The `--` flag allows arguments to pass directly into Perf Analyzer in
superuser mode. The `-H` flag is used to add HTTP headers.

```bash
-- -H "Authorization: Bearer ${API_KEY}" -H "Accept: text/event-stream"
```

</br>

<!--
======================
METRICS
Expand Down
22 changes: 0 additions & 22 deletions templates/genai-perf-templates/tutorial_template
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,6 @@ Example output:
└───────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴──────────┴──────────┘
```

### Running with Authentication
GenAI-Perf can benchmark secure endpoints such as OpenAI, which requires API
key authentication. To do so, you can add your API key directly in the command.
At the end of your command, append the below flags. Replace the key with your
API key. The `--` flag allows arguments to pass directly into Perf Analyzer in
superuser mode. The `-H` flag is used to add HTTP headers.

```bash
-- -H "Authorization: Bearer ${OPENAI_API_KEY}" -H "Accept: text/event-stream"
```

## Profile GPT-2 running on OpenAI Completions API-Compatible Server <a id="openai-completions"></a>

Serve the model on the vLLM server with [OpenAI Completions API](https://platform.openai.com/docs/api-reference/completions) endpoint:
Expand Down Expand Up @@ -211,14 +200,3 @@ Example output:
│ Request throughput (per sec) │ 2.28 │ N/A │ N/A │ N/A │ N/A │ N/A │
└───────────────────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘
```

### Running with Authentication
GenAI-Perf can benchmark secure endpoints such as OpenAI, which requires API
key authentication. To do so, you can add your API key directly in the command.
At the end of your command, append the below flags. Replace the key with your
API key. The `--` flag allows arguments to pass directly into Perf Analyzer in
superuser mode. The `-H` flag is used to add HTTP headers.

```bash
-- -H "Authorization: Bearer ${OPENAI_API_KEY}" -H "Accept: text/event-stream"
```

0 comments on commit b2009cc

Please sign in to comment.