Skip to main content

lance-bundle

Motto: Embed Once, Query Forever

Main concrete goals:

  1. Portability - you own your data and embeddings; store them and use them forever into the future
  2. Reusability - stop embedding the internet; a shared registry allows compressed and indexed knowledge to be used interchangeably
  3. Provenance - metadata and lineage information to track snapshots and versioning and enable time-travel, debugging, and auditing

Other taglines:

  • "stop rembedding the wheel"

Motivating Examples

Add RAG to local LLM with one-liner to load bundle as dataset from Hugging Face:

import ollama
from lance_bundle.runtime import load_dataset

bundle = load_dataset("cloudkj/lance-bundle-mvp")

prompt = "You are a helpful assistant. Answer the question based ONLY on the provided context. If the answer cannot be found in the context, say 'I don't know'. Context: {context} Question: {query}"

while True:
  print("> ", end="")
  query = input()
  context = bundle.search(query, limit=1)[0]['text']
  response = ollama.chat(
    model='llama3.2:1b',
    messages=[{'role': 'user', 'content': prompt.format(context=context, query=query)}]
  )
  print(response.message.content)

Implementation Notes

By design, the Sentence Transformers models from HF are exported to ONNX with only the transformers modules. The pooling and normalization modules are not included in the export, and thus need to be applied as a post-processing step. This is an additional benefit to using this library to import an ONNX-exported sentence transformer for embeddings.

Source pointer for pooling logic:

Discussions:

Datasets

Some datasets for which we can generate embeddings to bootstrap registry:

Ideas

  • Vector DB as analytics/OLAP?
    • Support operations like "how many documents are related to topic X?" - requires an operation more like SELECT count(1) WHERE distance(document, query) < threshold
    • Or clustering operations? ooks like Inverted File Index (IVF) does some clustering
    • What about pure aggregations like "what percent of my reviews were negative?"
  • Value-adds:
    • snapshot and bundle cersioning, history, provenance. need very detailed audit trail of how snaoshot waa produced to ensure reliable drozen snapshot in time and allow dor rollbacks and time travel ans introspection during tegressions ir changes in behavior
    • value add with APi on top: add anayltics aggregation funtionality in top of cector db for more powerful searches, aggregations, etc

Download files

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

Source Distribution

lance_bundle-0.0.2.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

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

lance_bundle-0.0.2-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file lance_bundle-0.0.2.tar.gz.

File metadata

  • Download URL: lance_bundle-0.0.2.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for lance_bundle-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8ef8ad2d7df88de501820e19e9f4efd57fed5e4b2d23b346cb21d6efac1e505e
MD5 67c6b6530e182dd4d0976d5a4401e21f
BLAKE2b-256 719fb6abe85d525706ffdc41352132a09ab5515509041a29f257de88588c21ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for lance_bundle-0.0.2.tar.gz:

Publisher: publish.yml on cloudkj/lance-bundle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lance_bundle-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: lance_bundle-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for lance_bundle-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 58da122dc4f1f2b5c9bcebc4d95365c415a52e303075ef21bd3ab6169aa91e03
MD5 eda2f36aaae4660957c40f8449523f42
BLAKE2b-256 af3e06959fa86d43d2f0bbedeaa03c8322869dc4553cf83e66b1b0086759f6df

See more details on using hashes here.

Provenance

The following attestation bundles were made for lance_bundle-0.0.2-py3-none-any.whl:

Publisher: publish.yml on cloudkj/lance-bundle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.0.4

2 files

This release

0.0.2 This release

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page