TinyEval: A tiny evaluation framework for language models
Project description
Tiny-Eval
Tiny-Eval is a minimal framework for evaluating language models. It provides a clean, async-first API for interacting with various LLM providers and running evaluation experiments.
Features
-
Multi-Provider Support
- OpenAI API integration
- OpenRouter API integration for access to multiple model providers
- Extensible interface for adding new providers
-
Robust API Handling
- Automatic rate limiting with configurable parameters
- Built-in exponential backoff retry logic
- Async-first design for efficient request handling
-
Evaluation Utilities
- Log probability calculation support
- Async function chaining for complex evaluation pipelines
- Batch processing capabilities
-
Experiment Framework
- Progress tracking for long-running experiments
- Structured data collection and analysis
- Built-in visualization tools using Streamlit
Installation
git clone https://github.com/dtch1997/tiny-eval.git
cd tiny-eval
pip install -e .
Usage
Minimal usage is shown as follows:
import asyncio
from tiny_eval.core.constants import Model
from tiny_eval.model_api import build_model_api
async def main():
model = Model.GPT_4o_mini
api = build_model_api(model)
question = "What is the capital of France?"
response = await api.get_response(question)
print("Question:", question)
print("Response:", response)
if __name__ == "__main__":
asyncio.run(main())
See examples for more examples.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tiny_eval-0.4.0.tar.gz.
File metadata
- Download URL: tiny_eval-0.4.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e9a236d3a8afcc6d7a7c6d7d4695c1700806b19f2d062e39d2de11b9eedf545
|
|
| MD5 |
91976a4eb0903ceb5e25263cee40e704
|
|
| BLAKE2b-256 |
52e351cdf95ef9084912bbfa309ce03b433bdbd70c2c62b74278f08f419e10e9
|
Provenance
The following attestation bundles were made for tiny_eval-0.4.0.tar.gz:
Publisher:
manual_publish.yaml on dtch1997/tiny-eval
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tiny_eval-0.4.0.tar.gz -
Subject digest:
1e9a236d3a8afcc6d7a7c6d7d4695c1700806b19f2d062e39d2de11b9eedf545 - Sigstore transparency entry: 171215584
- Sigstore integration time:
-
Permalink:
dtch1997/tiny-eval@724409cb1cd9f88d0d3370bc2a02ee22d7df4b7e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dtch1997
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
manual_publish.yaml@724409cb1cd9f88d0d3370bc2a02ee22d7df4b7e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file tiny_eval-0.4.0-py3-none-any.whl.
File metadata
- Download URL: tiny_eval-0.4.0-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b310d460feb104fa41e123e7fc810200e180180c9e0308f1b0306429db5447ac
|
|
| MD5 |
bcf057e2b5ad7580ed9b8f874b28adfb
|
|
| BLAKE2b-256 |
56946850d4e2248dbce6214fb0b36cd9c652f1de280136e2bdc7c0caa7887d39
|
Provenance
The following attestation bundles were made for tiny_eval-0.4.0-py3-none-any.whl:
Publisher:
manual_publish.yaml on dtch1997/tiny-eval
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tiny_eval-0.4.0-py3-none-any.whl -
Subject digest:
b310d460feb104fa41e123e7fc810200e180180c9e0308f1b0306429db5447ac - Sigstore transparency entry: 171215585
- Sigstore integration time:
-
Permalink:
dtch1997/tiny-eval@724409cb1cd9f88d0d3370bc2a02ee22d7df4b7e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dtch1997
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
manual_publish.yaml@724409cb1cd9f88d0d3370bc2a02ee22d7df4b7e -
Trigger Event:
workflow_dispatch
-
Statement type: