/triton-rs

Rust bindings to the Triton Inference Server

Primary LanguageRustMIT LicenseMIT

Rust bindings to the Triton Inference Server

Triton Rust API

See triton_rs documentation.

Implementing a backend

use triton_rs::Backend;

struct ExampleBackend;

impl Backend for ExampleBackend {
    fn model_instance_execute(
        model: triton_rs::Model,
        requests: &[triton_rs::Request],
    ) -> Result<(), triton_rs::Error> {

        for request in requests {
            // Handle inference request here
            todo!();
        }

        Ok(())
    }
}

// Register the backend with Triton
triton_rs::declare_backend!(ExampleBackend);

See example-backend for full example.