Skip to main content

LLama.cpp embedder library python bindings

Project description

Llama Embedder

This is a python binding for llama embedder, a purpose-built library for embeddings.

Installation

pip install llama_embedder

Usage

Local Models

This example shows how to use local model to embed texts.

from llama_embedder import Embedder

embedder = Embedder(model_path='./path/to/model.gguf')

# Embed stings

embeddings = embedder.embed_texts(["Hello World!", "My name is Ishmael."])

Hugging Face Models

This example shows how to download and use a model from Hugging Face.

from llama_embedder import Embedder

hf_repo = "ChristianAzinn/snowflake-arctic-embed-s-gguf"
gguf_file = "snowflake-arctic-embed-s-f16.GGUF"
embedder = Embedder(gguf_file, hf_repository=hf_repo)
embeddings = embedder.embed_texts(["Hello, world!", "Another sentence"])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_embedder-0.0.8.tar.gz (18.8 MB view details)

Uploaded Source

File details

Details for the file llama_embedder-0.0.8.tar.gz.

File metadata

  • Download URL: llama_embedder-0.0.8.tar.gz
  • Upload date:
  • Size: 18.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for llama_embedder-0.0.8.tar.gz
Algorithm Hash digest
SHA256 519f09259094440c302fc2549161b49f63c211a818df455692096ae2e2e90ae9
MD5 b845d8d824f61b082a1e6da6156aa547
BLAKE2b-256 aeaa37deafd0a01528fc76cb43af26bac5f3e6a8884f21a8c80106504c7a03b1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page