A Companion Intelligence app for benchmarking local LLMs and comparing them by intelligence.
Get started · Community · Documentation · Systems map
Local-Bench measures how the language models on your own machine perform. It runs a prompt against one or more models served by Ollama, records how fast each model generates text, and shows the results in a local web dashboard with tables, charts, and side by side response comparison. You can also run it from the command line and export a PDF report.
Everything runs locally. Your prompts and the model responses stay on your machine.
| Model intelligence catalog | Throughput comparison |
|---|---|
![]() |
![]() |
| Run a benchmark | Detailed results |
|---|---|
![]() |
![]() |
Full page view: docs/screenshots/01-overview.png
| Feature | What it provides |
|---|---|
| Model comparisons | Submit a common prompt set to Ollama models or a Companion Hub inference pool. |
| Measured runs | Capture latency, first-token timing, throughput and output context. |
| Reports | Compare result sets in the dashboard or use the command-line runner. |
- Benchmarks any model installed in Ollama and reports tokens per second, total tokens, and duration.
- Benchmarks a CI-Hub inference pool the way an installed app sees it: fires N requests at once, records which node and engine answered each one, and reports time to first token, decode speed, and aggregate throughput.
- Shows a curated catalog of popular models with sizes, context windows, and an intelligence score, so you can compare capability alongside speed.
- Lets you pick a built in prompt, edit it, or write your own before running.
- Shows two model responses at a time so you can read them next to each other.
- Captures your system specs (CPU, memory, OS, GPU) with every run.
- Exports a PDF report with the results table, your system summary, and the full model responses.
- Includes an optional path for benchmarking AMD Strix Halo GPUs with llama.cpp.
- Choose the right model for your hardware. See which models run fast enough on your machine before you build them into a workflow.
- Balance speed against quality. Compare tokens per second against the intelligence score to find the best tradeoff for your needs.
- Measure a hardware change. Benchmark before and after adding a GPU or more memory to see how much faster inference gets.
- Compare two models on the same prompt. Read both answers side by side to judge which model responds better for your task.
- Share findings. Export a PDF with the numbers, system specs, and responses to send to a teammate or attach to a writeup.
- Node.js version 22.5 or higher (needed for the built-in
node:sqlitemodule), or Deno 2.9+ — see Running under Deno. - Ollama running locally with at least one model pulled, or a reachable CI-Hub inference pool (see Benchmarking a CI-Hub pool).
- Optional: an AMD Ryzen AI Max "Strix Halo" machine for the llama.cpp GPU path. See STRIX_HALO.md.
Benchmark inputs are sent to the chosen local or pooled inference endpoint; recorded model, hardware and endpoint context accompanies every comparison.
flowchart LR
Prompts[Prompt suite] --> Runner[Local-Bench runner]
Runner --> Local[Ollama endpoint]
Runner --> Pool[Companion Hub pool]
Local --> Results[Metrics and outputs]
Pool --> Results
Results --> UI[Comparison dashboard]
git clone https://github.com/companionintelligence/Local-Bench.git
cd Local-Bench
npm install
# start Ollama if it is not already running (default http://localhost:11434)
ollama serve
# pull a model or two if you have not already
ollama pull llama3.2:3b
ollama pull qwen3:8b
# build and start the dashboard
npm start
# open http://localhost:3000If Ollama is not running yet, the dashboard still loads. It shows the curated catalog and intelligence scores and tells you to start Ollama when you want to run a benchmark.
npm start # http://localhost:3000
PORT=8080 npm start # custom portIn the dashboard you can select installed models, choose and edit a prompt, pick a fixed workload (which replaces the prompt and depth), add a note to the run, run a benchmark, watch the charts and results update, compare two responses, export a PDF, and download a JSON export of the stored results.
# benchmark the curated catalog
npm run benchmark
# benchmark specific installed models
node dist/benchmark.js llama3.2:3b qwen3:8b gemma3:4b
# point at a non default Ollama
OLLAMA_API_URL=http://192.168.1.50:11434 npm run benchmark
# fire four requests at once and report the batch aggregate
node dist/benchmark.js gemma3:4b --concurrency=4
# one request at a time, no streaming (no TTFT; matches the old numbers exactly)
node dist/benchmark.js gemma3:4b --no-stream
# a fixed workload: a 1,024-token prompt and at most 16 generated tokens (see Fixed workloads)
node dist/benchmark.js gemma3:4b --scenario=pp1024+tg16
# the same work at four concurrency levels: the throughput and latency curve
node dist/benchmark.js gemma3:4b --scenario=pp1024+tg16 --profile=scaling --levels=1,2,4,8
# a note on the run, and a shareable JSON export of it
node dist/benchmark.js gemma3:4b --scenario=pp1024+tg16 --note="laptop on battery" --export=run.jsonA CI-Hub exposes its inference pool at {hub}/api/inference/pool. It speaks Ollama's API (/api/tags, /api/generate) and OpenAI's (/v1/chat/completions) and routes each request to whichever node in the pool has the model loaded. Point Local-Bench at it and the tool measures throughput from an app's seat: the same path a marketplace app takes, including the routing decision.
# a pool on the tailnet
OLLAMA_API_URL=http://100.115.174.32:5002/api/inference/pool node dist/benchmark.js gemma3:1b --concurrency=4
# the same, as the dashboard
OLLAMA_API_URL=http://100.115.174.32:5002/api/inference/pool npm startInside a Hub-installed app you do not need to set anything once the marketplace manifest maps the Hub's resolved inference endpoint onto these variables (APP_OLLAMA_URL → OLLAMA_API_URL, APP_OPENAI_BASE_URL → CI_LLM_BASE_URL, APP_OPENAI_API_KEY → CI_LLM_API_KEY; see CI-Marketplace/apps/ci-local-bench/docker-compose.json). OLLAMA_API_URL wins whenever it is non-empty, so an Ollama-backed Hub benchmarks through its pool with native timings and a vLLM/Lemonade-backed Hub falls through to the OpenAI transport.
| Variable | Meaning | Default |
|---|---|---|
OLLAMA_API_URL |
Ollama-native base URL. May be a pool proxy. Wins when set. | http://localhost:11434 |
CI_LLM_BASE_URL |
OpenAI-compatible base URL, with or without a trailing /v1. Used when OLLAMA_API_URL is unset or empty. |
unset |
CI_LLM_API_KEY |
Sent as Authorization: Bearer on every request when set. |
unset |
BENCH_DRIVER |
The engine to measure: ollama, openai, llamacpp, vllm, lemonade, omlx or localai (see Engines and drivers). Unknown names are an error. |
detected |
BENCH_TRANSPORT |
Legacy alias: ollama or openai, the wire protocol. Use BENCH_DRIVER for new setups. Other values are an error. |
detected |
PORT |
Dashboard port. | 3000 |
The OpenAI transport is how you reach an engine directly rather than through the pool: vLLM at http://host:8000, Lemonade at http://host:13305, and llama.cpp's llama-server at its own port. Those have no /api/generate, so set CI_LLM_BASE_URL (or OLLAMA_API_URL, either works) to the engine's base and the tool uses /v1/chat/completions.
BENCH_DRIVER (or --driver=<name> on the CLI) names the engine to measure. Without it the tool detects one: Ollama when /api/tags answers, llama.cpp when /props answers, and the generic OpenAI driver otherwise. Each driver says what it can measure; a cell the engine does not provide is stated as unsupported, not left blank.
| Driver | Protocol | Default URL | Engine-reported timings | Context window |
|---|---|---|---|---|
ollama |
Ollama native API | http://localhost:11434 |
yes (eval durations) | not reported |
llamacpp |
llama.cpp llama-server |
http://localhost:8080 |
yes (timings block) |
yes (/props) |
openai |
any OpenAI-compatible server | set CI_LLM_BASE_URL |
no (usage counts only) | not read |
vllm |
vLLM | http://localhost:8000 |
no | not read |
lemonade |
Lemonade | http://localhost:13305 |
no | not read |
omlx |
oMLX | set CI_LLM_BASE_URL |
no | not read |
localai |
LocalAI | set CI_LLM_BASE_URL |
no | not read |
llama-bench |
llama.cpp's own benchmark tool (CLI) | a Strix Halo toolbox | yes (engine-native) | not read |
The first seven send requests to an endpoint, so their rows carry seat app: the speed an application sees. llama-bench runs the engine's own benchmark tool, so its rows carry seat engine-native, and the two are never averaged together. Run it with npm run strix-halo. The driver list and capabilities are at GET /api/drivers.
- Context depth (
--depth=<tokens>, or the context depth selector): prefills about this much context before the question. Each request's prompt starts with a nonce, so the engine cannot reuse an earlier prefill, and the prompt actually sent is stored with the row. Several depths in one run:--depth=0,4096,16384. - Repetitions (
--repetitions=<n>, 1 to 50): repeats the batch and reports the median, mean, standard deviation and a 95% t-interval across repetitions. Each row carries itsrepeatIndex. - Load profiles (
--profile=constantorpoisson --rate=<requests per second> --duration=<seconds>): sends single requests on a schedule, evenly spaced or Poisson.--seed=<n>makes a Poisson schedule repeatable. The summary gives TTFT and inter-token latency at p50, p90 and p99, and goodput: the share of requests that met--ttft-slo=<ms>and--itl-slo=<ms>. - Sweep (
--profile=sweep --rates=1,2,4): steps through the rates with constant arrivals and stops at saturation: the first rate where more than 5% of requests fail, or where p90 TTFT breaks the TTFT target. - Scaling (
--profile=scaling --levels=1,2,4,8): the same workload at several concurrency levels, one batch each. Each level's aggregate is its own row, so the curve of throughput and median TTFT against concurrency is in the results. - Cold and warm: the first request to a model on a target is marked
cold, and so is any request that loaded the model (Ollama'sload_duration).
Load profiles, sweeps and scaling run from the CLI. The dashboard runs batches, workloads, depths and repetitions.
A workload fixes the prompt length and the generation cap, so the same work runs on every machine. --scenario=<name> (or the Workload selector in the dashboard) takes one of the nine budgets below, or any ppN+tgM with N up to 32768 and M up to 8192. Several in one run: --scenario=pp64+tg1024,pp1024+tg16.
| Name | Prompt tokens | Generated, at most |
|---|---|---|
pp16+tg1536 |
16 | 1,536 |
pp64+tg1024 |
64 | 1,024 |
pp384+tg1152 |
384 | 1,152 |
pp1024+tg16 |
1,024 | 16 |
pp1024+tg1024 |
1,024 | 1,024 |
pp1280+tg3072 |
1,280 | 3,072 |
pp2048+tg256 |
2,048 | 256 |
pp2048+tg768 |
2,048 | 768 |
pp4096+tg256 |
4,096 | 256 |
- The budgets and their names are LocalScore's published test table (github.com/cjpais/LocalScore, Apache-2.0), so results can be lined up against it. The prompt text is this tool's own.
- The prompt is filler of about N tokens, then the question, then a per-request nonce, so the engine processes more than N. Its own count (
promptTokens) is the length it actually processed: on llama.cpp, pp1024 came to 1,091 tokens. Compare onpromptTokens, not on N. - Generation stops at the cap. Each row records
finishReason:lengthwhen the cap was reached,stopwhen the model ended first. Rows are comparable on speed when they generated the same number of tokens, so filter onlengthwhen comparing engines. llama.cpp is also sentignore_eos, so its runs reach the cap; Ollama has no equivalent option, so its runs can end early. - A workload sets its own prompt and length, so it cannot be combined with
--depth, a custom prompt, or a prompt ID.
--concurrency=N (CLI) or the concurrency selector (dashboard) sends N identical requests at the same instant and waits for all of them. N is clamped to 1..16. Every row in the batch shares a batchId, and the batch gets one aggregate row.
Concurrency is the interesting knob for a pool. A single request measures one node. Four at once show whether the pool spreads them across nodes (each row's servedBy names the node, backend names the engine) and what the whole pool delivers per second.
- tok/s (
tokensPerSecond) is generated tokens divided by wall-clock time for that request, including queueing, routing, model load, and prompt processing. This is the number the tool has always reported and the one old CSVs and charts compare against. Under concurrency it drops, because each request waits its turn. - TTFT (
ttftMs) is milliseconds from sending the request to the first content chunk. Only measured when streaming (the default). This is the latency a user feels before text starts appearing; on a pool it includes the routing hop and any model load on the chosen node. - Decode tok/s (
decodeTokensPerSecond) is the engine's generation speed with everything before the first token excluded. On Ollama it iseval_count / eval_durationfrom the response's own timings; on an OpenAI-compatible engine it is tokens over the time after TTFT. This is the number to compare engines and hardware on, since it is insensitive to load time and queueing. - Aggregate tok/s (
aggregateTokensPerSecond) is the sum of all tokens in a batch divided by the batch's wall time. This is the pool's throughput: what N simultaneous apps would get out of it together. Compare it against the concurrency-1 number to see how much the pool scales. - Served by / backend come from the
X-Hub-Pool-Served-ByandX-Hub-Pool-Backendresponse headers the pool adds (localor a peer's MagicDNS name;ollama,vllm,lemonade,omlxorlocalai). They are empty on a direct Ollama or engine target.requestIdisX-Hub-Pool-Request-Id, useful for finding the request in the Hub's logs. - Load / prompt eval / eval (
loadMs,promptEvalMs,evalMs) are Ollama's own timing breakdown, in milliseconds. Only present on the Ollama transport. - Prompt speed (
promptTokensPerSecond) is the engine's own figure when it reports one (Ollama, llama.cpp). Otherwise it is prompt tokens over TTFT, which includes the network round trip. - Driver, seat and timing source (
driver,seat,timingSource) say what was measured and by whose clock:timingSourceisollama,llamacpp, orclient(this tool's clock). - Finish reason (
finishReason) is how generation ended, as the engine reports it:length(the cap was reached) orstop(end of sequence). - Engine metadata (
engine) is what the engine reports about itself and the model: its version, the model's digest, family, format, parameter count and quantization, the runtime context window, and llama.cpp's slot count. It is read from the engine's own endpoints before the clock starts, so it is never charged to a run. Engines that do not report a field leave it out. - GPU memory (
vramBytes) is the bytes of the model held in GPU memory once the run finished. Ollama reports it through/api/ps; other engines leave it blank. - Power (
powerWatts,powerSource,powerNote) is the mean draw in watts over the batch or load run. The sources arenvidia-smi(NVIDIA, no privileges needed) andpowermetrics(Apple Silicon, which needs root: the tool asks withsudo -n, so it never prompts for a password and records nothing unless you have already allowed it). When there is no source,powerNotesays why. A batch also gets tokens per joule (tokensPerJoule): its aggregate tokens per second divided by its watts. - Note (
note) is free text of up to 280 characters, stored with every row of the run.
The CLI prints one line per request and then an = line with the batch aggregate:
Benchmarking gemma3:1b (4 concurrent, streaming, ollama → http://100.115.174.32:5002/api/inference/pool)...
✓ gemma3:1b: 2.13s, 107 tokens, 50.19 tokens/second
...
50.19 tok/s wall, 89.94 tok/s decode, TTFT 945ms, served by core-4.capybara-ulmer.ts.net, backend ollama
= aggregate 50.92 tok/s over 7.92s, 4/4 ok, median TTFT 3436ms, median decode 92.87 tok/s, served by beta-1…×1 core-4…×1 fzzy…×1 core-17…×1, backends ollama×4
The dashboard shows the same: a banner naming the target and whether it is a pool, pool columns in the results table when the rows have them, and an aggregate throughput panel with the served-by distribution.
The dashboard's server exposes these for scripts:
GET /api/target→{ url, transport, driver, seat, path, pool };pathispoolwhen the URL contains/inference/pool, andpool.servedByHeaderSeensays whether the pool has answered this process yet.GET /api/drivers→ the HTTP engine drivers, with each one's capabilities and the reason for any it does not provide.POST /api/run-benchmarkwith{ models, promptId?, customPrompt?, concurrency?, stream?, driver?, contextDepth?, repetitions?, scenario?, note? }→{ success, results, aggregates }. An invalid value is a 400 with the reason. Ascenarioreplaces the prompt and must come withcontextDepth0 and nocustomPromptorpromptId.GET /api/scenarios→ the fixed workloads, and the limits on anyppN+tgM.GET /api/export?limit=N→ the stored results as a JSON file (see Sharing results).GET /api/results→ every stored row, new fieldsnullon rows written before them.GET /api/aggregates?limit=N→ recent batch aggregates.
This tool measures throughput over time from the app's side. Conformance of the pool's wire protocol is the job of the fleet harness in CI-Engineering; the two are meant to be run together, not instead of each other.
--export=<file> (CLI) or the Download JSON export button (GET /api/export) writes the measurements and their run settings as JSON, schema local-bench-export/1: the runs, the batch aggregates, the hardware, the engine metadata and the notes. The file is written where you ask. Nothing is uploaded.
It leaves out the prompts, the model responses, host names, target URLs, request IDs, served-by names and error text, since any of these can identify a person or a network. The hardware block carries the CPU, memory, operating system and GPU model; the machine's name is not included.
npm run strix-halo detect
npm run strix-halo setup llama-rocm-7.2
npm run strix-halo benchmark /path/to/model.gguf --toolbox llama-rocm-7.2See STRIX_HALO.md for the full guide.
Local-Bench is published as a multi architecture (amd64 and arm64) container image and runs as a first party app on the Companion Intelligence Hub.
docker run -d -p 3000:3000 ghcr.io/companionintelligence/ci-local-bench:latest
# open http://localhost:3000Point it at your Ollama server with OLLAMA_API_URL. Inside a container, localhost is the container itself, so use the host address:
docker run -d -p 3000:3000 \
-e OLLAMA_API_URL=http://host.docker.internal:11434 \
ghcr.io/companionintelligence/ci-local-bench:latestBenchmark data is written to the working directory (/app in the container). Mount a volume there to keep results across restarts.
benchmark_results.csvis a flat record of every run (the six original columns only).benchmark_data.dbis a SQLite database with results, batch aggregates, and system specs. An older database is migrated in place when the tool opens it; the pool columns areNULLon rows that predate them.
Each curated model carries an intelligence score from the Artificial Analysis Intelligence Index, a composite benchmark scored roughly 0 to 100 where higher is more capable. The dashboard shows it as an IQ badge on each model and as a ranked list. Scores are a snapshot and can change as the index evolves. Vision only and very small models are not individually rated and appear as "Not rated". The full catalog is browsable in the app and defined in src/benchmark.ts.
Edit src/benchmark.ts to customize:
OLLAMA_API_URL/CI_LLM_BASE_URL, the inference endpoint (environment variables; see Benchmarking a CI-Hub pool).TEST_PROMPTS, the benchmark prompt library.SUPPORTED_OLLAMA_MODELS, the curated catalog and each model's intelligence score.
npm test # Jest unit tests
npm run test:coverage
npm run build # typecheck and emit to dist/
npm run lint # strict compiler checks on source files
npm run smoke -- gemma3:1b # one live request to the configured engine (needs it running)The contract tests run the real benchmark code over real HTTP against an in-process engine stub, replaying a captured Ollama stream. A conformance matrix (src/conformance.ts) records, per driver and dimension (including the fixed-workload cap, engine metadata and loaded memory), which test covers it or why it is skipped, and whether the driver has run against a live engine.
This repo also runs under Deno (2.9+) via its npm/Node
compatibility layer — deno.json mirrors the npm scripts above as tasks:
deno task build # tsc -> dist/
deno task server # build + serve on :3000
deno task start # same as server
deno task benchmark # build + run the CLI benchmark
deno task strix-halo # build + run the Strix Halo CLI
deno task test # runs the existing Jest suite under Deno
deno task test:watch
deno task test:coverage
deno task lint # deno lint (stricter defaults than the repo's ts-jest/tsc setup; pre-existing findings aren't all fixed yet)The database layer uses Node's built-in node:sqlite module rather than
better-sqlite3, since better-sqlite3's native addon does not load under
Deno. node:sqlite works the same way under Node (>=22.5) and Deno, so the
npm scripts and the deno task equivalents share the same src/database.ts
with no forked code path.
The published container image (ghcr.io/companionintelligence/ci-local-bench)
now builds and runs on denoland/deno instead of node; see the
Dockerfile.
- Cannot connect to Ollama: make sure
ollama serveis running and reachable athttp://localhost:11434, or setOLLAMA_API_URL. - Model not found: list installed models with
ollama list, then pull what you need withollama pull <model>. - A run takes too long: each model has a two minute timeout. Benchmark fewer or smaller models at a time.
- Documentation: https://docs.ci.computer/
- Discord community: https://discord.com/invite/yQp9hwpzAa
| Mode | Request pattern | Interpretation |
|---|---|---|
| Default CLI | One request at a time, non-streaming | Comparable with the project's historical numbers; does not report time to first token |
| Concurrent batch | Four requests at once | Aggregate result for concurrent load, not single-request latency |
| Dashboard | Curated catalog or selected installed models | Uses the configured Ollama endpoint or CI-Hub pool |
Record the model, runner/endpoint, and concurrency mode with any result you share. A pool, local Ollama, and different hardware are not directly comparable unless the request mode and model are held constant.
Contributions are welcome. Please open a Pull Request.
Local-Bench is free for noncommercial use under the PolyForm Noncommercial License 1.0.0. See the License FAQ.
Required Notice: Copyright LifeScope INC, DBA Companion Intelligence (https://ci.computer)





