Skip to main content

onnx-genai command-line tool and OpenAI-compatible server (ONNX Runtime backend)

Project description

onnx-genai-server

The onnx-genai command-line tool and OpenAI-compatible server, backed by ONNX Runtime.

pip install onnx-genai-server            # CPU (all platforms; MLX on macOS)
pip install onnx-genai-server[cuda]      # + CUDA 13 / cuDNN 9 (Windows/Linux)

ONNX Runtime is not bundled. The command loads libonnxruntime from the installed onnxruntime (CPU) or onnxruntime-gpu (CUDA) wheel at startup, so it uses whichever execution providers you installed.

Commands

onnx-genai serve --models-dir ./models       # OpenAI-compatible HTTP server
onnx-genai generate --model ./model "Hello"  # one-shot generation
onnx-genai run --model ./model               # interactive REPL
onnx-genai show ./model                       # resolved files + metadata
onnx-genai list --models-dir ./models         # list models
onnx-genai version                            # version + execution providers

generate, run, and show accept either a model directory or a config file inside it (a file resolves to its parent directory).

Runtime selection

Choose an execution provider at runtime with ONNX_GENAI_EP (e.g. cpu, cuda). CUDA requires the [cuda] extra (or a separately installed onnxruntime-gpu). On Apple Silicon, the onnxruntime-ep-mlx plugin is installed by default.

Python 3.11+ is required (the onnxruntime dependency ships no earlier wheels).

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

onnx_genai_server-0.1.0.dev3.tar.gz (2.5 MB view details)

Uploaded Source

Built Distributions

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

onnx_genai_server-0.1.0.dev3-cp310-abi3-win_arm64.whl (7.8 MB view details)

Uploaded CPython 3.10+Windows ARM64

onnx_genai_server-0.1.0.dev3-cp310-abi3-win_amd64.whl (8.4 MB view details)

Uploaded CPython 3.10+Windows x86-64

onnx_genai_server-0.1.0.dev3-cp310-abi3-manylinux_2_28_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

onnx_genai_server-0.1.0.dev3-cp310-abi3-macosx_11_0_arm64.whl (7.7 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file onnx_genai_server-0.1.0.dev3.tar.gz.

File metadata

  • Download URL: onnx_genai_server-0.1.0.dev3.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for onnx_genai_server-0.1.0.dev3.tar.gz
Algorithm Hash digest
SHA256 2dad1df8cb407d819651fb02c30aa9d2488698ccefd82cfda681041e63789163
MD5 d5cda61f26f1145409bfa2bd49516d1f
BLAKE2b-256 dd8f516c0368a5b8ad79e08e5f910636018df31518f8847bdb3a0571e770aa86

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnx_genai_server-0.1.0.dev3.tar.gz:

Publisher: publish.yml on justinchuby/onnx-genai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file onnx_genai_server-0.1.0.dev3-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for onnx_genai_server-0.1.0.dev3-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 3747cbf3e37b333868396baf95e91559908d5d1b2e2e16a641dc5f5c2735de0f
MD5 fd5e73b9cf4f4c9ec2200e5c951177a3
BLAKE2b-256 720a3d79147460373ea56dd626da62706a20d298827b9331e52929cd998aa408

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnx_genai_server-0.1.0.dev3-cp310-abi3-win_arm64.whl:

Publisher: publish.yml on justinchuby/onnx-genai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file onnx_genai_server-0.1.0.dev3-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for onnx_genai_server-0.1.0.dev3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 37d5398662992c271f30f747309d0a2048c79b1cf2e40a6ea848e673a51a53ae
MD5 a47200c56dd1a1ce8ac9c75d3ec5fac4
BLAKE2b-256 3eab5bb83f45bcd4df7c378a1ef7656ae820139ad13a2e266cbee6c7818a6e62

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnx_genai_server-0.1.0.dev3-cp310-abi3-win_amd64.whl:

Publisher: publish.yml on justinchuby/onnx-genai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file onnx_genai_server-0.1.0.dev3-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for onnx_genai_server-0.1.0.dev3-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 94e25bdb6f0bea3b0e3edc5d2703fab40415a8fb4a4a484b6e7de2065948bf09
MD5 ae27cbec064b662686229b918cb021a6
BLAKE2b-256 b714caa4a5b5597fa8b65d8bb333e71ec06d67ab763f2e9b7237f44c323f9025

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnx_genai_server-0.1.0.dev3-cp310-abi3-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on justinchuby/onnx-genai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file onnx_genai_server-0.1.0.dev3-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for onnx_genai_server-0.1.0.dev3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7bbb58af7d184f3bce4baeaae473dd764abb023fed1483681691c51d754fa073
MD5 988f471e3ce1a50389c2c8fa5f6b5c3a
BLAKE2b-256 78a65fb29487ccfaa6d4179a1a34a01204931b36114b96d6c8357e7dccf92e5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnx_genai_server-0.1.0.dev3-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: publish.yml on justinchuby/onnx-genai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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