Dataset Viewer
Auto-converted to Parquet Duplicate
id
int64
0
50k
image
imagewidth (px)
32
32
label
int32
0
9
label_name
stringclasses
10 values
image_emb
list
0
0
airplane
[ -0.036590576171875, -0.1488037109375, -0.016143798828125, -0.003185272216796875, -0.04620361328125, -0.0285186767578125, -0.01727294921875, 0.0129547119140625, 0.005588531494140625, 0.00597381591796875, 0.0075836181640625, -0.005069732666015625, 0.02569580078125, -0.007358551025390625, -...
1
6
frog
[ 0.0243072509765625, -0.0185089111328125, 0.10589599609375, 0.010162353515625, 0.005008697509765625, -0.012939453125, 0.0399169921875, 0.0023956298828125, -0.00882720947265625, 0.0362548828125, 0.00829315185546875, -0.0258941650390625, -0.014617919921875, -0.0084075927734375, 0.0713500976...
2
0
airplane
[ 0.0024547576904296875, -0.282958984375, 0.059234619140625, -0.022003173828125, -0.025787353515625, -0.038330078125, 0.0265960693359375, 0.038818359375, -0.00939178466796875, -0.0272216796875, -0.0047149658203125, 0.037811279296875, 0.037689208984375, -0.07183837890625, 0.0919189453125, ...
3
2
bird
[ 0.054168701171875, -0.09442138671875, 0.0771484375, -0.03204345703125, -0.0273590087890625, -0.009674072265625, 0.05096435546875, 0.04412841796875, 0.00382232666015625, -0.021881103515625, 0.025115966796875, 0.031341552734375, -0.0213165283203125, -0.00966644287109375, 0.043212890625, ...
4
7
horse
[ 0.0110626220703125, -0.1292724609375, 0.08502197265625, -0.0167999267578125, 0.06170654296875, 0.037139892578125, 0.01169586181640625, 0.03912353515625, 0.0014772415161132812, 0.07208251953125, 0.00278472900390625, 0.0198822021484375, 0.0078887939453125, 0.012115478515625, 0.037384033203...
5
2
bird
[ 0.0236968994140625, -0.02435302734375, 0.163330078125, -0.0256500244140625, -0.033447265625, 0.0217742919921875, -0.032958984375, 0.041290283203125, 0.0047607421875, 0.0308380126953125, 0.037017822265625, -0.0440673828125, 0.0260772705078125, -0.049346923828125, 0.052520751953125, -0.0...
6
1
automobile
[ -0.045623779296875, -0.006275177001953125, 0.048309326171875, 0.0341796875, -0.00982666015625, -0.042999267578125, 0.039520263671875, 0.040985107421875, 0.0171356201171875, 0.0947265625, -0.07550048828125, -0.0030498504638671875, 0.0271148681640625, -0.03363037109375, 0.04510498046875, ...
7
2
bird
[ 0.02105712890625, -0.05889892578125, 0.0130157470703125, -0.04156494140625, -0.03582763671875, -0.024383544921875, 0.050323486328125, 0.0301055908203125, 0.0263671875, 0.001495361328125, -0.0020503997802734375, -0.0146026611328125, -0.0157928466796875, -0.035064697265625, -0.010162353515...
8
4
deer
[ 0.01275634765625, -0.133544921875, 0.11029052734375, -0.0186920166015625, 0.00885009765625, -0.026702880859375, 0.01467132568359375, 0.036041259765625, -0.02423095703125, -0.01812744140625, 0.06304931640625, 0.002361297607421875, -0.053955078125, -0.02618408203125, 0.0535888671875, -0....
9
1
automobile
[ 0.03387451171875, -0.05438232421875, 0.017364501953125, -0.020965576171875, -0.015869140625, -0.0276031494140625, 0.01158905029296875, 0.064453125, -0.00360107421875, 0.060577392578125, 0.01004791259765625, -0.0133209228515625, -0.0167694091796875, 0.0085601806640625, 0.0286865234375, ...
10
5
dog
[ 0.0081787109375, -0.01050567626953125, 0.11962890625, -0.004730224609375, -0.031463623046875, 0.01125335693359375, 0.0338134765625, 0.037017822265625, 0.0027828216552734375, 0.07537841796875, 0.0645751953125, 0.016204833984375, -0.024688720703125, -0.042022705078125, 0.0249786376953125, ...
11
6
frog
[ 0.0340576171875, -0.0985107421875, 0.00839996337890625, -0.005619049072265625, 0.0333251953125, -0.0005440711975097656, 0.01192474365234375, -0.0172882080078125, 0.001743316650390625, 0.07183837890625, 0.00475311279296875, -0.0257415771484375, 0.0247039794921875, -0.040252685546875, 0.05...
12
6
frog
[ 0.05615234375, -0.08746337890625, 0.0963134765625, -0.0172882080078125, 0.03314208984375, -0.005321502685546875, 0.065185546875, -0.00884246826171875, 0.007965087890625, 0.0360107421875, 0.0281829833984375, 0.002582550048828125, 0.028778076171875, -0.0238189697265625, 0.03192138671875, ...
13
3
cat
[ 0.046142578125, 0.0079803466796875, 0.10028076171875, 0.0821533203125, -0.01136016845703125, 0.0175323486328125, 0.0377197265625, -0.0276641845703125, -0.02752685546875, -0.015655517578125, 0.030181884765625, -0.006153106689453125, -0.0178375244140625, 0.0019283294677734375, 0.0845336914...
14
1
automobile
[ 0.0106658935546875, -0.0894775390625, 0.039825439453125, 0.013519287109375, -0.0028324127197265625, -0.027557373046875, 0.01245880126953125, 0.0443115234375, -0.02410888671875, 0.042816162109375, -0.02825927734375, 0.0062408447265625, 0.0032958984375, 0.0212860107421875, 0.04891967773437...
15
3
cat
[ 0.037872314453125, -0.05499267578125, -0.051513671875, -0.0088653564453125, -0.0226593017578125, 0.0020198822021484375, 0.04583740234375, 0.0116729736328125, 0.010467529296875, 0.0257568359375, 0.00814056396484375, -0.0144195556640625, -0.021728515625, -0.0662841796875, 0.010040283203125...
16
5
dog
[ -0.052276611328125, -0.004497528076171875, 0.0640869140625, -0.0295257568359375, 0.051910400390625, 0.01256561279296875, 0.0269927978515625, 0.03631591796875, 0.0031299591064453125, 0.09429931640625, 0.052276611328125, -0.05181884765625, -0.0036678314208984375, -0.04949951171875, 0.05920...
17
5
dog
[ -0.01371002197265625, 0.02972412109375, 0.09063720703125, -0.021209716796875, -0.006404876708984375, 0.045257568359375, 0.02899169921875, 0.0249176025390625, -0.021514892578125, 0.05322265625, 0.0450439453125, -0.0150604248046875, -0.0093231201171875, -0.0172576904296875, 0.0577087402343...
18
8
ship
[ 0.00008469820022583008, -0.1419677734375, -0.01242828369140625, -0.002857208251953125, -0.0030765533447265625, -0.0191802978515625, 0.03607177734375, 0.0268402099609375, 0.00510406494140625, 0.01318359375, -0.0033168792724609375, 0.0142822265625, 0.00698089599609375, -0.002979278564453125,...
19
1
automobile
[ -0.0076141357421875, -0.107421875, 0.055419921875, -0.01366424560546875, 0.007293701171875, -0.03143310546875, 0.01486968994140625, 0.040679931640625, -0.01395416259765625, 0.0193023681640625, 0.0513916015625, 0.00867462158203125, 0.05029296875, 0.0289459228515625, 0.0156707763671875, ...
End of preview. Expand in Data Studio

CIFAR-10 (Lance Format)

A Lance-formatted version of CIFAR-10 with 60,000 32×32 RGB images across 10 classes, stored inline with CLIP embeddings and a pre-built IVF_PQ ANN index.

Key features

  • All multimodal data (image bytes + embeddings) stored inline in the same Lance dataset.
  • Pre-computed CLIP embeddings (OpenCLIP ViT-B-32 / laion2b_s34b_b79k, 512-dim, L2-normalized) with an IVF_PQ index.
  • BTREE on label and BITMAP on label_name for fast filtered scans.

Splits

Split Rows
train 50,000
test 10,000

Schema

Column Type Notes
id int64 Row index within the split
image large_binary Inline PNG bytes (32×32 RGB)
label int32 Class id (0-9)
label_name string One of airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck
image_emb fixed_size_list<float32, 512> CLIP image embedding (cosine-normalized)

Pre-built indices

  • IVF_PQ on image_embmetric=cosine
  • BTREE on label
  • BITMAP on label_name

Load with datasets.load_dataset

import datasets

hf_ds = datasets.load_dataset("lance-format/cifar10-lance", split="train", streaming=True)
for row in hf_ds.take(3):
    print(row["label_name"])

Load directly with Lance (recommended)

import lance

ds = lance.dataset("hf://datasets/lance-format/cifar10-lance/data/train.lance")
print(ds.count_rows(), ds.schema.names, ds.list_indices())

Load with LanceDB

import lancedb

db = lancedb.connect("hf://datasets/lance-format/cifar10-lance/data")
tbl = db.open_table("train")
print(len(tbl))

Tip — for production use, download locally first.

hf download lance-format/cifar10-lance --repo-type dataset --local-dir ./cifar10-lance

Vector search example

import lance
import pyarrow as pa

ds = lance.dataset("hf://datasets/lance-format/cifar10-lance/data/train.lance")
emb_field = ds.schema.field("image_emb")
ref = ds.take([0], columns=["image_emb"]).to_pylist()[0]["image_emb"]
query = pa.array([ref], type=emb_field.type)

neighbors = ds.scanner(
    nearest={"column": "image_emb", "q": query[0], "k": 5, "nprobes": 16, "refine_factor": 30},
    columns=["id", "label_name"],
).to_table().to_pylist()
print(neighbors)

LanceDB vector search

import lancedb

db = lancedb.connect("hf://datasets/lance-format/cifar10-lance/data")
tbl = db.open_table("train")

ref = tbl.search().limit(1).select(["image_emb"]).to_list()[0]
query_embedding = ref["image_emb"]

results = (
    tbl.search(query_embedding)
    .metric("cosine")
    .select(["id", "label_name"])
    .limit(5)
    .to_list()
)
for row in results:
    print(row["id"], row["label_name"])

Filter by class

import lance
ds = lance.dataset("hf://datasets/lance-format/cifar10-lance/data/train.lance")
ships = ds.scanner(filter="label_name = 'ship'", columns=["id"], limit=5).to_table()

Filter by class with LanceDB

import lancedb

db = lancedb.connect("hf://datasets/lance-format/cifar10-lance/data")
tbl = db.open_table("train")
ships = (
    tbl.search()
    .where("label_name = 'ship'")
    .select(["id"])
    .limit(5)
    .to_list()
)

Working with images

from pathlib import Path
import lance

ds = lance.dataset("hf://datasets/lance-format/cifar10-lance/data/train.lance")
row = ds.take([0], columns=["image", "label_name"]).to_pylist()[0]
Path(f"sample_{row['label_name']}.png").write_bytes(row["image"])

Why Lance?

  • One dataset for images + embeddings + indices + metadata — no sidecar files.
  • On-disk vector and FTS indices live next to the data, so search works on both local copies and the Hub.
  • Schema evolution: add new columns (model predictions, fresh embeddings, augmentations) without rewriting the data.

Source & license

Converted from uoft-cs/cifar10. CIFAR-10 was collected by Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton at the University of Toronto.

Citation

@techreport{krizhevsky2009cifar10,
  title={Learning multiple layers of features from tiny images},
  author={Krizhevsky, Alex and Hinton, Geoffrey},
  year={2009},
  institution={University of Toronto}
}
Downloads last month
45