Skip to content

Commit

Permalink
server: bench: init
Browse files Browse the repository at this point in the history
  • Loading branch information
phymbert committed Mar 25, 2024
1 parent 9269c11 commit 2c3b192
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
--branch ${{ github.head_ref || github.ref_name }} \
--commit ${{ github.sha }} \
--scenario script.js \
--duration 1m \
--duration 10m \
--hf-repo ggml-org/models \
--hf-file phi-2/ggml-model-q4_0.gguf \
--model-path-prefix /models \
Expand All @@ -120,8 +120,6 @@ jobs:
--max-tokens 2048
cat results.github.env >> $GITHUB_ENV
cat results.github.env
- name: Commit status
uses: Sibz/github-status-action@v1
Expand Down Expand Up @@ -151,17 +149,17 @@ jobs:
with:
message-id: bench-${{ github.job }}-${{ env.RUNNER_LABEL }}
message: |
πŸ“ˆ **llama.cpp** server benchmark for _${{ github.job }}_ on **${{ env.RUNNER_LABEL }}**: **${{ env.BENCH_ITERATIONS}} iterations** πŸš€
πŸ“ˆ **llama.cpp server** benchmark for _${{ github.job }}_ on _${{ env.RUNNER_LABEL }}_: **${{ env.BENCH_ITERATIONS}} iterations** πŸš€
<p align="center">
<img width="80%" height="80%" src="${{ fromJSON(steps.imgur_step.outputs.imgur_urls)[0] }}" alt="prompt_tokens_seconds" />
<img width="80%" height="80%" src="${{ fromJSON(steps.imgur_step.outputs.imgur_urls)[1] }}" alt="predicted_tokens_seconds"/>
<img width="100%" height="100%" src="${{ fromJSON(steps.imgur_step.outputs.imgur_urls)[0] }}" alt="prompt_tokens_seconds" />
<img width="100%" height="100%" src="${{ fromJSON(steps.imgur_step.outputs.imgur_urls)[1] }}" alt="predicted_tokens_seconds"/>
</p>
<details>
<summary>Details</summary>
<p align="center">
<img width="80%" height="80%" src="${{ fromJSON(steps.imgur_step.outputs.imgur_urls)[2] }}" alt="kv_cache_usage_ratio" />
<img width="80%" height="80%" src="${{ fromJSON(steps.imgur_step.outputs.imgur_urls)[3] }}" alt="requests_processing"/>
<img width="80%" height="80%" src="${{ fromJSON(steps.imgur_step.outputs.imgur_urls)[4] }}" alt="requests_deferred"/>
<img width="100%" height="100%" src="${{ fromJSON(steps.imgur_step.outputs.imgur_urls)[2] }}" alt="kv_cache_usage_ratio" />
<img width="100%" height="100%" src="${{ fromJSON(steps.imgur_step.outputs.imgur_urls)[3] }}" alt="requests_processing"/>
<img width="100%" height="100%" src="${{ fromJSON(steps.imgur_step.outputs.imgur_urls)[4] }}" alt="requests_deferred"/>
</p>
</detail>
Expand Down
4 changes: 2 additions & 2 deletions examples/server/bench/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def main(args_in: list[str] | None = None) -> None:
plt.xticks(rotation=0, fontsize=14, horizontalalignment='center', alpha=.7)
plt.yticks(fontsize=12, alpha=.7)

plt.title(f"llama.cpp {args.name} on {args.runner_label} {iterations} iterations\n"
f"duration={args.duration}",
plt.title(f"llama.cpp {args.name} on {args.runner_label}\n"
f"duration={args.duration} {iterations} iterations",
fontsize=14, wrap=True)
plt.grid(axis='both', alpha=.3)
plt.ylabel(f"llamacpp:{metric}", fontsize=22)
Expand Down

0 comments on commit 2c3b192

Please sign in to comment.