Documentation
¶
Overview ¶
Package llamacpp is the llama.cpp embedder for the memory store: a GGUF embedding model driven through cgo against the static libraries under build/llama.cpp. It is the module's only cgo dependency on llama.cpp and only cmd/ask imports it, so a consumer of pkg/memory that supplies its own memory.Embedder never links llama.cpp.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultModelPath ¶
DefaultModelPath returns the standard local embedding model GGUF location.
Types ¶
type EmbeddingModel ¶
type EmbeddingModel struct {
// contains filtered or unexported fields
}
EmbeddingModel manages an in-memory llama.cpp embedding model instance.
func LoadEmbeddingModel ¶
func LoadEmbeddingModel(path string) (*EmbeddingModel, error)
LoadEmbeddingModel initializes the llama.cpp backend and loads the GGUF model from path.
func (*EmbeddingModel) Close ¶
func (m *EmbeddingModel) Close()
Close releases the llama context and model resources.
func (*EmbeddingModel) EmbdSize ¶
func (m *EmbeddingModel) EmbdSize() int
EmbdSize returns the embedding dimension of the model.