dort 0.1.0 copy "dort: ^0.1.0" to clipboard
dort: ^0.1.0 copied to clipboard

ONNX Runtime inference for Dart, powered by the ort Rust crate.

dort #

pub package

ONNX Runtime (ort) for Dart.

Requires Rust toolchain (rustup). The native library compiles automatically via Dart Native Assets on first dart run / flutter build.

Usage #

import 'package:dort/dort.dart';

final session = Session.load('model.onnx');

final outputs = session.run([
  Tensor.i64('input_ids', tokenIds, [1, seqLen]),
  Tensor('hidden_states', floatData, [1, 256]),
]);

final result = outputs.first; // Float32List
session.dispose();
0
likes
150
points
0
downloads

Documentation

API reference

Publisher

verified publishergau.moe

Weekly Downloads

ONNX Runtime inference for Dart, powered by the ort Rust crate.

Repository (GitHub)
View/report issues

Topics

#onnx #machine-learning

License

MIT (license)

Dependencies

ffi, hooks, native_toolchain_rust

More

Packages that depend on dort