Skip to main content Switch to mobile version lemonmatrix 0.1.5 Benchmark Lemonade local AI servers and publish comparable, validated results.
pip install lemonmatrix==0.1.5 Copy PIP instructions
A benchmarking control plane for Lemonade instances. One profile = one Lemonade instance, auto-discovered and reused as the environment fingerprint for every run on that machine. See schema/result.schema.json for the canonical result schema.
Live public leaderboard: lemonmatrix.github.io · Demo video (3 min) -- results and the site's own generator live in the sibling LemonMatrix/lemonmatrix.github.io repo; this repo is code (CLI, library, tests, schema) only. Community submissions go through a PR adding a result JSON under results/
pip install lemonmatrix Python 3.10 or newer. The step-by-step guide walks from a running Lemonade to a result on the leaderboard.
To work on LemonMatrix itself:
git clone https://github.com/Bekhouche/LemonMatrix.git cd LemonMatrix pip install -e ".[dev]" Quickstart
# Find a Lemonade instance running on this machine and save it as a profile. lemonmatrix profile detect --save my-machine # Or add one you already know the address of. lemonmatrix profile add my-machine --host 192.168.1.42 --port 13305 --token $LEMONADE_API_KEY lemonmatrix profile list lemonmatrix profile show my-machine # Run a sweep and write a schema-conformant result JSON under results/. # OS isn't a flag -- it's derived from the profile's own discovered # environment, since a different OS is a different profile, not a per-run # setting. lemonmatrix run --profile my-machine \ --model Llama-3.1-8B-Instruct-GGUF --model-class dense --quant Q4_K_M \ --context-length 4096 --engine igpu --backend llama.cpp-vulkan \ --power-state plugged # Browse profiles and results, or launch new sweeps, from a local dashboard. lemonmatrix dashboard lemonmatrix profile detect --subnet 192.168.1.0/24 extends the scan to a LAN range for the multi-machine fleet case. Lemonade has no announce/broadcast mechanism, so this is a bounded port scan, not magic discovery -- capped at 1024 hosts per scan.
What a model run measures
Each trial sends the same prompt with cache_prompt: false, so llama.cpp processes the whole prompt every time instead of serving it from its prompt cache, while the model stays loaded (warmups are real warmups). TTFT and prefill therefore time the prompt, not a cache hit. Each trial records the server's cache_tokens; a run where any measured trial still reused cached prompt tokens is marked invalid. Results from LemonMatrix 0.1.0 and earlier did not do this, so their TTFT and prefill are cache-assisted (decode is not affected).
A run also records whether any other model stayed loaded on the instance while it was measured (validity.other_models_resident). An idle model still holds memory: on a 32 GB R9700 with Qwen3.5-35B-A3B and Qwen3.5-9B idle, Qwen3-4B decoded at 21 tok/s instead of 171. Such a run is not ranked. --unload-others on run and sweep unloads everything first; it is off by default because a profile can point at a server other people are using.
A collection.router that mixes local and cloud candidates answers one question: how much of the cloud bill does local hardware take over? Give the router a mixed prompt set and LemonMatrix records where each request went and prices it:
lemonmatrix run --profile my-machine --run-type router \ --model user.My-Router --context-length 4096 --power-state plugged \ --prompt-set router-mix --trials 10 The result's metrics.routing block holds the share of requests per candidate, the share that stayed local, the cost of the run, and the cost of sending every request to the most expensive candidate instead. Prices are USD per million tokens. They come from Lemonade's own estimated_cost when the candidate carries cost metadata (cloud models get it from their provider), and non-cloud candidates count as free. --cost MODEL=IN,OUT sets or overrides a price, --cost-baseline MODEL picks the comparison model, and --prompts-file takes your own prompts (one per line, or JSONL).
After the trials, each prompt the router sent elsewhere goes once to the baseline model, and the baseline is priced on the tokens that model actually wrote. This matters for reasoning models, which can write ten times the tokens of a small local model for the same prompt. The extra requests run outside the measured window; --estimate-baseline skips them and reuses the routed model's token counts, and the result's baseline_method says which was used.
A Lemonade collection.omni model (for example LMX-Omni-5.5B-Lite: an LLM planner plus image, speech and transcription models) takes a chat request and runs the tool loop itself, returning images and audio embedded in the answer. lemonmatrix omni sends it a fixed task set (omni-basic: text, image, speech, and image plus speech) and measures each task end to end:
lemonmatrix omni --profile my-machine --model LMX-Omni-5.5B-Lite --power-state plugged --unload-others The result has the success rate (did the answer contain the image and/or audio the task asked for), latency per category and tasks per minute. The omni model's components count as the run's own models; anything else loaded makes the run invalid, as for every other run. Results go to results/
Lemonade reports an Apple GPU as a metal device. It shares memory with the CPU, so LemonMatrix treats it as an integrated GPU: use --engine igpu with a -metal backend (llamacpp-metal, whispercpp-metal, sd-cpp-metal):
lemonmatrix run --profile my-mac \ --model Qwen3-1.7B-GGUF --model-class dense --quant Q4_0 \ --context-length 4096 --engine igpu --backend llamacpp-metal \ --power-state plugged Ryzen AI NPU and hybrid runs
Lemonade's ryzenai-llm recipe has one backend, ryzenai-llm-npu, and the model's name says where it runs: -Hybrid (NPU and iGPU), -NPU or -CPU. FastFlowLM (flm-npu) runs every model on the NPU. LemonMatrix takes the engine from the model, so a run whose --engine contradicts it is refused, and lemonmatrix sweep without --engine runs each of these models on its own engine:
lemonmatrix sweep --profile my-laptop --backend ryzenai-llm-npu \ --model Llama-3.2-1B-Instruct-Hybrid --model Llama-3.2-1B-Instruct-NPU \ --model Llama-3.2-1B-Instruct-CPU --power-state plugged Lemonade reports the device npu for every ryzenai-llm model, whatever its deployment, so for -Hybrid and -CPU models the device check cannot confirm the engine; the result is still ranked and its notes say so.
lemonmatrix submit results/my-machine/
Importing other tools' results
lemonmatrix dashboard starts a local Flask app (default http://127.0.0.1:5050) with:
A sortable, filterable leaderboard over every result under results/.
Profile management: detect, add, and inspect environment fingerprints.
A form to launch a new sweep against a saved profile (runs synchronously, same as the CLI's run command).
It's a single-user local tool with no job queue -- submitting a run blocks the page until the sweep finishes.
pytest tests/ Tests run against a fake Lemonade server (tests/conftest.py) modeled on the documented /api/v1/* response shapes, so they don't require real AMD hardware.
Released: Dec 5, 2026
Author: Salah Eddine Bekhouche
Apache-2.0 View SPDX License List
lemonade benchmark llm local-ai amd ryzen-ai radeon llama.cpp
Development Status 3 - Alpha
Intended Audience Developers
Operating System OS Independent
Programming Language Python :: 3
Topic Scientific/Engineering :: Artificial Intelligence
Release files for lemonmatrix 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 385.9 kB
Release files / lemonmatrix-0.1.5.tar.gz
Release files / lemonmatrix-0.1.5-py3-none-any.whl
Security for lemonmatrix 0.1.5
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 5, 2026 2 release files No provenance
Nov 24, 2026 2 release files No provenance
Nov 14, 2026 2 release files No provenance
Nov 11, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 4d99e05











