Skip to main content

AI Runtime & Benchmark Intelligence Library

Project description

RUNINT: AI Runtime & Benchmark Intelligence

PyPI version License: MIT

RunInt is an open-source library designed to standardize how AI models are deployed (Run Intelligence) and measured (Benchmark Intelligence).

It serves as the universal adapter between high-level configuration intents ("I want to run Llama3 on a T4 GPU") and concrete, executable environments (Docker, Ollama, vLLM).

[Image of RunInt Library Architecture]


๐Ÿš€ Key Features

  • Run Intelligence:

    • Agnostic Config: Define your AI runtime in a clean JSON/YAML format.
    • Auto-Deployment: Generates production-ready docker-compose.yml files for Ollama, vLLM, and others.
    • Hardware Aware: Automatically detects GPU capabilities to optimize container settings.
  • Benchmark Intelligence:

    • Standardized Metrics: Measures Latency, Throughput (tokens/s), and Quality (Accuracy/BLEU) in a unified format.
    • Context Capture: Every result is tagged with the exact hardware (GPU/CPU) and software version it ran on.
    • Extensible Registry: Easily add new tasks (OCR, Audio, Vision) via a simple Python decorator.

๐Ÿ“ฆ Installation

pip install runint

Requirements: Python 3.10+, Docker (for deployment features)

๐Ÿ›  Usage

1. Run Intelligence (Deployment)

Instead of writing complex Dockerfiles, use a Run Config.

config.json


{
  "project_name": "local_inference",
  "engine": {
    "provider": "ollama",
    "gpu_count": 0,
    "container_image": "ollama/ollama:latest"
  },
  "models": [
    { 
        "name": "llama3", 
        "source": "ollama_library" 
    }
  ]
}
Deploy it


# Generates docker-compose.yml and instructions
runint deploy --config config.json

# (Optional) Perform a dry-run to just see the generated file
runint deploy --config config.json --dry-run

2. Benchmark Intelligence (Measurement)

Once your engine is running (localhost or remote), run standard benchmarks against it.

# List available benchmarks:
runint info
# Run a benchmark:
runint benchmark \
  --task translation_en_de_v1 \
  --engine ollama \
  --model llama3 \
  --iterations 10
# Output:

Running translation_en_de_v1 on llama3 via ollama...
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Run ID   โ”ƒ Latency (ms) โ”ƒ Metrics                       โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ a1b2c3d4 โ”‚        45.20 โ”‚ {'exact_match': 1.0}          โ”‚
โ”‚ e5f6g7h8 โ”‚        48.10 โ”‚ {'exact_match': 0.0}          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Average Latency: 46.65 ms

๐Ÿงฉ For Contributors

We welcome contributions! RunInt is designed to be modular.

Adding a New Benchmark

  1. Create a new file in src/runint/benchmarks/your_category/.

  2. Inherit from BaseBenchmark.

  3. Decorate with @register_benchmark

from runint.benchmarks.base import BaseBenchmark
from runint.benchmarks.registry import register_benchmark

@register_benchmark(name="my_new_task", task_type="custom", description="My cool test")
class MyBenchmark(BaseBenchmark):
    def load_data(self):
        return [{"input": "test"}]
    
    def run_inference(self, item):
        return "result"
        
    def calculate_metrics(self, pred, truth):
        return {"score": 100}
# Development Setup

git clone [https://github.com/filipzupancic/runint.git](https://github.com/filipzupancic/runint.git)
cd runint
poetry install
poetry run pytest

๐Ÿ”— Integration

RUNINT is designed to be consumed by other applications.

  • Python API:
from runint.schemas.config import RunConfig
from runint.runtime.manager import RuntimeManager

config = RunConfig(...)
manager = RuntimeManager(config)
manager.generate_deployment()
  • Benchmark Data: All benchmark results are exported as standardized JSON objects (BenchmarkReport), making it easy to ingest data into analytics backends.

๐Ÿ“„ License

MIT License. See LICENSE for details.

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

runint-0.1.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

runint-0.1.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file runint-0.1.0.tar.gz.

File metadata

  • Download URL: runint-0.1.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.14.0-35-generic

File hashes

Hashes for runint-0.1.0.tar.gz
Algorithm Hash digest
SHA256 08adf34e4136d97544aea2a14c5b27a0c0e52c59cf902cec544ee04506a87e46
MD5 177c24fd6db2109f6378dabd17038b80
BLAKE2b-256 8bd76b246c5f40a64120eba7a5bcd519f392a766bfe34a92dc6099cc54724dfb

See more details on using hashes here.

File details

Details for the file runint-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: runint-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.14.0-35-generic

File hashes

Hashes for runint-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d28d95f66757e1446720e129d17f6162f14d4cfed10f07d001eeaa07d8038fb0
MD5 3025a700ac18ef2c15fcb1d77016af41
BLAKE2b-256 d0566260982e7bc83160ce4015847effad197a59317d8cf1f9af2a3adbc79cfe

See more details on using hashes here.

Supported by

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