Skip to main content

A library for text embeddings with caching.

Project description

embedding-utils

A lightweight Python library providing a convenient wrapper around Sentence Transformers for generating text embeddings with caching. Perfect for projects that need repeated embeddings of the same texts without re-computation, or that want a straightforward API for embedding-based similarity.

Features

  • Easy Embedding: Encode batches of texts into vector embeddings with a single method.
  • Built-in Caching: Prevents re-computation for texts previously embedded; saves and loads from disk.
  • Device Management: Optionally integrates with device-selector or falls back to CPU/GPU detection.
  • Cosine Similarity: Utility method to compute similarity between two embedding vectors.

Installation

pip install embedding-utils==0.1.4

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

embedding_utils-0.1.4.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

embedding_utils-0.1.4-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file embedding_utils-0.1.4.tar.gz.

File metadata

  • Download URL: embedding_utils-0.1.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for embedding_utils-0.1.4.tar.gz
Algorithm Hash digest
SHA256 c740ee79056fd7fca57091db5e306ba080a973b6e561394c73de26f8a72ae0e6
MD5 e734122d29c613df0004c655d3746e70
BLAKE2b-256 f0d5f14903120e010004d27077e158510a670e62b09f8d63011f10d9bceea1c3

See more details on using hashes here.

File details

Details for the file embedding_utils-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for embedding_utils-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c86aafff78e001c8eda4cb56c5b641759018ed6f1d4dbfdb15b5b81eb034b02b
MD5 08411e1a0e9ae63bc22bc1e1528e86ac
BLAKE2b-256 9f7453d829e22bcdc4c80c44bd47bf955759ad26ddd4b473c42151812b78e82b

See more details on using hashes here.

Supported by

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