Skip to main content

Efficient inference library (ONNX) with pluggable backends (CPU / DirectML).

Project description

ryzenai-lite

ryzenai-lite is a small, minimal ONNX-based inference helper library that provides a clean public API to load ONNX models and run inference on CPU or GPU (DirectML/CUDA/ROCm when available). The library is intentionally minimal to make it easy to plug into small projects and demos.

Quick start

  1. Inspect model inputs:
python example/inspect_model.py
  1. Run a small SLM generation (greedy) with GPU (DirectML) preferred and CPU fallback:
python example/slm_run.py --model example/models/bert-tiny.onnx --prompt "Once upon a time" --max-new-tokens 16 --device dml
  1. GPU test (verify DirectML usage):
python example/gpu_simple_test.py

Public API

  • load_model(model_path: str, device_preference: Optional[List[str]] = None) -> Model
  • Model class with methods: warmup, run, run_once, dispose
  • device_info() -> dict of available providers and platform
  • benchmark_model(...) helper

See DOCUMENTATION.md for full details, examples and troubleshooting tips.

License

MIT

Generated on: 2025-11-01

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

ryzenai-0.0.1.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

ryzenai-0.0.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file ryzenai-0.0.1.tar.gz.

File metadata

  • Download URL: ryzenai-0.0.1.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for ryzenai-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c89c4affaf93dcf21fb2b39341488365ee0ef2a7328e27e18c2b26bca2030dde
MD5 d310ee1d2762026755e8e7ecbf15c943
BLAKE2b-256 4909a199c0cadc732ea7476e3c2fe882dc5e3ba21245d644601b03dba35ff269

See more details on using hashes here.

File details

Details for the file ryzenai-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: ryzenai-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for ryzenai-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 01328beb4b008677783f08bc9016228a9f1cdb24b1e945bc627ab7920b6b8ddd
MD5 ab4ba6b8a86fd8b6f6f6394089430072
BLAKE2b-256 0c033d1649b6f5d181c36fd0d69f1659a002872405d641f4f9f741e6af934ab7

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