Skip to main content

TUI for benchmarking LLM endpoints (OpenAI/Anthropic-compatible).

Project description

๐Ÿ’จ smokebench

Rapid, interactive TUI smoke tests for OpenAI- and Anthropic-compatible LLM endpoints.

Measure response quality, schema compliance, token throughput, and more on your hardware before committing to long runs.

PyPI Version Python Version License: MIT Built with Textual

Why smokebench โ€ข Quick Start โ€ข TUI Walkthrough โ€ข Built-in Benchmarks โ€ข Development/Contribution


Why smokebench?

Online leaderboards test LLMs on enterprise GPU clusters running unquantized weights. They don't tell you how a 4-bit quant actually performs on your machine, under your system load, against your specific schema constraints.

Heavy LLM evaluation frameworks (lm-eval-harness, Promptfoo) are great for research or CI/CD pipelines, but take heavy setup time and long runs.

smokebench fills a different niche: zero-config terminal UI designed for rapid, interactive smoke tests while iterating on prompts, models, or endpoints.

Key Features:

  • ๐ŸŽฏ TUI-first, not CLI-first: Configure endpoints, select models, toggle benchmarks, and set judge options visually with keyboard shortcuts. No YAML files to edit by hand for a quick check.
  • ๐Ÿ”Œ Multi-protocol: Direct support for OpenAI and Anthropic API schemas out of the box (works with Ollama, vLLM, LM Studio, SGLang, or cloud proxies).
  • ๐Ÿงช 8 built-in benchmarks: math, code, summarization, JSON mode, long context, creative writing, streaming throughput โ€” enough to surface regressions in minutes.
  • ๐Ÿ† Recommendation chips: after a run, the Results screen highlights which model won for coding, reasoning, cost*, or speed.
  • ๐Ÿ“Š Exportable artifacts: Auto-generates clean Markdown reports and structured JSON logs for tracking runs over time.
  • ๐Ÿชถ Lightweight: Python 3.11+, a handful of pip packages, no database, no Kubernetes, no platform account.

If you need rigorous leaderboards with thousands of samples, use something else.
If you want to quickly check "is this tiny model smart enough?" or "did my fine-tune improve?", this is the tool.


Requirements

  • Python 3.11+
  • Core: httpx, textual, pydantic, pyyaml, jsonschema, rich
  • Optional: tiktoken, rouge-score (auto-fallback if missing)

Quick Start

Installation

Install via pip or uv:

# Using pip
pip install smokebench

# Using uv
uv tool install smokebench

TUI Walkthrough

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 1. Endpoint โ”‚ โ”€โ”€> โ”‚  2. Models  โ”‚ โ”€โ”€> โ”‚3. Benchmarksโ”‚ โ”€โ”€> โ”‚  4. Judge   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                                   โ”‚
      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            โ”‚
      โ”‚ 6. Results  โ”‚ <โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”‚   5. Run    โ”‚ <โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Screen Purpose Keys
1. Endpoint Base URL, API key, protocol (auto/openai/anthropic) Ctrl+T test, Ctrl+N next
2. Models Auto-fetched list with context/modalities/features; multi-select Space toggle, A all, N none, / filter
3. Benchmarks Toggle 8 built-in tasks; add custom YAML; "Advanced" for per-task sample counts Ctrl+N next
4. Judge Pick judge model: from selected / separate endpoint / skip Ctrl+N next
5. Run Live progress bars + streaming log; pause/resume/cancel P pause, C cancel
6. Results Sortable table + recommendation chips; export JSON/MD E export, Esc new run

Built-in Benchmarks (8)

Task Samples Grader Measures
Math / Reasoning (GSM8K-lite) 20 Numeric regex Accuracy
Code Generation (HumanEval-lite) 15 Sandboxed subprocess exec Pass@1
Code Explanation 10 LLM-judge rubric 1โ€“5 Quality
Summarization 10 ROUGE-L F1 Fidelity
Instruction / JSON Mode 12 JSON Schema validation Schema compliance
Long Context (Needle-in-haystack) 5 sizes (1kโ€“128k) Exact substring Effective context
Creative Writing 8 LLM-judge rubric 1โ€“5 Style & Prompt Following
Latency / Throughput 10 Streaming metrics TTFT, tokens/sec (p50/p95)

Custom Benchmarks

Extend smokebench by loading custom YAML definitions directly inside the UI (Benchmarks > Add custom benchmark):

name: my_custom_task
description: "Extract structured data"
samples:
  - id: sample_01
    prompt: "Parse: 'John, 30, NYC' --> JSON with name, age, city"
    grader: json_schema
    schema:
      type: object
      properties:
        name: {type: string}
        age: {type: integer}
        city: {type: string}
      required: [name, age, city]

Recommendations Engine

After a run, the Results screen shows chips for:

  • best_overall - mean pass-rate across deterministic tasks
  • best_coding - code_gen + code_explain
  • best_reasoning - math + instruction_json
  • best_long_context - needle retrieval at max tested size
  • best_json_mode - instruction_json pass-rate
  • best_writing - creative_writing + code_explain (judge score)
  • fastest - median tokens/sec (latency task)
  • cheapest - lowest USD cost (requires pricing config)

Tie-breakers automatically prioritize lower latency, then lower cost.


Pricing (Optional)

Add per-model pricing in smokebench.yaml (auto-created in the project directory):

pricing:
  entries:
    gpt-4o:
      input_per_million: 5.0
      output_per_million: 15.0
    gpt-4o-mini:
      input_per_million: 0.15
      output_per_million: 0.60

Output Artifacts

Each run creates ./smokebench_results/run_YYYYMMDD_HHMMSS/:

run_20260719_143022/
โ”œโ”€โ”€ summary.json      # models, tasks, errors
โ”œโ”€โ”€ details.json      # per-task per-model scores
โ”œโ”€โ”€ samples.jsonl     # Full input/output logs per sample (streamable)
โ”œโ”€โ”€ report.md         # human-readable markdown summary

Contributing

Feel free to open issues or PRs!

To set up for local development:

# Clone the repository
git clone https://github.com/Ninja-5000/smokebench.git
cd smokebench

# Create virtual env and install dependencies
make venv
source .venv/bin/activate

# Run test suite
make test

# Launch dev version
make run

License

Distributed under the MIT License

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

smokebench-1.0.0.tar.gz (50.8 kB view details)

Uploaded Source

Built Distribution

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

smokebench-1.0.0-py3-none-any.whl (59.2 kB view details)

Uploaded Python 3

File details

Details for the file smokebench-1.0.0.tar.gz.

File metadata

  • Download URL: smokebench-1.0.0.tar.gz
  • Upload date:
  • Size: 50.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for smokebench-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d57b9b18acfa40c5c2b4759bda6ce614ddbd450b667313c47b7b45bd288aa3c0
MD5 0e0b8475d5771c6176febaefa87e4dbd
BLAKE2b-256 baba23da8eb572ec91e31bb1bbf9c3323405dee4df139d289d2f16232de101f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for smokebench-1.0.0.tar.gz:

Publisher: python-publish.yml on Ninja-5000/smokebench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file smokebench-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: smokebench-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 59.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for smokebench-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94478a78339dc086b2b2e866309434e0e160aa14021415be136898b8372bd5ff
MD5 857c9a66100871a6e1dd50a36238b561
BLAKE2b-256 0bd21d4fae4904db9050411dea20be9235bd3762189c20d33b0b2090c8fc9559

See more details on using hashes here.

Provenance

The following attestation bundles were made for smokebench-1.0.0-py3-none-any.whl:

Publisher: python-publish.yml on Ninja-5000/smokebench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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