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.7.tar.gz (16.0 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.7-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_batch_inference-0.1.7.tar.gz
  • Upload date:
  • Size: 16.0 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.7.tar.gz
Algorithm Hash digest
SHA256 1c04e6714e6acbef7a3003a82f80016154109ba2beca1a7ed8756365c2ffd22c
MD5 7c59ac2e8fb7e36534deba0fb76e0f24
BLAKE2b-256 5c6c068f2afb5018db6a43170908e4f470622d4ae32e0ff7d0a97cfa0f749a31

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llm_batch_inference-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 24.3 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b009dbdb8dd8e8f46f23386f79dda76f043d90d3aa20befcc3a7b02dec3eb1a1
MD5 15ead9da59d5817ea9a022d2c2c99d1b
BLAKE2b-256 15c75b4ca535b5da91eea9b89011d7f8bd21096afcf7fee6f6baec217eebfe06

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