Documentation
¶
Overview ¶
Package onnxcraft runs ONNX models with a managed native runtime.
Open initializes ONNX Runtime, verifies and caches the native library when needed, and returns a Runtime that can create context-aware sessions.
Index ¶
- Constants
- Variables
- func BorrowBufferData[T BufferElement](buffer *TensorBuffer) ([]T, error)
- func BorrowData[T TensorData](tensor Tensor) ([]T, error)
- func BorrowRawBufferData(buffer *TensorBuffer) ([]byte, error)
- func BorrowRawData(tensor Tensor) ([]byte, error)
- func BufferData[T BufferElement](buffer *TensorBuffer) ([]T, error)
- func Data[T TensorData](tensor Tensor) ([]T, error)
- func RawBufferData(buffer *TensorBuffer) ([]byte, error)
- func RawData(tensor Tensor) ([]byte, error)
- type BufferElement
- type DataType
- type ExecutionMode
- type ExecutionProviderDevice
- type LoggingLevel
- type ModelInfo
- type ModelMetadata
- type OptimizationLevel
- type Runtime
- func (r *Runtime) Close() error
- func (r *Runtime) ExecutionProviderDevices() ([]ExecutionProviderDevice, error)
- func (r *Runtime) Info() (RuntimeInfo, error)
- func (r *Runtime) Inspect(modelPath string, options ...SessionOption) (result ModelInfo, resultErr error)
- func (r *Runtime) InspectBytes(model []byte, options ...SessionOption) (result ModelInfo, resultErr error)
- func (r *Runtime) Load(modelPath string, options ...SessionOption) (*Session, error)
- func (r *Runtime) LoadBytes(model []byte, options ...SessionOption) (*Session, error)
- func (r *Runtime) LoadedVersion() (string, error)
- func (r *Runtime) NewSession(modelPath string, inputNames []string, outputNames []string, ...) (*Session, error)
- func (r *Runtime) NewSessionFromBytes(model []byte, inputNames []string, outputNames []string, ...) (*Session, error)
- func (r *Runtime) NewSessionFromInfo(modelPath string, info ModelInfo, options ...SessionOption) (*Session, error)
- func (r *Runtime) RequireVersion(minimum string) error
- type RuntimeInfo
- type RuntimeOption
- type Session
- func (s *Session) Close() error
- func (s *Session) InputNames() []string
- func (s *Session) Inputs() []ValueInfo
- func (s *Session) Metadata() (result ModelMetadata, resultErr error)
- func (s *Session) OutputNames() []string
- func (s *Session) Outputs() []ValueInfo
- func (s *Session) Run(ctx context.Context, inputs ...Tensor) (result []Tensor, resultErr error)
- func (s *Session) RunInto(ctx context.Context, outputs []*TensorBuffer, inputs ...Tensor) (resultErr error)
- func (s *Session) RunIntoNamed(ctx context.Context, inputs map[string]Tensor, ...) error
- func (s *Session) RunNamed(ctx context.Context, inputs map[string]Tensor) (map[string]Tensor, error)
- type SessionOption
- func WithCPUMemoryArena(enabled bool) SessionOption
- func WithCUDA(settings map[string]string) SessionOption
- func WithCoreML(settings map[string]string) SessionOption
- func WithCustomOperators(path string) SessionOption
- func WithDirectML(deviceID int) SessionOption
- func WithExecutionMode(mode ExecutionMode) SessionOption
- func WithExecutionProvider(name string, settings map[string]string) SessionOption
- func WithInterOpThreads(count int) SessionOption
- func WithIntraOpThreads(count int) SessionOption
- func WithLogging(level LoggingLevel) SessionOption
- func WithMemoryPattern(enabled bool) SessionOption
- func WithOpenVINO(settings map[string]string) SessionOption
- func WithOptimization(level OptimizationLevel) SessionOption
- func WithOptimizedModel(path string) SessionOption
- func WithProfiling(prefix string) SessionOption
- func WithSessionConfig(key, value string) SessionOption
- func WithTensorRT(settings map[string]string) SessionOption
- type Tensor
- func MustTensor[T TensorData](shape []int64, data []T) Tensor
- func NewRawTensor(shape []int64, dataType DataType, data []byte) (Tensor, error)
- func NewTensor[T TensorData](shape []int64, data []T) (Tensor, error)
- func TakeRawTensor(shape []int64, dataType DataType, data []byte) (Tensor, error)
- func TakeTensor[T TensorData](shape []int64, data []T) (Tensor, error)
- type TensorBuffer
- type TensorData
- type ValueInfo
- type ValueKind
Constants ¶
const RuntimeVersion = "1.29.0"
RuntimeVersion is the native ONNX Runtime version used by onnxcraft.
Variables ¶
var ErrRuntimeCorrupt = errors.New("onnxcraft: cached native runtime is corrupt")
ErrRuntimeCorrupt is returned when a cached native runtime fails integrity or file-type validation.
var ErrRuntimeNotCached = errors.New("onnxcraft: native runtime is not cached")
ErrRuntimeNotCached is returned when offline mode cannot find a verified bundled native runtime.
var ErrRuntimeTooOld = errors.New("onnxcraft: ONNX Runtime version is too old")
ErrRuntimeTooOld is returned when a model requires a newer ONNX Runtime than the loaded native library.
Functions ¶
func BorrowBufferData ¶
func BorrowBufferData[T BufferElement](buffer *TensorBuffer) ([]T, error)
BorrowBufferData returns a read-only view of the buffer elements without copying. The view remains valid until the buffer is passed to RunInto again. Callers must not access it concurrently with RunInto.
func BorrowData ¶
func BorrowData[T TensorData](tensor Tensor) ([]T, error)
BorrowData returns a read-only view of tensor's elements as T without copying them. The caller must not modify the returned slice. Use Data when ownership or mutation is required.
func BorrowRawBufferData ¶
func BorrowRawBufferData(buffer *TensorBuffer) ([]byte, error)
BorrowRawBufferData returns a read-only view of a raw output buffer's bytes. The view remains valid until the buffer is passed to RunInto again.
func BorrowRawData ¶
BorrowRawData returns a read-only view of a raw tensor's encoded bytes. The caller must not modify the returned slice.
func BufferData ¶
func BufferData[T BufferElement](buffer *TensorBuffer) ([]T, error)
BufferData returns an independent copy of the buffer elements.
func Data ¶
func Data[T TensorData](tensor Tensor) ([]T, error)
Data returns a copy of tensor's data as T. It is equivalent to Tensor.Data.
func RawBufferData ¶
func RawBufferData(buffer *TensorBuffer) ([]byte, error)
RawBufferData returns an independent copy of a raw output buffer's encoded bytes.
Types ¶
type BufferElement ¶
type BufferElement interface {
bool |
float32 | float64 |
int8 | int16 | int32 | int64 |
uint8 | uint16 | uint32 | uint64
}
BufferElement is an element type supported by reusable output buffers. Strings are excluded because ONNX Runtime cannot write string outputs into Go-backed storage.
type DataType ¶
type DataType string
DataType identifies the element type stored in a Tensor.
const ( DataTypeUndefined DataType = "undefined" DataTypeBool DataType = "bool" DataTypeString DataType = "string" DataTypeFloat32 DataType = "float32" DataTypeFloat64 DataType = "float64" DataTypeFloat16 DataType = "float16" DataTypeBFloat16 DataType = "bfloat16" DataTypeFloat8E4M3FN DataType = "float8e4m3fn" DataTypeFloat8E4M3FNUZ DataType = "float8e4m3fnuz" DataTypeFloat8E5M2 DataType = "float8e5m2" DataTypeFloat8E5M2FNUZ DataType = "float8e5m2fnuz" DataTypeFloat8E8M0 DataType = "float8e8m0" DataTypeFloat4E2M1 DataType = "float4e2m1" DataTypeComplex64 DataType = "complex64" DataTypeComplex128 DataType = "complex128" DataTypeInt8 DataType = "int8" DataTypeInt16 DataType = "int16" DataTypeInt32 DataType = "int32" DataTypeInt64 DataType = "int64" DataTypeInt4 DataType = "int4" DataTypeInt2 DataType = "int2" DataTypeUint8 DataType = "uint8" DataTypeUint16 DataType = "uint16" DataTypeUint32 DataType = "uint32" DataTypeUint64 DataType = "uint64" DataTypeUint4 DataType = "uint4" DataTypeUint2 DataType = "uint2" )
Supported tensor element types.
type ExecutionMode ¶
type ExecutionMode int
ExecutionMode controls whether independent graph nodes may execute in parallel. Sequential execution is the default.
const ( ExecutionSequential ExecutionMode = iota ExecutionParallel )
Supported graph execution modes.
type ExecutionProviderDevice ¶
ExecutionProviderDevice describes one hardware target advertised by an execution-provider plugin registered with ONNX Runtime.
type LoggingLevel ¶
type LoggingLevel int
LoggingLevel controls ONNX Runtime session log verbosity.
const ( LoggingVerbose LoggingLevel = iota LoggingInfo LoggingWarning LoggingError LoggingFatal )
Supported session logging levels.
type ModelMetadata ¶
type ModelMetadata struct {
Producer string
Graph string
Domain string
Description string
Version int64
Custom map[string]string
}
ModelMetadata contains descriptive fields embedded in an ONNX model.
type OptimizationLevel ¶
type OptimizationLevel int
OptimizationLevel controls ONNX graph optimization for a Session.
const ( OptimizationDisabled OptimizationLevel = iota OptimizationBasic OptimizationExtended OptimizationAll )
Supported graph optimization levels.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime owns a reference to the process-wide ONNX Runtime environment. Close is safe to call more than once. Sessions retain their own reference, so closing Runtime does not invalidate sessions that are still open.
func Open ¶
func Open(ctx context.Context, options ...RuntimeOption) (*Runtime, error)
Open initializes ONNX Runtime. When no library path is provided, Open uses ONNXRUNTIME_SHARED_LIBRARY_PATH or downloads a verified official artifact.
func (*Runtime) ExecutionProviderDevices ¶
func (r *Runtime) ExecutionProviderDevices() ([]ExecutionProviderDevice, error)
ExecutionProviderDevices returns the hardware targets currently advertised by registered execution-provider plugins. The returned values are detached from ONNX Runtime and remain safe to use after Runtime is closed.
func (*Runtime) Info ¶
func (r *Runtime) Info() (RuntimeInfo, error)
Info returns details about the selected native runtime.
func (*Runtime) Inspect ¶
func (r *Runtime) Inspect(modelPath string, options ...SessionOption) (result ModelInfo, resultErr error)
Inspect reads the ordered inputs and outputs from modelPath. It creates a temporary ONNX session, so loading a large model may be expensive.
func (*Runtime) InspectBytes ¶
func (r *Runtime) InspectBytes(model []byte, options ...SessionOption) (result ModelInfo, resultErr error)
InspectBytes reads ordered inputs and outputs from an in-memory ONNX model. It creates a temporary ONNX session, so loading a large model may be expensive.
func (*Runtime) Load ¶
func (r *Runtime) Load(modelPath string, options ...SessionOption) (*Session, error)
Load inspects modelPath and creates a session using every graph input and output in model order. Use NewSession when only selected outputs are needed.
func (*Runtime) LoadBytes ¶
func (r *Runtime) LoadBytes(model []byte, options ...SessionOption) (*Session, error)
LoadBytes inspects an in-memory ONNX model and creates a schema-aware session using every graph input and output.
func (*Runtime) LoadedVersion ¶
LoadedVersion returns the version reported by the loaded native library.
func (*Runtime) NewSession ¶
func (r *Runtime) NewSession( modelPath string, inputNames []string, outputNames []string, options ...SessionOption, ) (*Session, error)
NewSession loads modelPath with positional input and output names.
func (*Runtime) NewSessionFromBytes ¶
func (r *Runtime) NewSessionFromBytes( model []byte, inputNames []string, outputNames []string, options ...SessionOption, ) (*Session, error)
NewSessionFromBytes loads an in-memory ONNX model with positional input and output names. ONNX Runtime consumes model during construction; callers may reuse or release the byte slice after this function returns.
func (*Runtime) NewSessionFromInfo ¶
func (r *Runtime) NewSessionFromInfo( modelPath string, info ModelInfo, options ...SessionOption, ) (*Session, error)
NewSessionFromInfo loads modelPath using a previously inspected graph schema. Inputs and outputs are validated on each run.
func (*Runtime) RequireVersion ¶
RequireVersion verifies that the loaded native library is at least minimum. Both versions must use Semantic Versioning 2.0 syntax.
type RuntimeInfo ¶
RuntimeInfo describes the native runtime selected for this process.
type RuntimeOption ¶
type RuntimeOption func(*runtimeConfig) error
RuntimeOption configures Open.
func WithCacheDir ¶
func WithCacheDir(path string) RuntimeOption
WithCacheDir stores downloaded native runtime files beneath path.
func WithDownloadRetries ¶
func WithDownloadRetries(count int) RuntimeOption
WithDownloadRetries sets the number of retries after a transient native runtime download failure. The default is two.
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) RuntimeOption
WithHTTPClient sets the client used to download ONNX Runtime.
func WithLibraryPath ¶
func WithLibraryPath(path string) RuntimeOption
WithLibraryPath uses an existing ONNX Runtime shared library and disables automatic downloading.
func WithOffline ¶
func WithOffline(enabled bool) RuntimeOption
WithOffline disables native runtime downloads. A custom library or a previously verified bundled runtime must be available.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session runs one ONNX model. Run may be called concurrently. Close waits for active runs and is safe to call more than once.
func (*Session) InputNames ¶
InputNames returns the model inputs in the positional order expected by Run.
func (*Session) Inputs ¶
Inputs returns the schema used to validate inputs. Sessions constructed with NewSession return nil because only names were supplied.
func (*Session) Metadata ¶
func (s *Session) Metadata() (result ModelMetadata, resultErr error)
Metadata returns descriptive fields embedded in the loaded ONNX model.
func (*Session) OutputNames ¶
OutputNames returns the model outputs in the positional order returned by Run.
func (*Session) Outputs ¶
Outputs returns the schema used to validate outputs. Sessions constructed with NewSession return nil because only names were supplied.
func (*Session) Run ¶
Run executes the model with positional input tensors. Returned tensors own independent Go memory and remain valid after the next run or Close.
func (*Session) RunInto ¶
func (s *Session) RunInto(ctx context.Context, outputs []*TensorBuffer, inputs ...Tensor) (resultErr error)
RunInto executes the model with positional inputs and writes positional outputs directly into reusable caller-owned buffers. Every output must have the exact type and concrete shape produced by the model. Buffer contents are unspecified when the run returns an error.
func (*Session) RunIntoNamed ¶
func (s *Session) RunIntoNamed( ctx context.Context, inputs map[string]Tensor, outputs map[string]*TensorBuffer, ) error
RunIntoNamed executes the model using named inputs and writes every declared output into its named reusable buffer. Missing and unknown names are rejected before inference.
type SessionOption ¶
type SessionOption func(*sessionConfig) error
SessionOption configures a Session.
func WithCPUMemoryArena ¶
func WithCPUMemoryArena(enabled bool) SessionOption
WithCPUMemoryArena controls ONNX Runtime's CPU memory arena.
func WithCUDA ¶
func WithCUDA(settings map[string]string) SessionOption
WithCUDA enables NVIDIA's CUDA execution provider. Provider settings use the keys documented by ONNX Runtime. A CUDA-enabled native runtime and its dependencies must be supplied with WithLibraryPath.
func WithCoreML ¶
func WithCoreML(settings map[string]string) SessionOption
WithCoreML enables Apple's Core ML execution provider. Provider settings use the keys documented by ONNX Runtime.
func WithCustomOperators ¶
func WithCustomOperators(path string) SessionOption
WithCustomOperators registers a custom-operator shared library.
func WithDirectML ¶
func WithDirectML(deviceID int) SessionOption
WithDirectML enables Microsoft's DirectML execution provider on deviceID. A DirectML-enabled native runtime must be supplied with WithLibraryPath.
func WithExecutionMode ¶
func WithExecutionMode(mode ExecutionMode) SessionOption
WithExecutionMode sets graph execution to sequential or parallel. Setting inter-op threads implicitly selects parallel execution unless this option is used explicitly.
func WithExecutionProvider ¶
func WithExecutionProvider(name string, settings map[string]string) SessionOption
WithExecutionProvider enables a provider through ONNX Runtime's generic provider API. This supports providers such as QNN or XNNPACK when they are included in the supplied native runtime.
func WithInterOpThreads ¶
func WithInterOpThreads(count int) SessionOption
WithInterOpThreads sets the number of threads used across operators.
func WithIntraOpThreads ¶
func WithIntraOpThreads(count int) SessionOption
WithIntraOpThreads sets the number of threads used within an operator.
func WithLogging ¶
func WithLogging(level LoggingLevel) SessionOption
WithLogging sets the ONNX Runtime session log severity threshold.
func WithMemoryPattern ¶
func WithMemoryPattern(enabled bool) SessionOption
WithMemoryPattern controls ONNX Runtime memory-pattern optimization.
func WithOpenVINO ¶
func WithOpenVINO(settings map[string]string) SessionOption
WithOpenVINO enables Intel's OpenVINO execution provider. An OpenVINO-enabled native runtime and its dependencies must be supplied with WithLibraryPath.
func WithOptimization ¶
func WithOptimization(level OptimizationLevel) SessionOption
WithOptimization sets the graph optimization level. The default is OptimizationAll.
func WithOptimizedModel ¶
func WithOptimizedModel(path string) SessionOption
WithOptimizedModel writes the optimized graph to path while loading.
func WithProfiling ¶
func WithProfiling(prefix string) SessionOption
WithProfiling writes ONNX Runtime profiling output using prefix.
func WithSessionConfig ¶
func WithSessionConfig(key, value string) SessionOption
WithSessionConfig sets an ONNX Runtime session configuration entry.
func WithTensorRT ¶
func WithTensorRT(settings map[string]string) SessionOption
WithTensorRT enables NVIDIA's TensorRT execution provider. A TensorRT-enabled native runtime and its CUDA/TensorRT dependencies must be supplied with WithLibraryPath.
type Tensor ¶
type Tensor struct {
// contains filtered or unexported fields
}
Tensor is an immutable, row-major ONNX tensor.
func MustTensor ¶
func MustTensor[T TensorData](shape []int64, data []T) Tensor
MustTensor is like NewTensor but panics if shape and data are incompatible. It is intended for package-level constants and tests.
func NewRawTensor ¶
NewRawTensor constructs a low-precision, packed, or complex tensor and copies its encoded bytes. Use RawData to retrieve the encoded representation.
func NewTensor ¶
func NewTensor[T TensorData](shape []int64, data []T) (Tensor, error)
NewTensor constructs a tensor and copies shape and data so callers can safely reuse their input slices.
func TakeRawTensor ¶
TakeRawTensor constructs a low-precision, packed, or complex tensor that adopts data without copying it. The caller must not modify data afterward.
func TakeTensor ¶
func TakeTensor[T TensorData](shape []int64, data []T) (Tensor, error)
TakeTensor constructs a tensor that adopts data without copying it. The caller must not modify data after this function returns. Shape is copied. This is useful when the caller has created a buffer solely for the tensor.
func (Tensor) Data ¶
func (t Tensor) Data[T TensorData]() ([]T, error)
Data returns a copy of the tensor elements as T.
type TensorBuffer ¶
type TensorBuffer struct {
// contains filtered or unexported fields
}
TensorBuffer is caller-owned, reusable tensor storage for Session.RunInto. A buffer cannot participate in more than one run at a time. Shape and type are fixed at construction.
func NewRawTensorBuffer ¶
func NewRawTensorBuffer(shape []int64, dataType DataType) (*TensorBuffer, error)
NewRawTensorBuffer allocates reusable output storage for a low-precision, packed, or complex tensor.
func NewTensorBuffer ¶
func NewTensorBuffer[T BufferElement](shape []int64) (*TensorBuffer, error)
NewTensorBuffer allocates a zero-filled reusable output buffer.
func (*TensorBuffer) Len ¶
func (b *TensorBuffer) Len() int
Len returns the flattened number of elements in the buffer.
func (*TensorBuffer) Shape ¶
func (b *TensorBuffer) Shape() []int64
Shape returns a copy of the buffer dimensions.
func (*TensorBuffer) Tensor ¶
func (b *TensorBuffer) Tensor() Tensor
Tensor returns an immutable snapshot of the buffer.
func (*TensorBuffer) Type ¶
func (b *TensorBuffer) Type() DataType
Type returns the buffer element type.
type TensorData ¶
type TensorData interface {
bool | string |
float32 | float64 |
int8 | int16 | int32 | int64 |
uint8 | uint16 | uint32 | uint64
}
TensorData is a Go type supported by an ONNX tensor.
type ValueInfo ¶
ValueInfo describes one model input or output. Dynamic dimensions are represented by negative values, as reported by ONNX Runtime.
type ValueKind ¶
type ValueKind string
ValueKind identifies the top-level ONNX type of a model input or output.
const ( ValueKindUnknown ValueKind = "unknown" ValueKindTensor ValueKind = "tensor" ValueKindSequence ValueKind = "sequence" ValueKindMap ValueKind = "map" ValueKindOpaque ValueKind = "opaque" ValueKindSparseTensor ValueKind = "sparse_tensor" ValueKindOptional ValueKind = "optional" )
ONNX value kinds reported by Inspect.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package depthestimation estimates monocular relative-depth maps from images.
|
Package depthestimation estimates monocular relative-depth maps from images. |
|
Package embedding creates normalized text vectors for semantic similarity, retrieval, clustering, and classification.
|
Package embedding creates normalized text vectors for semantic similarity, retrieval, clustering, and classification. |
|
examples
|
|
|
depthestimation
command
Command depthestimation writes a relative-depth visualization for an image.
|
Command depthestimation writes a relative-depth visualization for an image. |
|
embedding
command
Command embedding compares the meanings of two sentences with Arctic Embed.
|
Command embedding compares the meanings of two sentences with Arctic Embed. |
|
fillmask
command
Command fillmask predicts replacements for masked tokens.
|
Command fillmask predicts replacements for masked tokens. |
|
imageclassification
command
Command imageclassification classifies an image with a catalog model.
|
Command imageclassification classifies an image with a catalog model. |
|
imageembedding
command
Command imageembedding compares the visual content of two images with DINOv2.
|
Command imageembedding compares the visual content of two images with DINOv2. |
|
imagematting
command
Command imagematting removes the background from a portrait image.
|
Command imagematting removes the background from a portrait image. |
|
objectdetection
command
Command objectdetection detects and annotates objects with a catalog model.
|
Command objectdetection detects and annotates objects with a catalog model. |
|
questionanswering
command
Command questionanswering extracts an answer from supplied context.
|
Command questionanswering extracts an answer from supplied context. |
|
reranking
command
Command reranking ranks documents for a query with a cross-encoder.
|
Command reranking ranks documents for a query with a cross-encoder. |
|
textclassification
command
Command textclassification predicts sentiment with DistilBERT.
|
Command textclassification predicts sentiment with DistilBERT. |
|
tokenclassification
command
Command tokenclassification recognizes named entities with BERT.
|
Command tokenclassification recognizes named entities with BERT. |
|
visionlanguage
command
Command visionlanguage classifies an image against arbitrary text labels.
|
Command visionlanguage classifies an image against arbitrary text labels. |
|
zeroshotclassification
command
Command zeroshotclassification classifies text against arbitrary labels.
|
Command zeroshotclassification classifies text against arbitrary labels. |
|
Package fillmask predicts tokens that replace masks in text.
|
Package fillmask predicts tokens that replace masks in text. |
|
Package imageclassification provides spec-driven image classification.
|
Package imageclassification provides spec-driven image classification. |
|
Package imageembedding creates fixed-size vectors from images.
|
Package imageembedding creates fixed-size vectors from images. |
|
Package imagematting creates soft foreground alpha mattes and applies them to source images without requiring a trimap.
|
Package imagematting creates soft foreground alpha mattes and applies them to source images without requiring a trimap. |
|
internal
|
|
|
atomicfile
Package atomicfile provides atomic file installation helpers shared by the runtime and model download paths.
|
Package atomicfile provides atomic file installation helpers shared by the runtime and model download paths. |
|
filelock
Package filelock serializes cache installation across processes.
|
Package filelock serializes cache installation across processes. |
|
imagemodel
Package imagemodel contains shared plumbing for image task pipelines.
|
Package imagemodel contains shared plumbing for image task pipelines. |
|
math32
Package math32 provides numerically stable operations for model outputs.
|
Package math32 provides numerically stable operations for model outputs. |
|
onnxruntime
Package onnxruntime is ONNXCraft's private, memory-safe binding to the ONNX Runtime C API.
|
Package onnxruntime is ONNXCraft's private, memory-safe binding to the ONNX Runtime C API. |
|
semversion
Package semversion provides strict Semantic Versioning comparison for internal compatibility checks.
|
Package semversion provides strict Semantic Versioning comparison for internal compatibility checks. |
|
textmodel
Package textmodel contains shared implementation details for text pipelines.
|
Package textmodel contains shared implementation details for text pipelines. |
|
Package labels provides standard class names for bundled model families.
|
Package labels provides standard class names for bundled model families. |
|
Package modelhub downloads, verifies, caches, and transactionally installs model artifacts.
|
Package modelhub downloads, verifies, caches, and transactionally installs model artifacts. |
|
Package models provides a curated catalog of immutable, ready-to-run models.
|
Package models provides a curated catalog of immutable, ready-to-run models. |
|
Package objectdetection provides spec-driven object detection.
|
Package objectdetection provides spec-driven object detection. |
|
Package postprocess converts raw model outputs into useful predictions.
|
Package postprocess converts raw model outputs into useful predictions. |
|
Package questionanswering provides extractive question answering over supplied context.
|
Package questionanswering provides extractive question answering over supplied context. |
|
Package reranking scores query-document pairs with cross-encoder models.
|
Package reranking scores query-document pairs with cross-encoder models. |
|
Package textclassification classifies text and sentence pairs with curated ONNX models.
|
Package textclassification classifies text and sentence pairs with curated ONNX models. |
|
Package tokenclassification recognizes and aggregates labeled spans in text.
|
Package tokenclassification recognizes and aggregates labeled spans in text. |
|
Package tokenizer provides model-independent text tokenization primitives.
|
Package tokenizer provides model-independent text tokenization primitives. |
|
Package vector provides validated numerical operations for model embeddings.
|
Package vector provides validated numerical operations for model embeddings. |
|
Package vision converts images into normalized tensors for vision models.
|
Package vision converts images into normalized tensors for vision models. |
|
Package visionlanguage creates compatible text and image embeddings and performs arbitrary-label image classification with dual-encoder models.
|
Package visionlanguage creates compatible text and image embeddings and performs arbitrary-label image classification with dual-encoder models. |
|
Package zeroshotclassification classifies text against arbitrary candidate labels using natural-language inference.
|
Package zeroshotclassification classifies text against arbitrary candidate labels using natural-language inference. |