Skip to main content

LBI: LLM Batch Inference

Many LLM providers offer 50% token discounts by using batches. This project wraps each provider's batch API in a unified interface.

Running Tests

To run the unit tests:

uv run pytest

To run the integration tests:

uv run pytest -m integration

Use the verbose flag -v to get more detailed output and use the -n flag to run multiple tests in parallel (-n auto runs one test per CPU core in parallel).

Example:

uv run pytest -n auto -v -m integration

You can also run specific tests and fixtures by keyword:

uv run pytest -n auto -v -m integration -k 'full_batch_lifecycle and mistral'

Publishing to PyPI

  1. Bump the version in [pyproject.toml](./pyproject.toml):

    version = "0.1.2"
    
  2. Build the package:

    uv build
    
  3. Publish package:

    uv publish
    
  4. Add tag in Git:

    git add pyproject.toml
    git commit -m "Bump version to 0.1.2"
    git tag v0.1.2
    git push origin main --tags
    

Download files

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

Source Distribution

llm_batch_inference-0.1.8.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

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

llm_batch_inference-0.1.8-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file llm_batch_inference-0.1.8.tar.gz.

File metadata

  • Download URL: llm_batch_inference-0.1.8.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for llm_batch_inference-0.1.8.tar.gz
Algorithm Hash digest
SHA256 85fbe7c7456615d04aded33f3da582fd01adf9fbff1b3ebb63e98660c8249e26
MD5 e8e8d7b02d3d1e3a554f1da3307c35fc
BLAKE2b-256 71df01d231462cb4e57a51380c1953e1a78904ed6d734ce60bd1edf548b6e129

See more details on using hashes here.

File details

Details for the file llm_batch_inference-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: llm_batch_inference-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for llm_batch_inference-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 fcc27a479ccc4edc7985726d547ce8076be92f9d500838b1d3748d74f511ddc1
MD5 a4dfddbdb43313a9647bec37ca988ac6
BLAKE2b-256 041f1fbfa4a674958a0714a753c4732386485a90403b9ed37d1ec0224c9bb305

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 Sentry Error logging StatusPage Status page