Documentation Index
Fetch the complete documentation index at: https://lancedb-bcbb4faf-docs-namespace-typescript-examples.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
View on Hugging Face
Source dataset card and downloadable files for
lance-format/fineweb-edu.hf://datasets/lance-format/fineweb-edu/data/train.lance.
Key features
- Cleaned passage text in the
textcolumn with the sourceurlandtitlecarried alongside. - Language detection signals (
language,language_probability) for filtered subsets. - Pre-computed 384-dim text embeddings in
text_embedding, ready for ANN search once an index is built locally. - One columnar dataset — scan metadata cheaply, project just the columns each query needs, defer the heavy
textandtext_embeddingreads to the rows that matter.
No pre-built indices on the Hub copy yet. At 1.5 B+ rows the on-disk indices are too large to ship comfortably alongside the data on the Hub. The Search, Curate, Evolve, and Train sections below describe the same APIs you’d use against a fully indexed dataset, but vector and full-text examples assume a local copy withIVF_PQandINVERTEDindices built once after download. See the Materialize-a-subset section at the end for a focused-subset workflow that makes indexing tractable.
Splits
train.lance
Schema
| Column | Type | Notes |
|---|---|---|
text | string | Cleaned passage body |
title | string | Page or article title when available |
url | string | Canonical source URL |
language | string | Detected language code (e.g., en) |
language_probability | float32 | Confidence of the language detector |
text_embedding | fixed_size_list<float32, 384> | Passage embedding for retrieval |
| FineWeb-Edu quality metadata | — | Heuristic scores and length statistics carried over from the upstream corpus |
Pre-built indices
None bundled at present. Build the recommended indices on a local copy:Why Lance?
- Blazing Fast Random Access: Optimized for fetching scattered rows, making it ideal for random sampling, real-time ML serving, and interactive applications without performance degradation.
- Native Multimodal Support: Store text, embeddings, and other data types together in a single file. Large binary objects are loaded lazily, and vectors are optimized for fast similarity search.
- Native Index Support: Lance comes with fast, on-disk, scalable vector and FTS indexes that sit right alongside the dataset on the Hub, so you can share not only your data but also your embeddings and indexes without your users needing to recompute them.
- Efficient Data Evolution: Add new columns and backfill data without rewriting the entire dataset. This is perfect for evolving ML features, adding new embeddings, or introducing moderation tags over time.
- Versatile Querying: Supports combining vector similarity search, full-text search, and SQL-style filtering in a single query, accelerated by on-disk indexes.
- Data Versioning: Every mutation commits a new version; previous versions remain intact on disk. Tags pin a snapshot by name, so retrieval systems and training runs can reproduce against an exact slice of history.
Load with datasets.load_dataset
You can load Lance datasets via the standard HuggingFace datasets interface, suitable when your pipeline already speaks Dataset / IterableDataset or you want a quick streaming sample.
Load with LanceDB
LanceDB is the embedded retrieval library built on top of the Lance format (docs), and is the interface most users interact with. It wraps the dataset as a queryable table with search and filter builders, and is the entry point used by the Search, Curate, Evolve, Versioning, and Materialize-a-subset sections below.Load with Lance
pylance is the Python binding for the Lance format and works directly with the format’s lower-level APIs. Reach for it when you want to inspect dataset internals — schema, scanner, fragments, the list of pre-built indices.
Tip — for production use, download locally first. Streaming from the Hub works for exploration, but at 1.5 B+ rows random access and any kind of search are dramatically faster against a local copy, and ANN / FTS require local indices anyway:Then point Lance or LanceDB at./fineweb-edu/data. For most workflows, the Materialize-a-subset section is a better starting point than downloading the full 1.5 B-row corpus.
Search
Once anIVF_PQ index exists on text_embedding, dense retrieval is a single call. In production you would encode a query string through the same 384-dim text encoder used at ingest and pass the resulting vector to tbl.search(...). The example below uses the embedding from row 42 as a runnable stand-in.
text_embedding vector is never read on the result side, and the text body is fetched only for the ten passages that actually came back, keeping the working set small even though the corpus is enormous.
Because the recommended setup also builds an INVERTED index on text, the same query can be issued as a hybrid search that combines the dense vector with a keyword query. LanceDB merges the two result lists and reranks them in a single call, which is useful when a phrase must literally appear in the passage but the dense side still does most of the ranking.
metric, nprobes, and refine_factor on the vector side to trade recall against latency.
Curate
A typical curation pass over a web corpus starts with a metadata filter — pick high-confidence English, drop short or low-quality fragments, restrict to a domain — before any text gets read. Stacking predicates inside a single filtered scan keeps the result small and explicit, and the bounded.limit(1000) makes it cheap to inspect.
text body nor the text_embedding vector is read by this scan, so a 1000-row curation pass against the Hub moves only kilobytes of metadata even though the underlying table is in the billions.
Evolve
Lance stores each column independently, so a new column can be appended without rewriting the existing data. The lightest form is a SQL expression: derive the new column from columns that already exist, and Lance computes it once and persists it. The example below adds atext_length and a long_passage flag, either of which can then be used directly in where clauses without recomputing the predicate on every query.
Note: Mutations require a local copy of the dataset, since the Hub mount is read-only. See the Materialize-a-subset section at the end of this card for a streaming pattern that downloads only the rows and columns you need, or use hf download to pull a larger slice first.
url:
Train
Projection lets a training loop read only the columns each step actually needs. LanceDB tables expose this throughPermutation.identity(tbl).select_columns([...]), which plugs straight into the standard torch.utils.data.DataLoader so prefetching, shuffling, and batching behave as in any PyTorch pipeline. For language-model pretraining the natural projection is just the text column; for a retrieval probe or a reranker on top of frozen features, project the precomputed embedding instead.
["text_embedding"] to select_columns(...) on the next run reads only the 384-d vectors and skips the text body entirely, which is the right shape for training a lightweight retrieval head on cached embeddings. Columns added in Evolve cost nothing per batch until they are explicitly projected.
Versioning
Every mutation to a Lance dataset, whether it adds a column, merges labels, or builds an index, commits a new version. Previous versions remain intact on disk. You can list versions and inspect the history directly from the Hub copy; creating new tags requires a local copy since tags are writes.english-v1 keeps returning stable results while the dataset evolves in parallel — newly added embeddings or labels do not change what the tag resolves to. A training experiment pinned to the same tag can be rerun later against the exact same passages, so changes in metrics reflect model changes rather than data drift. Neither workflow needs shadow copies or external manifest tracking.
Materialize a subset
At 1.5 B+ rows, very few workflows want the full corpus on local disk. The practical entry point is to stream a filtered query through.to_batches() into a new local table; only the projected columns and matching row groups cross the wire, and the bytes never fully materialize in Python memory. The result is a writable LanceDB database scoped to the rows that actually matter for the downstream task, sized to index and iterate cheaply.
./fineweb-edu-en is a first-class LanceDB database. Build the recommended indices on it once (the same create_index / create_fts_index calls shown in the Pre-built indices section, pointed at the local path), and every snippet in the Search, Evolve, Train, and Versioning sections above works against it by swapping hf://datasets/lance-format/fineweb-edu/data for ./fineweb-edu-en.
Source & license
Converted fromHuggingFaceFW/fineweb-edu. FineWeb-Edu is distributed under ODC-BY 1.0; individual document content remains subject to the rights of the original publishers. Review the upstream dataset card before downstream use.