Homebench – Benchmark local LLMs for speed, memory, and quality
Homebench: Evaluating Local LLMs for Speed, Memory, and Quality
When running Large Language Models (LLMs) locally, the experience varies wildly depending on your hardware and the model's optimization. Homebench emerges as a critical tool for users who want to stop guessing and start measuring. It provides a standardized framework to quantify exactly how a model performs on your specific machine.
Why Homebench?
For too long, the community has relied on generic benchmarks from cloud providers or anecdotal reports from Reddit. However, local performance is highly dependent on the interplay between the GPU, VRAM, and the inference engine (like llama.cpp or ExLlamaV2).
"The goal of Homebench is to bridge the gap between theoretical model capabilities and actual hardware performance, ensuring users pick the most efficient model for their available resources."
The Three Core Metrics
Homebench focuses on a triad of performance indicators:
- Speed: Measured primarily in tokens per second (t/s).
- Memory: Tracking the peak VRAM and system RAM consumption.
- Quality: Ensuring that quantization hasn't degraded the model's intelligence.
Technical Deep Dive
1. Measuring Velocity
Speed isn't just a single number; it involves prompt processing (prefill) and token generation (decode). The throughput can be represented by the following LaTeX formula:
2. Memory Footprint
Memory usage is a critical bottleneck. Homebench monitors the memory overhead, including the model weights and the KV cache. The approximate memory requirement can be estimated as:
3. Quality Assurance
To ensure a model is still "smart" after being compressed (quantized), Homebench runs a suite of validation tests to check for hallucinations or logic failures.
The Benchmarking Workflow
The process of using Homebench follows a linear pipeline to ensure consistency across different test runs.
Getting Started
To begin benchmarking your local setup, follow this checklist:
- Install the Homebench CLI.
- Configure your
config.yamlwith your GPU IDs. - Download the target model (GGUF, EXL2, or AWQ).
- Run the initial calibration test.
Installation Example
You can set up the environment using the following commands:
# Clone the repository
git clone https://github.com/example/homebench.git
cd homebench
# Install dependencies
pip install -r requirements.txt
# Run a basic benchmark
python main.py --model ./models/llama-3-8b.Q4_K_M.gguf --benchmark all
Comparative Analysis
Below is an example of how Homebench outputs data when comparing two different quantization levels of the same model on a single RTX 3090.
| Model Version | Precision | Speed (t/s) | Peak VRAM | Quality Score |
|---|---|---|---|---|
| Llama-3-8B | FP16 | 12.4 | 16.2 GB | 98% |
| Llama-3-8B | Q4_K_M | 45.8 | 5.4 GB | 94% |
| Llama-3-8B | Q2_K | 62.1 | 3.8 GB | 72% |
Note: As shown above, moving from FP16 to Q4 provides a massive speed boost with minimal quality loss.
Visualizing Performance
Figure 1: The typical trade-off curve between memory compression and generation speed.
Final Summary
By utilizing inline_code for parameters and rigorous testing, Homebench transforms the "trial and error" method of local LLM deployment into a science. Whether you are optimizing for latency or intelligence, having a local benchmark is the only way to truly understand your hardware's limits.