| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Before cecli was born, the old aider used benchmarks to quantitatively measure how well it works with various LLMs.
This directory holds the harness and tools needed to run the benchmarking suite.
If you're familiar with the aider benchmarking, see the "What's new..." section below.
The benchmark was based on the Exercism coding exercises. This benchmark evaluates how effectively aider and LLMs can translate a natural language coding request into executable code saved into files that pass unit tests. It provides an end-to-end evaluation of not just the LLM's coding ability, but also its capacity to edit existing code and format those code edits so that aider can save the edits to the local source files.
See this writeup for a longer discussion about the benchmark.
The benchmark is intended to be run inside a docker container. This is because the benchmarking harness will be taking code written by an LLM and executing it without any human review or supervision! The LLM could generate dangerous python that harms your system, like this: import os; os.system("sudo rm -rf /"). Running inside a docker container helps limit the damage that could be done.
The current harness (benchmark.py) organizes the exercises as "Cats": each exercise carries cat.yaml metadata, enabling per-test selection and deterministic subsets (e.g. --hash-re '^0') for spot-checking models. The canonical exercises source is ErichBSchulz/cecli-cats, a Cats-formatted conversion of the polyglot benchmark.
There are 3 main tasks involved in benchmarking:
Install and setup.
Run the benchmark.
Analysis.
These steps only need to be done once.
ORG=cecli-dev REPO=cecli # Clone the main repo git clone https://github.com/$ORG/$REPO.git # Create the scratch dir to hold benchmarking results inside the main repo: cd $REPO mkdir tmp.benchmarks # Clone the canonical exercises source for the Cats harness git clone https://github.com/ErichBSchulz/cecli-cats tmp.benchmarks/cecli-cats # Build the docker container ./benchmark/docker_build.sh
Launch the docker container and run the benchmark inside it:
# Launch the docker container # You probably want to tweak this script to import your service keys. # It's currently configured to import OPENROUTER_API_KEY. # PR's welcome to more effectively grab the keys without causing anxiety. ./benchmark/docker.sh # Run the benchmark: ./benchmark/benchmark.py a-helpful-name-for-this-run --model gpt-3.5-turbo --edit-format whole --threads 10 --exercises-dir cecli-cats # Or with OpenRouter models (requires OPENROUTER_API_KEY environment variable): ./benchmark/benchmark.py openrouter-run --model openrouter/deepseek/deepseek-r1:free --edit-format whole --threads 10 --exercises-dir cecli-cats
The above will create a folder tmp.benchmarks/YYYY-MM-DD-HH-MM-SS--a-helpful-name-for-this-run with benchmarking results. Run like this, the script will run all the exercises in a random order.
You can run ./benchmark/benchmark.py --help for a list of all the arguments, but here are the most useful to keep in mind:
You can generate stats about any benchmark, including ones which are still running. You don't need to run this inside the docker container, as it is just collecting stats not executing unsafe python.
# Generate stats for a specific benchmarking directory ./benchmark/benchmark.py --stats tmp.benchmarks/YYYY-MM-DD-HH-MM-SS--a-helpful-name-for-this-run
The benchmark report is a yaml record with statistics about the run.
The key statistics are the pass_rate_# entries, which report the percent of the tasks which had all tests passing. There will be multiple of these pass rate stats, depending on the value of the --tries parameter.
The yaml also includes all the settings which were in effect for the benchmark run. It also reports the git hash of the repo at the time that the benchmark was run, with (dirty) if there were uncommitted changes. It's good practice to commit the repo before starting a benchmark run. This way the model, edit_format and commit_hash should be enough to reliably reproduce any benchmark run.
Contributions of benchmark results and tests are welcome! Submit results by opening a PR.
Note the roadmap priorities:
The benchmark has evolved into a collection of Cecli Atomic Tests (Cats).
| Back | FazBrowse Home | New Git URL |