Skip to main content

AI Infra bench

Project description

ai_infra_bench

Motivation

As large language model (LLMs) grow more capable, industries are eager to deploy them locally to ensure data security, reduce costs, and integrate them into daily workflows -- such as building agents that can perform comprehensive analyses to improve efficiency.

Thus, the question of how to deploy LLMs efficiently has become a critical challenge for many companies. Here, we focus solely on the benchmarking perspective -- while workload-specific optimization is a core topic, we leave it aside for simplicity as it is beyond the scope of this project. Practitioners in AI infrastructure often need to benchmark models or deployment startegies to determine whether they meet the service-level objectives (SLOs) of a particular business.

Benchmarking is often done by repeatedly running benchmark scripts (e.g., SGLang's bench_serving) and manually copying the resulting metrics into tables or plots for comparison. This process is tedious, error-prone, and highly repetitive. An alternative is to write custom shell scripts, but they are difficult to reuse and lack the flexibility and expressive power of modern programming language like Python.

This project aims to free AI infrastructure engineers from repetitive benchmarking tasks. Simply define your server and client launch scripts in a single python file, and the tool will automatically generate clear Markdown tables and elegant HTML plots. The entire process is fully automated -- you can focus on other work while the script run!

Overview

There are totally 3 modes when benchmarking from the viewpoint of ai infra workers

  1. General: Evaluate the performance of a single deployment across various workloads.
  2. Compare: Compare the performance of multiple deployment options in the same workload.
  3. SLO: Identify the most demanding workload that still meets the required service-level objectives given a deployment option.

This project automatically generates benchmarking results as clean Markdown tables and interactive Plotly graphs for clear visualization. Below are some example outputs.

Install

pip install ai-infra-bench

How to use

Concrete usage examples and argument configurations can be found in the examples subdirectory

Limitation

The following limitations also represent the project's TODO items for improving usability:

  1. Coverage

    • Currently only supports SGLang.

    • Server and client launch scripts must strictly start with python -m sglang.launch_server or python -m sglang.bench_serving for security reasons. This restriction prevents accidentally executing unsafe scripts.

  2. Output content hardcoding and inflexibility

    • JSON metrics generated by bench_serving are hardcoded. Users cannot customize file names, table titles, or graph labels, which may cause confusion.
    • The output directory must not exist before running the benchmark to ensure a clean workspace.
    • The contents of tables and plots are fixed for the three benchmarking modes and cannot yet be customized.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_infra_bench-0.1.0.post2.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_infra_bench-0.1.0.post2-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file ai_infra_bench-0.1.0.post2.tar.gz.

File metadata

  • Download URL: ai_infra_bench-0.1.0.post2.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for ai_infra_bench-0.1.0.post2.tar.gz
Algorithm Hash digest
SHA256 417796b78d0744522703fcf0f1295bbba3157a6a38f41bef8bbe5ed9414d7eb3
MD5 1dab8b97894fec81e92c2777a82f695d
BLAKE2b-256 aaff3dc19541ff729d5a364f9cdf282732473248cf9f015af31197e8c661f1c1

See more details on using hashes here.

File details

Details for the file ai_infra_bench-0.1.0.post2-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_infra_bench-0.1.0.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 369b043a335803c36c3a644fc39dbdf0adc65d5037d84ae33c1a0db77b90c1de
MD5 9823f96696b42187dd9c0b1b1c6f5dc2
BLAKE2b-256 c70677d4f7f956ca18404334877a00597e7ec6e7514a88fd80170e2d80159abd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page