Documentation
¶
Overview ¶
Package coreml provides an Embedder that runs models directly via Apple's CoreML framework, bypassing ONNX Runtime. This gives full ANE (Apple Neural Engine) utilization on supported models.
macOS only. On other platforms, Open returns an error.
The Objective-C bridge (bridge_darwin.m) calls CoreML's MLModel API through CGO. The model must be in .mlpackage or .mlmodelc format — use coremltools to convert from ONNX/PyTorch.
Usage:
ckv build --embedder=coreml --model-dir=./models/bge-m3.mlpackage
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements types.Embedder via CoreML Framework. Only available on macOS (darwin) builds.
func (*Adapter) Identity ¶
func (a *Adapter) Identity() types.EmbeddingIdentity
func (*Adapter) MaxInputTokens ¶
type Options ¶
type Options struct {
ModelPath string // path to .mlpackage or .mlmodelc directory
TokenizerPath string // path to tokenizer.json (required for inference)
ModelName string // display name for manifest
Dim int // output vector dimension (must match model)
MaxSeqLen int // max sequence length for tokenization (default 512)
}
Options configures the CoreML adapter.
Click to show internal directories.
Click to hide internal directories.