A high-performance, full-stack benchmarking and evaluation playground for Large Language Models (LLMs) and Vision-Language Models (VLMs). Designed for OpenAI-compatible inference backends such as vLLM, SGLang, Ollama, and OpenAI API.
Inference Lab is designed to run seamlessly across platforms:
- Windows: Uses native Edge WebView2 runtime out of the box for an ultra-lightweight, zero-overhead desktop window.
- Linux (Ubuntu / Debian): Integrates with system WebKitGTK (
gir1.2-webkit2-4.1) for native window rendering without bundling heavy Chromium runtimes. - Web Browser Fallback: Gracefully opens in your default browser if native window libraries are unavailable.
- Time to First Token (TTFT): Precise millisecond-level calculation of prompt processing and time to first generated token.
- Inter-Token Latency (ITL): Detailed latency distributions including Average, P50 (Median), and P95 (Spikes).
- Throughput & Decode Rate: Live generation rate in tokens/second.
- End-to-End Latency: Total request completion time and finish reasons.
- vLLM
enable_thinkingIntegration: Automatic parameter injection (chat_template_kwargs={"enable_thinking": True, "reasoning_effort": "high"}). - Thinking Budget Control: Allocate max reasoning tokens (
thinking_budget_tokens). - Streaming Reasoning Extraction: Supports both native
delta.reasoning_contentand real-time streaming tag parsing for<think>...</think>tags directly in content streams. - Interactive Reasoning Drawer: Unfolds live reasoning trace and tracks reasoning token counts independently from response tokens.
- Document & Image Ingestion: Direct upload support for PNG, JPEG, WEBP, and multi-page PDF documents.
- High-Fidelity Rendering via PyMuPDF: Automated conversion of PDF pages into base64 visual tokens (150 DPI) with flexible page range controls (
First Page,All Pages, orFirst N Pages). - Visual Page Gallery: Interactive thumbnail strip allowing quick multi-page verification before dispatching inference requests.
- URL & Data URI Linking: Benchmark images via remote public URLs or inline Base64 data strings.
- Typed Probabilistic Evaluation: Test discrete decision queries evaluated directly via first-token read log probabilities (
label_mass) without auto-regressive decoding overhead. - Supported Decision Types: Full UI workflows for
choice(categorical options),noul(yes/no affirmation probabilities), andscore(ordered scale distributions and expected values). - Prefix-Cache Aware: Designed to benchmark prefix-caching behavior where the state is cached and subsequent question probes evaluate with zero prompt re-computation.
- Zero-Dependency Dataset Loading: Stream and evaluate rows directly from Hugging Face Datasets API (e.g.,
openai/gsm8k,openai/openai_humaneval,allenai/ai2_arc). - Configurable Concurrency: Run asynchronous parallel workers (1 to 32 parallel requests) and track aggregate TTFT, cluster throughput, and per-sample latency.
- Inference Endpoints: Saved in
data/endpoints.jsonwith per-model capabilities (supports_thinking,is_vlm,context_window,api_key). - Custom Benchmark Presets: Save and delete custom prompt templates in
data/templates.jsonwith optional sample image/document attachments. - Custom Decision Presets: Maintain custom state/question definitions in
data/decision_templates.jsondirectly from the UI. - Protected Built-Ins: Default system templates remain protected while custom user templates can be deleted or updated dynamically.
LLM-Benchmarks/
βββ app/
β βββ main.py # FastAPI setup, route mounts & page handlers
β βββ routers/
β β βββ benchmark.py # Streaming benchmark & PDF conversion endpoints
β β βββ batch.py # Concurrent dataset batch runner
β β βββ decisions.py # /v1/systemone runner & decision presets API
β β βββ endpoints.py # Endpoint CRUD registry API
β β βββ templates.py # Benchmark prompt template store & router
β βββ schemas/
β β βββ benchmark.py # Benchmark request, metrics & payload schemas
β β βββ batch.py # Batch request & aggregate metrics schemas
β β βββ decision.py # Structured decision schemas (choice, noul, score)
β β βββ endpoints.py # Endpoint & model metadata schemas
β β βββ template.py # Prompt template schemas
β βββ services/
β β βββ benchmark_service.py # Streaming client, PyMuPDF engine & metrics
β β βββ batch_service.py # Asynchronous batch executor with semaphore
β β βββ decision_template_store.py # JSON file store for decision presets
β β βββ endpoint_store.py # JSON file store for endpoints
β β βββ template_store.py # JSON file store for user prompt templates
β β βββ metrics.py # ITL, percentiles & throughput computation
β βββ static/
β βββ index.html # Main playground & PDF benchmark studio
β βββ app.js # SSE stream parser & multi-page gallery
β βββ batch.html # Batch benchmark UI
β βββ batch.js # Batch evaluation streamer
β βββ decisions.html # Structured Decisions studio UI
β βββ decisions.js # /v1/systemone runner & distribution visualizer
βββ data/
β βββ endpoints.json # Configured inference endpoints
β βββ templates.json # User custom benchmark templates
β βββ decision_templates.json # User custom decision templates
βββ Images/ # Default test assets (OCR, sample docs, cats)
βββ scripts/
β βββ build_deb.sh # Linux packaging script
βββ run_app.py # Standalone native desktop launcher
βββ requirements.txt # Python dependencies
βββ README.md
- Python 3.12+
uv(recommended) orpip
- Windows: Uses Microsoft Edge WebView2 (pre-installed on Windows 10 & 11).
- Linux (Ubuntu / Debian): Requires system WebKitGTK and PyGObject libraries for native window rendering:
sudo apt update sudo apt install -y python3-gi gir1.2-gtk-3.0 gir1.2-webkit2-4.1 libglib2.0-dev libgirepository-2.0-dev pkg-config
Using uv:
uv syncOr using pip:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
# On Linux, install PyGObject for native window support:
pip install PyGObjectuv run uvicorn app.main:app --host 0.0.0.0 --port 3333 --reloadRuns the local server on a dynamic free port and opens a native desktop application window:
uv run run_app.pyInference Lab can be packaged into standalone native desktop releases for both Windows (.exe) and Linux (.deb).
Build a single-file executable using PyInstaller:
pyinstaller --noconfirm --onefile --windowed \
--name "LLM_Benchmarking_Studio_v1.2.0" \
--distpath "releases" \
--icon "assets/app_icon.ico" \
--add-data "app/static;app/static" \
--add-data "Images;Images" \
--add-data "data;data" \
--add-data "assets;assets" \
--collect-all "uvicorn" \
--collect-all "fastapi" \
--collect-all "starlette" \
--collect-all "pymupdf" \
--collect-all "webview" \
run_app.pyThe output .exe will be generated in releases/.
Ensure scripts/build_deb.sh is executable and run the build script:
chmod +x scripts/build_deb.sh
./scripts/build_deb.shThis freezes the application, bundles all static assets, and builds a Debian .deb package with desktop integration and icon registration.
The output package will be created at:
releases/llm-benchmarking-studio_1.2.0_amd64.deb
Install using apt so all required system runtime dependencies (WebKitGTK) are automatically resolved:
sudo apt install ./releases/llm-benchmarking-studio_1.2.0_amd64.deb(Alternative using dpkg):
sudo dpkg -i releases/llm-benchmarking-studio_1.2.0_amd64.deb
sudo apt-get install -f.- Launch directly from your application launcher / desktop menu (LLM Benchmarking Studio)
- Or from any terminal:
llm-benchmarking-studio
sudo apt remove llm-benchmarking-studio| Endpoint | Method | Description |
|---|---|---|
/ |
GET |
Main benchmarking playground UI |
/batch |
GET |
Batch evaluation dashboard UI |
/decisions |
GET |
Structured Decisions (/v1/systemone) studio UI |
/benchmark/run |
POST |
Executes streaming single benchmark via Server-Sent Events (SSE) |
/benchmark/process-pdf |
POST |
Converts uploaded PDF pages to base64 images via PyMuPDF |
/batch/run |
POST |
Executes concurrent dataset benchmark with live SSE progress |
/decision/run |
POST |
Dispatches structured question reads to /v1/systemone |
/decision/templates |
GET, POST |
List or register structured decision presets |
/decision/templates/{id} |
DELETE |
Delete user custom decision preset |
/endpoints/ |
GET, POST, DELETE |
List, save, or delete configured endpoints |
/endpoints/{id} |
GET, DELETE |
Retrieve or delete specific endpoint by ID |
/templates/ |
GET, POST |
List or register benchmark prompt templates |
/templates/{id} |
DELETE |
Delete user custom benchmark template |
This project is open-source and available under the MIT License.