Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
text: string
split: string
num_queries: int64
dim: int64
shape: list<item: int64>
  child 0, item: int64
query_maxlen: int64
dtype: string
to
{'split': Value('string'), 'num_queries': Value('int64'), 'query_maxlen': Value('int64'), 'dim': Value('int64'), 'dtype': Value('string'), 'shape': List(Value('int64'))}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
                  return get_rows(
                         ^^^^^^^^^
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                         ^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/utils.py", line 478, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2815, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2352, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2377, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 310, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 130, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2369, in table_cast
                  return cast_table_to_schema(table, schema)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              text: string
              split: string
              num_queries: int64
              dim: int64
              shape: list<item: int64>
                child 0, item: int64
              query_maxlen: int64
              dtype: string
              to
              {'split': Value('string'), 'num_queries': Value('int64'), 'query_maxlen': Value('int64'), 'dim': Value('int64'), 'dtype': Value('string'), 'shape': List(Value('int64'))}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

MS MARCO v2 — ColBERTv2 fp32 Multi-Vector Embeddings (uncompressed)

Per-token multi-vector embeddings for the full MS MARCO v2 passage corpus (~138.4M passages) plus the dev / dev2 queries, produced with the official ColBERTv2 checkpoint (colbert-ir/colbertv2.0).

  • Precision: fp32 (NO residual quantization, NO pooling)
  • Dim: 128 per token
  • Corpus token vectors: ~9.41B (avg ~68 tokens/passage)
  • Total corpus size: ~4.82 TB

These embeddings are uncompressed on purpose (research on multi-vector indexing). If you only need a usable index, the official ColBERT 2-bit PLAID index is ~10x smaller.

Layout

corpus/                         # passage embeddings (official ColBERT packed layout)
  <chunk_id>.pt                 # fp32 tensor [sum(doclens_in_chunk), 128]
  doclens.<chunk_id>.json       # token count per passage in this chunk
  <chunk_id>.metadata.json      # {passage_offset, num_passages, num_embeddings}
  plan.json                     # global plan (num_chunks=1384, chunk_size=100000, ...)
queries/                        # query embeddings (official ColBERT query mode)
  queries_dev.pt                # fp32 tensor [3903, 32, 128]   (fixed length)
  queries_dev.qids.json         # query ids aligned with dim 0
  queries_dev2.pt               # fp32 tensor [4281, 32, 128]
  queries_dev2.qids.json
scripts/                        # reproduction + loaders
  encode_msmarco_v2.py          # corpus encoder (8-GPU, resumable)
  encode_queries_v2.py          # query encoder
  verify_embeddings.py          # integrity report + passage reconstruction
  prepare_corpus.py             # download/flatten mteb/msmarco-v2 corpus

Passage chunks use packed, variable-length storage (no padding). Each <chunk_id>.pt holds all token vectors of up to 100,000 passages concatenated; doclens.<chunk_id>.json lets you slice them back per passage.

Global passage index: global_pid = chunk_id * 100000 + local_idx.

Loading

A passage's multi-vector matrix

import torch, json, numpy as np
from huggingface_hub import hf_hub_download

repo = "yaooooo233/msmarco-v2-colbertv2-fp32"
chunk_id, local_idx = 0, 5

pt   = hf_hub_download(repo, f"corpus/{chunk_id}.pt", repo_type="dataset")
dl   = hf_hub_download(repo, f"corpus/doclens.{chunk_id}.json", repo_type="dataset")
D    = torch.load(pt)                    # [T, 128] fp32
lens = json.load(open(dl))
off  = np.concatenate([[0], np.cumsum(lens)])
P    = D[off[local_idx]:off[local_idx+1]]   # [tokens, 128]

Query matrices

qpt  = hf_hub_download(repo, "queries/queries_dev.pt", repo_type="dataset")
qids = hf_hub_download(repo, "queries/queries_dev.qids.json", repo_type="dataset")
Q    = torch.load(qpt)                    # [3903, 32, 128] fp32
ids  = json.load(open(qids))              # query ids aligned with Q[i]

ColBERT MaxSim score (query i vs passage P)

# Q[i]: [32,128], P: [tokens,128]  (both L2-normalized)
score = (Q[i] @ P.T).max(dim=1).values.sum().item()

Reproduction

Corpus and queries can be regenerated from mteb/msmarco-v2 with the scripts in scripts/ using the official colbert-ir/colbertv2.0 checkpoint. Full corpus encoding takes ~11h on 4–8× A100.

Citation

Built on MS MARCO (Nguyen et al., 2016), ColBERTv2 (Santhanam et al., 2022), and the MTEB mteb/msmarco-v2 distribution. Please cite those works.

Downloads last month
1,492