Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureRuntime ¶
func EnsureRuntime() error
func L2Normalize ¶
func L2Normalize(v []float32)
func MeanPool ¶
MeanPool averages a flat [1, numTokens, dim] tensor across the token dimension, returning a single [dim] vector.
func PoolAndNormalize ¶
PoolAndNormalize mean-pools data from [1, numTokens, dim] to [dim] if needed, then L2-normalizes the result.
func RuntimeLibPath ¶
Types ¶
type Embedder ¶
type Embedder struct {
// contains filtered or unexported fields
}
func NewEmbedder ¶
func NewEmbedder( modelPath string, config modelConfig, options EmbedderOptions, ) (*Embedder, error)
type EmbedderOptions ¶
type EmbedderOptions struct {
Verbose bool
}
type ModelState ¶
type ModelState struct {
// contains filtered or unexported fields
}
func GetModelState ¶
func GetModelState(db *sql.DB, modelName string) (ModelState, error)
Click to show internal directories.
Click to hide internal directories.