Skip to main content

Benchmark your local LLMs.

Project description

🧮 Benchllama

An open-source tool to benchmark you local LLMs.

License: MIT PyPI Supported Versions GitHub: Downloads Discord

🔑 Key points

Benchllama helps with benchmarking your local LLMs. Currently, it only supports benchmarking models served via Ollama. By default, it pulls bigcode/humanevalpack from HuggingFace. There is an out of box support for evaluating code autocompletion models (you need to use --eval flag for triggering this). Currently, it supports the following languages: Python, JavaScript, Java, Go, C++. You can also bring your own dataset (see this example for helping you with creating one) by specifying the path to it in --dataset flag.

📜 Background

With the explosion of open source LLMs and toolbox to further customize these models like Modelfiles, Mergekit, LoRA etc, it can be daunting to end users to choose the right LLM. From our experience with running local LLMs, the two key metrics that matter are performance and quality of responses. We created a simple CLI tool that enables the users to pick right LLM by evaluating them across these two parameters.

Given our experience in coding LLMs, we felt it would be useful to add out-of-box support for calculating pass@k for autocompletion models. In case, if you are into coding LLMs, please checkout our related project i.e Privy (github repo, vscode link, openvsx link).

✨ Features

  • Evaluate: Evaluate the performance of your models on various tasks, such as code generation.
  • Clean: Clean up temporary files generated by Benchllama.

🚀 Installation

$ pip install benchllama

⚙️ Usage

$ benchllama [OPTIONS] COMMAND [ARGS]...

Options:

  • --install-completion: Install completion for the current shell.
  • --show-completion: Show completion for the current shell, to copy it or customize the installation.
  • --help: Show this message and exit.

Commands:

  • evaluate
  • clean

benchllama evaluate

Usage:

$ benchllama evaluate [OPTIONS]

Options:

  • --models TEXT: Names of models that need to be evaluated. [required]
  • --provider-url TEXT: The endpoint of the model provider. [default: http://localhost:11434]
  • --dataset FILE: By default, bigcode/humanevalpack from Hugging Face will be used. If you want to use your own dataset, specify the path here.
  • --languages [python|js|java|go|cpp]: List of languages to evaluate from bigcode/humanevalpack. Ignore this if you are brining your own data [default: Language.python]
  • --num-completions INTEGER: Number of completions to be generated for each task. [default: 3]
  • --no-eval / --eval: If true, evaluation will be done [default: no-eval]
  • --k INTEGER: The k for calculating pass@k. The values shouldn't exceed num_completions [default: 1, 2]
  • --samples INTEGER: Number of dataset samples to evaluate. By default, all the samples get processed. [default: -1]
  • --output PATH: Output directory [default: /tmp]
  • --help: Show this message and exit.

benchllama clean

Usage:

$ benchllama clean [OPTIONS]

Options:

  • --run-id TEXT: Run id
  • --output PATH: Output directory [default: /tmp]
  • --help: Show this message and exit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

benchllama-0.2.5.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

benchllama-0.2.5-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file benchllama-0.2.5.tar.gz.

File metadata

  • Download URL: benchllama-0.2.5.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/6.2.0-1019-azure

File hashes

Hashes for benchllama-0.2.5.tar.gz
Algorithm Hash digest
SHA256 adcc39cbb320e255b3882a8e659190f02cdb0cc78b3f96f3209aa93c422a9c3f
MD5 b69591a4c8d5db027e84276af4758e2f
BLAKE2b-256 be831de09ab855d04e19f34432f4d0aeccd6f805b81e039620d6aa71f91f38f7

See more details on using hashes here.

File details

Details for the file benchllama-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: benchllama-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/6.2.0-1019-azure

File hashes

Hashes for benchllama-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b171ce9592425f9b60e778087b0a1dc9ddff091e675e0366798b2fe977a4fc0a
MD5 ab9dd8ede3e7589126625c7fb961c233
BLAKE2b-256 a3801ecaf790593eb92bad836bc2aa00f203764947bf05c71e7784088a2e2840

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page