lance

Library Featured

A columnar data format that is 100x faster than Parquet for random access.

Checked · Sources

Downloads
915,526
Dependents
48
Stars
7,268
Forks
927
Contributors
337
Commits
6,282
Latest release
14.0.2 ·

About

From the project README ·

Lance Logo

The Open Lakehouse Format for Multimodal AI
High-performance vector search, full-text search, random access, and feature engineering capabilities for the lakehouse.
Compatible with Pandas, DuckDB, Polars, PyArrow, Ray, Spark, and more integrations on the way.

Documentation • Community • Discord • Mailing List


Lance is an open lakehouse format for multimodal AI. It contains a file format, table format, and catalog spec that allows you to build a complete lakehouse on top of object storage to power your AI workflows. Lance is perfect for:

  1. Building search engines and feature stores with hybrid search capabilities.
  2. Large-scale ML training requiring high performance IO and random access.
  3. Storing, querying, and managing multimodal data including images, videos, audio, text, and embeddings.

The key features of Lance include:

Read the full README
  • Expressive hybrid search: Combine vector similarity search, full-text search (BM25), and SQL analytics on the same dataset with accelerated secondary indices.

  • Lightning-fast random access: 100x faster than Parquet or Iceberg for random access without sacrificing scan performance.

  • Native multimodal data support: Store images, videos, audio, text, and embeddings in a single unified format with efficient blob encoding and lazy loading.

  • Data evolution: Efficiently add columns with backfilled values without full table rewrites, perfect for ML feature engineering.

  • Zero-copy versioning: Automatic versioning with ACID transactions, time travel, tags, and branches—no extra infrastructure needed.

  • Rich ecosystem integrations: Apache Arrow, Pandas, Polars, DuckDB, Apache Spark, Ray, Trino, Apache Flink, and open catalogs (Apache Polaris, Unity Catalog, Apache Gravitino).

For more details, see the full Lance format specification.

[!TIP] Lance is in active development and we welcome contributions. Please see our contributing guide for more information.

File format stability

Lance releases frequently because the SDKs, integrations, and performance work are moving quickly. This does not mean the Lance file format changes incompatibly in every release. The Lance file format is identified by the data_storage_version stored in each dataset, and stable storage versions are a long-term compatibility contract.

  • Once a dataset is written with a stable data_storage_version, future Lance releases will continue to support reading that storage version.
  • SDK and API compatibility is separate from file format compatibility. SDK/API changes follow semantic versioning and are documented in the migration guide.
  • Older Lance releases may not understand file format versions introduced later. If you run mixed Lance versions, pin data_storage_version for deterministic writes.
  • The next file format alias is unstable and should only be used for experimentation, never for production data.

For production, write data with a stable data_storage_version. See the format versioning guide for the current compatibility matrix.

Quick Start

Installation

pip install pylance

To install a preview release:

pip install --pre --extra-index-url https://pypi.fury.io/lance-format pylance

[!TIP] Preview releases are released more often than full releases and contain the latest features and bug fixes. They receive the same level of testing as full releases. We guarantee they will remain published and available for download for at least 6 months. When you want to pin to a specific version, prefer a stable release.

Converting to Lance

import lance

import pandas as pd
import pyarrow as pa
import pyarrow.dataset

df = pd.DataFrame({"a": [5], "b": [10]})
uri = "/tmp/test.parquet"
tbl = pa.Table.from_pandas(df)
pa.dataset.write_dataset(tbl, uri, format='parquet')

parquet = pa.dataset.dataset(uri, format='parquet')
lance.write_dataset(parquet, "/tmp/test.lance")

Reading Lance data

dataset = lance.dataset("/tmp/test.lance")
assert isinstance(dataset, pa.dataset.Dataset)

Pandas

df = dataset.to_table().to_pandas()
df

DuckDB

import duckdb

# If this segfaults, make sure you have duckdb v0.7+ installed
duckdb.query("SELECT * FROM dataset LIMIT 10").to_df()

Vector search

Download the sift1m subset

wget ftp://ftp.irisa.fr/local/texmex/corpus/sift.tar.gz
tar -xzf sift.tar.gz

Convert it to Lance

import lance
from lance.vector import vec_to_table
import numpy as np
import struct

nvecs = 1000000
ndims = 128
with open("sift/sift_base.fvecs", mode="rb") as fobj:
    buf = fobj.read()
    data = np.array(struct.unpack("<128000000f", buf[4 : 4 + 4 * nvecs * ndims])).reshape((nvecs, ndims))
    dd = dict(zip(range(nvecs), data))

table = vec_to_table(dd)
uri = "vec_data.lance"
sift1m = lance.write_dataset(table, uri, max_rows_per_group=8192, max_rows_per_file=1024*1024)

Build the index

sift1m.create_index("vector",
                    index_type="IVF_PQ",
                    num_partitions=256,  # IVF
                    num_sub_vectors=16)  # PQ

Search the dataset

# Get top 10 similar vectors
import duckdb

dataset = lance.dataset(uri)

# Sample 100 query vectors. If this segfaults, make sure you have duckdb v0.7+ installed
sample = duckdb.query("SELECT vector FROM dataset USING SAMPLE 100").to_df()
query_vectors = np.array([np.array(x) for x in sample.vector])

# Get nearest neighbors for all of them
rs = [dataset.to_table(nearest={"column": "vector", "k": 10, "q": q})
      for q in query_vectors]

Directory structure

DirectoryDescription
rustCore Rust implementation
pythonPython bindings (PyO3)
javaJava bindings (JNI)
docsDocumentation source

Benchmarks

Vector search

We used the SIFT dataset to benchmark our results with 1M vectors of 128D

  1. For 100 randomly sampled query vectors, we get <1ms average response time (on a 2023 m2 MacBook Air)

avg_latency.png

  1. ANNs are always a trade-off between recall and performance

avg_latency.png

Vs. parquet

We create a Lance dataset using the Oxford Pet dataset to do some preliminary performance testing of Lance as compared to Parquet and raw image/XMLs. For analytics queries, Lance is 50-100x better than reading the raw metadata. For batched random access, Lance is 100x better than both parquet and raw files.

Why Lance for AI/ML workflows?

The machine learning development cycle involves multiple stages:

graph LR
    A[Collection] --> B[Exploration];
    B --> C[Analytics];
    C --> D[Feature Engineer];
    D --> E[Training];
    E --> F[Evaluation];
    F --> C;
    E --> G[Deployment];
    G --> H[Monitoring];
    H --> A;

Traditional lakehouse formats were designed for SQL analytics and struggle with AI/ML workloads that require:

  • Vector search for similarity and semantic retrieval
  • Fast random access for sampling and interactive exploration
  • Multimodal data storage (images, videos, audio alongside embeddings)
  • Data evolution for feature engineering without full table rewrites
  • Hybrid search combining vectors, full-text, and SQL predicates

While existing formats (Parquet, Iceberg, Delta Lake) excel at SQL analytics, they require additional specialized systems for AI capabilities. Lance brings these AI-first features directly into the lakehouse format.

A comparison of different formats across ML development stages:

LanceParquet & ORCJSON & XMLTFRecordDatabaseWarehouse
AnalyticsFastFastSlowSlowDecentFast
Feature EngineeringFastFastDecentSlowDecentGood
TrainingFastDecentSlowFastN/AN/A
ExplorationFastSlowFastSlowFastDecent
Infra SupportRichRichDecentLimitedRichRich

Supported Storage

Lance reads and writes datasets stored on local disk or in object storage. The storage backend is selected automatically by the URI scheme of the dataset path.

StorageURI schemeNotes
Local filesystemfile://Default; also accepts plain paths. file+uring:// (Linux only) uses io_uring for better local I/O performance.
AWS S3s3://Supports S3 Express One Zone buckets. Use s3+ddb:// to version datasets with DynamoDB-managed metadata.
S3-compatible storess3://MinIO, Cloudflare R2, Wasabi, and other S3-compatible stores via the endpoint storage option.
Microsoft Azure Blob Storageaz://Also supports Azure Data Lake Storage Gen2 via abfss://.
Google Cloud Storagegs://
Alibaba Cloud Object Storage Serviceoss://
Tencent Cloud Object Storagecos://
Volcengine Object Storage (TOS)tos://
Hugging Face Hubhf://
GooseFSgoosefs://
In-memorymemory://Intended for testing only.

For credentials, authentication, and per-store configuration options, see the object store configuration guide.

Runs on
GPU support unknown
What shows it
  • no dependency or feature matches a backend row
Native code
Optional
  • Binds native code: ring (feature credential-vendor-gcp), lz4-sys (feature lz4), zstd-sys (feature zstd)
  • Build uses a native toolchain: cc
Python bindings
No Python binding crate found
License
Apache-2.0

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.

lance beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
lance This page Featured

A columnar data format that is 100x faster than Parquet for random access.

915,526 downloads over 30 days 48 7,268 14.0.2 GPU support unknown Binds native code: ring (feature credential-vendor-gcp), lz4-sys (feature lz4), zstd-sys (feature zstd). Build uses a native toolchain: cc Apache-2.0
ndarray-npy Featured

.npy and .npz file format support for ndarray

560,950 downloads over 30 days 99 71 0.10.0 GPU support unknown No native code found Apache-2.0 OR MIT
zarrs Featured

A library for the Zarr storage format for multidimensional arrays and metadata

75,052 downloads over 30 days 51 285 0.23.14 GPU support unknown Binds native code: blosc-src (feature blosc), gdeflate-sys (feature gdeflate), zfp-sys (feature zfp), zstd-sys (feature zstd) Apache-2.0 OR MIT
vortex Listed

An extensible, state-of-the-art framework for columnar compression, and the fastest FOSS columnar file format. Formerly at @spiraldb, now an Incubation Stage project at LFAI&Data, part of the Linux Foundation.

98,129 downloads over 30 days 32 3,310 0.93.0 GPU support unknown Binds native code: zstd-sys Apache-2.0
databend App Listed

Data Agent Ready Warehouse : One for Analytics, Search, AI, Python Sandbox. — rebuilt from scratch. Unified architecture on your S3.

48 binary downloads per release Not applicable 9,493 Not measured Not measured Apache-2.0
elusion Listed

Elusion is a modern DataFrame / Data Engineering / Data Analysis library that combines the familiarity of DataFrame operations (like those in PySpark, Pandas, and Polars) with the power of SQL query building.

27 downloads over 30 days 0 144 9.0.0 GPU support unknown Binds native code: ring, openssl-sys MIT
compressr App New

Model conversion and quantization with no Python: reads SafeTensors, GGUF, TCF and PyTorch state dicts, writes SafeTensors, GGUF and TCF, and quantizes to Q2_K through Q8_0 and IQ4 formats, including Q4_K_M mixes. GPTQ, AWQ, NF4, FP8, EXL2 and ONNX input are not implemented.

Python bindings

23 downloads over 30 days Not applicable 0 0.2.1 GPU support unknown No native code found Apache-2.0
Why FeaturedIt passes every Featured gate.

What it meets

  • It has 21 active dependents and 19 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days.
  • Active dependents are at 100% of their peak. Featured needs at least 50%.
  • Docs are present. The release commit or a manifest ties the crate to the repository.
  • No vulnerability advisory stays unpatched past the grace window. At least one version is neither a prerelease nor 0.0.x.
  • The last activity is on 8 Nov 2026, 1 day ago. The rules expect an update within 1200 days. Dormancy rule

Exact rules: Featured library. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: version 14.0.2 base 300, doubled for 915526 downloads per month, doubled for 21 active users: E = 1200 days
  • dormancy: last activity 2026-11-08, 1 days ago, E = 1200: active
  • featured: featured: active_users 21, new_adopters 19, former_glory 1
Crates28 crates

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources6 sources
Adoption21 active dependents, 19 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents21crates.io database dumpYes
New dependents (365 days)19crates.io database dumpYes
Peak active dependents20.5crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 1 day ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-11-08GitHub repositoryYes
Latest release2026-10-29crates.io database dumpYes
First release2022-07-28crates.io database dumpYes
Latest version14.0.2crates.io database dumpYes
Days the oldest outside issue waits for a reply7GitHub repositoryYes
Maintainer replies over 365 days2GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution190 releases, 915,526 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases190crates.io database dumpYes
Downloads over 30 days915526crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository7,268 stars, 927 forks, 337 contributors, 6,282 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars7268GitHub repositoryYes — one part of the repository route
GitHub forks927GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account337GitHub contributorsYes — one part of the repository route
Commits on the default branch6282GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseApache-2.0crates.io database dumpNo
Runs on, from listed crates and their direct dependenciesGPU support unknowncrates.io database dumpNo
What shows each backendno dependency or feature matches a backend rowcrates.io database dumpNo
Native code, from listed crates and their dependenciesBinds native code: ring (feature credential-vendor-gcp), lz4-sys (feature lz4), zstd-sys (feature zstd). Build uses a native toolchain: cccrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly48crates.io database dumpNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.