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
- Inspect model inputs:
python example/inspect_model.py
- 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
- GPU test (verify DirectML usage):
python example/gpu_simple_test.py
Public API
load_model(model_path: str, device_preference: Optional[List[str]] = None) -> ModelModelclass with methods:warmup,run,run_once,disposedevice_info()-> dict of available providers and platformbenchmark_model(...)helper
See DOCUMENTATION.md for full details, examples and troubleshooting tips.
License
MIT
Generated on: 2025-11-01
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c89c4affaf93dcf21fb2b39341488365ee0ef2a7328e27e18c2b26bca2030dde
|
|
| MD5 |
d310ee1d2762026755e8e7ecbf15c943
|
|
| BLAKE2b-256 |
4909a199c0cadc732ea7476e3c2fe882dc5e3ba21245d644601b03dba35ff269
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01328beb4b008677783f08bc9016228a9f1cdb24b1e945bc627ab7920b6b8ddd
|
|
| MD5 |
ab4ba6b8a86fd8b6f6f6394089430072
|
|
| BLAKE2b-256 |
0c033d1649b6f5d181c36fd0d69f1659a002872405d641f4f9f741e6af934ab7
|