RedLite
An opinionated toolset for testing Conversational Language Models.
Documentation
https://innodatalabs.github.io/redlite/
Usage
-
Install required dependencies
pip install redlite[all]
-
Generate several runs (using Python scripting, see examples, and below)
-
Review and compare runs
redlite server --port <PORT>
-
Optionally, upload to Zeno
ZENO_API_KEY=zen_XXXX redlite upload
Python API
import os
from redlite import run, load_dataset
from redlite.model.openai_model import OpenAIModel
from redlite.metric import MatchMetric
model = OpenAIModel(api_key=os.environ["OPENAI_API_KEY"])
dataset = load_dataset("hf:innodatalabs/rt-gsm8k-gaia")
metric = MatchMetric(ignore_case=True, ignore_punct=True, strategy='prefix')
run(model=model, dataset=dataset, metric=metric)
Note: the code above uses OpenAI model via their API.
You will need to register with OpenAI and get an API access key, then set it in the environment as OPENAI_API_KEY.
Goals
- simple, easy-to-learn API
- lightweight
- only necessary dependencies
- framework-agnostic (PyTorch, Tensorflow, Keras, Flax, Jax)
- basic analytic tools included
Develop
python -m venv .venv
. .venv/bin/activate
pip install -e .[dev,all]
Make commands:
- test
- test-server
- lint
- wheel
- docs
- docs-server
- black
Zeno <zenoml.com> integration
Benchmarks can be uploaded to Zeno interactive AI evaluation platform <hub.zenoml.com>:
redlite upload --project my-cool-project
All tasks will be concatenated and uploaded as a single dataset, with extra fields:
task_iddatasetmetric
All models will be uploaded. If model was not tested on a specific task, a simulated zero-score dataframe is used instead.
Use task_id (or dataset as appropriate) to create task slices. Slices can be used to
navigate data or create charts.
Serving as a static website
UI server data and code can be exported to a local directory that then can be served statically.
This is useful for publishing as a static website on cloud storage (S3, Google Storage).
redlite server-freeze /tmp/my-server
gsutil -m rsync -R /tmp/my-server gs://{your GS bucket}
Note that you have to configure cloud bucket in a special way, so that cloud provider serves it as a website. How to do this depends on the cloud provider.
TODO
- deps cleanup (randomname!)
- review/improve module structure
- automate CI/CD
- write docs
- publish docs automatically (CI/CD)
- web UI styling
- better test server
- tests
- Integrate HF models
- Integrate OpenAI models
- Integrate Anthropic models
- Integrate AWS Bedrock models
- Integrate vLLM models
- Fix data format in HF datasets (innodatalabs/rt-* ones) to match standard
- more robust backend API (future-proof)
- better error handling for missing deps
- document which deps we need when
- export to CSV
- Upload to Zeno
Metadata
Release files for redlite 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| redlite-0.4.3-py3-none-any.whl | Python 3 | none | any | Details for redlite-0.4.3-py3-none-any.whl |
Release files / redlite-0.4.3-py3-none-any.whl
| Download URL | redlite-0.4.3-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
199464b21e801121ed2027852cc675f738fc1c69af564173d8cb8430713684b7
|
|
BLAKE2b-256 checksum How to use checksums |
74973c3fa131c1f02a595423039ed9520541843a94fbb47407ec2433557b66cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.14
|
Security for redlite 0.4.3
Provenance
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.
No provenance found
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.