frugal-llm

How fast, and how expensive, is it to serve your model on your hardware, and what do you lose by serving a cheaper version of it?

frugal-llm is an open-source command-line tool that measures latency, throughput, cost per token, and the quality lost to quantisation, with stated uncertainty. It is built for any OpenAI-compatible server, and tested with vLLM, llama.cpp and Ollama (quality runs also with a commercial API, OpenRouter); SGLang and TGI should work but are untested.

uvx frugal-llm bench --url http://localhost:8000/v1 --model <name>

The first study

Results: what quantisation costs and saves on affordable GPUs: Qwen2.5-7B-Instruct in four formats on an RTX 3090, RTX 4090, L4 and A100, with quality measured against BF16 and cost compared with the only API still serving the model per token.

Method

Written before the first measurement, with every later change logged:

Apache-2.0.