OnnxRuntime class abstract

ONNX Runtime wrapper for neural network inference.

Provides lightweight inference for knowledge-distilled CodeBERT/DistilBERT models without Python dependencies.

Implementers

Constructors

OnnxRuntime()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes resources.
getEmbedding(List<int> inputIds) Future<List<double>>
Runs inference and returns embeddings.
loadModel(String modelPath) Future<void>
Loads an ONNX model from file.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

cosineSimilarity(List<double> a, List<double> b) double
Computes cosine similarity between two embeddings.