lyunee's picture
Document LCS-10000 raw patch blocks and paired last-token features
02873e3 verified
|
Raw History Blame
49.1 kB
metadata
pretty_name: RAVEL Vision Encoder Features
language:
  - en
task_categories:
  - image-classification
  - other
license: other
license_name: upstream-data-and-model-terms
license_link: >-
  https://huggingface.co/datasets/336labs/VisionEncoder-Features/blob/main/LICENSES.md
size_categories:
  - 100K<n<1M
source_datasets:
  - liuhaotian/LLaVA-Pretrain
  - ILSVRC/imagenet-1k
tags:
  - vision-encoder-evaluation
  - multimodal
  - feature-extraction
  - ravel
  - numpy
  - arxiv:2610.05413
configs:
  - config_name: lcs558k_n1000_seed42
    default: true
    data_files:
      - split: train
        path: lcs558k/n1000_seed42/samples/samples.jsonl
  - config_name: lcs558k_n10000_seed42plus43
    data_files:
      - split: train
        path: lcs558k/n10000_seed42plus43/samples/samples.jsonl
  - config_name: imagenet1k_train200k
    data_files:
      - split: train
        path: imagenet1k/train200k/samples/samples.jsonl

A Strong Baseline for Evaluating Vision Encoders
in Multimodal Large Language Models

RAVEL · Vision Encoder Feature Dataset

Yilin Yang · Jun-Tao Tang · Kengyi Wang
Siyuan Su · Gaoyong Luo · Mingda Chen

Paper Code MLLM checkpoints Feature files Citation

Dataset Summary

This dataset provides cached representations for the 70 vision encoders / visual tokenizers evaluated in A Strong Baseline for Evaluating Vision Encoders in Multimodal Large Language Models. It includes 43 language-supervised, 22 self-supervised, and 5 discrete encoders, with shared sample order across encoders within each subset.

The release contains LCS-558K image patch features for RAVEL and other paired image–text probes, three matching language-model text feature arrays, and ImageNet-1K pooled image features for kNN and linear probes. Each encoder has its own metadata. The original NumPy arrays and storage precision are retained.

Release status: LCS-10000 upload in progress. LCS-1000 and ImageNet200k are complete. FILES.json lists the expected larger-cache contents; new arrays become available as batches are committed.

Resources: Paper · Evaluation code · MLLM Model Zoo and encoder weights · Encoder catalog · File inventory

Dataset Structure

Component Arrays Shape Storage dtype Size (GiB)
LCS-1000 visual patches 70 [1000, T, D] float16 55.27
Aligned LLM text vectors 3 [1000, D] float32 0.02
LCS-10000 visual patches (two blocks per encoder) 140 [5000, T, D] float16 552.74
LCS-10000 historical last-token text (two blocks per model) 6 [5000, D] float32 0.21
ImageNet200k pooled features 70 [200000, D] float32 59.89

Total prepared contents, including shared metadata and protocols: approximately 668.18 GiB. NumPy sizes include their headers; no extra precision conversion was applied.

README.md
LICENSES.md
encoders.json
FILES.json
checksums.sha256
lcs558k/n1000_seed42/
  samples/
    samples.jsonl
    manifest.json
    images_manifest.json
    source_indices.npy
  vision/
    <tokenizer_id>_patch_n1000_seed42.npy
    <tokenizer_id>_patch_n1000_seed42.json
  text/
    <llm_id>_penultimate_mean_n1000_seed42.npy
    <llm_id>_penultimate_mean_n1000_seed42.audit.json
lcs558k/n10000_seed42plus43/
  feature_manifest.json
  samples/{samples.jsonl,manifest.json,source_indices.npy}
  samples/part0_seed42/{samples.jsonl,manifest.json,source_indices.npy}
  samples/part1_seed43_disjoint/{samples.jsonl,manifest.json,source_indices.npy}
  samples/{disjoint_sample_audit.json,index_semantics.json}
  vision/<tokenizer_id>/{part0_seed42,part1_seed43_disjoint}.npy
  vision/<tokenizer_id>/{part0_seed42,part1_seed43_disjoint}.json
  text/<llm_id>/{part0_seed42,part1_seed43_disjoint}_penultimate_lasttok.npy
  text/<llm_id>/{part0_seed42,part1_seed43_disjoint}_penultimate_lasttok.audit.json
imagenet1k/train200k/
  samples/{samples.jsonl,manifest.json}
  features/<rank>_<tokenizer_id>.npy
  metadata/<rank>_<tokenizer_id>.json
  labels.npy
  source_indices.npy
  export_manifest.json
  manifest.tsv
  protocols/{knn_seed42.json,generation_receipt.json}

LCS-558K: 1,000 paired examples, seed 42

The source is the blip_laion_cc_sbu_558k.json alignment annotation set from LLaVA-Pretrain. The cached subset was sampled with numpy.default_rng(42).choice, without replacement, retaining the unsorted sampled order. The ordered manifest identifies the exact selected records; the original full-source annotation hash/revision is not recorded in every historical audit.

Each visual array has shape [1000, T, D], stored as float16; patch count T and dimension D depend on the encoder. The text arrays are float32, with one vector per matching caption:

ID Language model Shape Text extraction
qwen25 Qwen2.5-1.5B-Instruct [1000, 1536] Penultimate hidden state, mean over valid tokens
qwen3 Qwen3-1.7B [1000, 2048] Penultimate hidden state, mean over valid tokens
smollm2 SmolLM2-1.7B-Instruct [1000, 2048] Penultimate hidden state, mean over valid tokens

Text extraction uses layer -2, right padding, no truncation, bfloat16 inference, and float32 storage. The audits record pinned model revisions, file hashes, extraction settings, and software versions. These are the mean-token text features used by the current paper reproduction pipeline.

Row i in every visual array and every text array refers to row i of samples/samples.jsonl. Keep this order when comparing encoders. Fields are:

Field Meaning
row_index Zero-based row in the released arrays
source_index Record index in the original LCS alignment annotation list
image_id Image path relative to the upstream image archive
text_id Source text/example identifier
text Caption used for text feature extraction

The full manifest additionally retains the source conversation records and sampling information. Raw images are available from the upstream dataset.

LCS-558K: 10,000 paired examples, seed 42 + disjoint seed 43

This larger cache contains 70 encoders × 10,000 images as raw float16 patch tokens, stored in two ordered 5,000-row blocks per encoder. The first block uses the fixed seed-42 sample; the second uses seed 43 after excluding the first block by source annotation index, image ID, text ID, and image-file content hash. The original first block contains 11 repeated image-content rows; the disjoint-content check applies between blocks and within the new block. The two blocks have matching patch shapes and storage dtypes for each encoder.

Block Combined rows Visual array shape Sample order
part0_seed42 0:5000 [5000, T, D] Fixed seed-42 sample, unsorted
part1_seed43_disjoint 5000:10000 [5000, T, D] Disjoint seed-43 complement, unsorted

The combined sample table has 10,000 records. row_index addresses the combined sample table; block_index and block_row_index address the stored feature array. source_index identifies the original LCS annotation record. The released source_indices.npy files are reconstructed from the canonical manifests. Historical indices_n5000 / indices_new5000 files contained only 0..4999 block row positions; those positions are not original annotation indices.

The paired text cache contains Qwen2.5-1.5B-Instruct, Qwen3-1.7B, and SmolLM2-1.7B-Instruct, each as two float32 arrays of [5000, D] (D=1536, 2048, 2048). These historical arrays use the penultimate hidden state at the last non-padding token. Their metadata retains the original extraction audit and manifest hashes. Exact historical model revisions are absent from these audits. This text surface differs from the mean over valid tokens used by the published LCS-1000 paper cache; choose the intended surface explicitly.

Use feature_manifest.json, the block sample manifests, and index_semantics.json when loading the arrays. The 1,000- and 5,000-sample seed-42 draws were sampled independently; do not assume the LCS-1000 cache is the first 1,000 rows of this larger cache. No visual pooling, PCA, whitening, or precision conversion was applied to these blocks.

ImageNet-1K: 200,000 training examples

The subset contains 200 examples per class, across 1,000 classes, from the official ImageNet-1K training split. The export records a support-sampling seed of 0; the exact selected examples are given by source_indices.npy. All 70 arrays have shape [200000, D] and are stored as float32. Shared source_indices.npy is strictly increasing in the original train-index order; labels.npy contains integer class IDs 0–999.

The sample table contains row_index, source_index, and label. Each array's readout is recorded in its metadata: for example, CLIP uses its final post-LayerNorm CLS before the visual projection, while the DINO readout concatenates normalized CLS and mean patch features. Use the per-encoder representation description when interpreting dimensions. These pooled/readout arrays have different semantics from the LCS patch-token arrays.

protocols/knn_seed42.json provides the existing deterministic 195-example training pool / 5-example query split per class, with nested training subsets of 5, 10, 20, 45, 95, and 195 examples per class. Protocol indices address the released 200,000-row arrays; source indices identify examples in the original training split. The query split consists of held-out examples from that training subset. Full ImageNet training and validation features are outside this release.

Download and Use

Install huggingface_hub and numpy; install datasets to load the sample tables.

Download one encoder with aligned text features

import json
from pathlib import Path
import numpy as np
from huggingface_hub import snapshot_download

root = Path(snapshot_download(
    repo_id="336labs/VisionEncoder-Features",
    repo_type="dataset",
    allow_patterns=[
        "encoders.json", "README.md", "LICENSES.md",
        "lcs558k/n1000_seed42/samples/**",
        "lcs558k/n1000_seed42/vision/clip_openai__l14*",
        "lcs558k/n1000_seed42/text/qwen3*",
    ],
    local_dir="VisionEncoder-Features",
))
base = root / "lcs558k/n1000_seed42"
vision = np.load(base / "vision/clip_openai__l14_patch_n1000_seed42.npy",
                 mmap_mode="r", allow_pickle=False)
text = np.load(base / "text/qwen3_penultimate_mean_n1000_seed42.npy",
               mmap_mode="r", allow_pickle=False)
samples = json.loads((base / "samples/manifest.json").read_text())["records"]
assert vision.shape[0] == text.shape[0] == len(samples) == 1000

Download one encoder from the 10,000-sample cache

import json
from pathlib import Path
import numpy as np
from huggingface_hub import snapshot_download

root = Path(snapshot_download(
    repo_id="336labs/VisionEncoder-Features",
    repo_type="dataset",
    allow_patterns=[
        "encoders.json", "README.md", "LICENSES.md",
        "lcs558k/n10000_seed42plus43/feature_manifest.json",
        "lcs558k/n10000_seed42plus43/samples/**",
        "lcs558k/n10000_seed42plus43/vision/clip_openai__l14/**",
        "lcs558k/n10000_seed42plus43/text/qwen3/**",
    ],
    local_dir="VisionEncoder-Features",
))
base = root / "lcs558k/n10000_seed42plus43"
blocks = ["part0_seed42", "part1_seed43_disjoint"]
vision_parts = [np.load(base / f"vision/clip_openai__l14/{part}.npy",
                        mmap_mode="r", allow_pickle=False) for part in blocks]
text_parts = [np.load(base / f"text/qwen3/{part}_penultimate_lasttok.npy",
                      mmap_mode="r", allow_pickle=False) for part in blocks]
samples = json.loads((base / "samples/manifest.json").read_text())["records"]
assert len(samples) == sum(x.shape[0] for x in vision_parts) == 10000
for block_index in range(2):
    assert vision_parts[block_index].shape[0] == text_parts[block_index].shape[0] == 5000
# A combined row r maps to vision_parts[r // 5000][r % 5000].
# Process the blocks in order to avoid allocating a full concatenated array.

Download pooled ImageNet features

import json
from pathlib import Path
import numpy as np
from huggingface_hub import snapshot_download

root = Path(snapshot_download(
    repo_id="336labs/VisionEncoder-Features",
    repo_type="dataset",
    allow_patterns=[
        "encoders.json", "README.md", "LICENSES.md",
        "imagenet1k/train200k/features/001_clip_openai__l14.npy",
        "imagenet1k/train200k/metadata/001_clip_openai__l14.json",
        "imagenet1k/train200k/labels.npy",
        "imagenet1k/train200k/source_indices.npy",
        "imagenet1k/train200k/samples/**",
        "imagenet1k/train200k/protocols/**",
    ],
    local_dir="VisionEncoder-Features",
))
base = root / "imagenet1k/train200k"
features = np.load(base / "features/001_clip_openai__l14.npy",
                   mmap_mode="r", allow_pickle=False)
labels = np.load(base / "labels.npy", allow_pickle=False)
protocol = json.loads((base / "protocols/knn_seed42.json").read_text())
train_rows = np.asarray(protocol["train_indices_by_shot"]["20"])
query_rows = np.asarray(protocol["query_indices"])

Load the sample tables with Hugging Face Datasets

from datasets import load_dataset

lcs_samples = load_dataset("336labs/VisionEncoder-Features",
                           "lcs558k_n1000_seed42", split="train")
lcs10k_samples = load_dataset("336labs/VisionEncoder-Features",
                              "lcs558k_n10000_seed42plus43", split="train")
imagenet_samples = load_dataset("336labs/VisionEncoder-Features",
                                "imagenet1k_train200k", split="train")

The three dataset configurations expose sample metadata tables in the Dataset Viewer and load_dataset. Download the large feature arrays separately and load them with NumPy. A complete download uses snapshot_download with repo_type="dataset" and no allow_patterns; selective downloads are usually sufficient.

Encoder Catalog

encoders.json maps all 70 tokenizer IDs to their LCS-1000, LCS-10000 block, and ImageNet array paths, metadata, shapes, and upstream encoder sources. The lcs_patch_n10000.blocks entries specify each block's global row range and shared sample manifest. Upstream links identify the encoder projects and downloadable weights; an exact historical weight revision is provided only where the original audit recorded one.

Tokenizer ID Family LCS [T, D] ImageNet D Feature files
toklip_l_384 DISCRETE [576, 1152] 1152 patches · pooled · 10k blocks
toklip_s_256 DISCRETE [256, 1152] 1152 patches · pooled · 10k blocks
uniar_bsq DISCRETE [1024, 4608] 4096 patches · pooled · 10k blocks
unitok_attn DISCRETE [256, 1024] 1024 patches · pooled · 10k blocks
vilau_256 DISCRETE [256, 1024] 1024 patches · pooled · 10k blocks
clip_openai__l14 LANG [256, 1024] 1024 patches · pooled · 10k blocks
mc1_b16_224_2.5b LANG [196, 768] 768 patches · pooled · 10k blocks
mc1_b16_224_400m LANG [196, 768] 768 patches · pooled · 10k blocks
mc1_b32_224_2.5b LANG [49, 768] 768 patches · pooled · 10k blocks
mc1_b32_224_400m LANG [49, 768] 768 patches · pooled · 10k blocks
mc1_g14_224_2.5b LANG [256, 1664] 1664 patches · pooled · 10k blocks
mc1_h14_224_2.5b LANG [256, 1280] 1280 patches · pooled · 10k blocks
mc1_h14_224_v1.2 LANG [256, 1280] 1280 patches · pooled · 10k blocks
mc1_l14_224_2.5b LANG [256, 1024] 1024 patches · pooled · 10k blocks
mc1_l14_224_400m LANG [256, 1024] 1024 patches · pooled · 10k blocks
mc2_b16_224 LANG [196, 768] 768 patches · pooled · 10k blocks
mc2_b16_384 LANG [576, 768] 768 patches · pooled · 10k blocks
mc2_b32_224 LANG [49, 768] 768 patches · pooled · 10k blocks
mc2_b32_224_mt5 LANG [49, 768] 768 patches · pooled · 10k blocks
mc2_b32_384 LANG [144, 768] 768 patches · pooled · 10k blocks
mc2_g14_224 LANG [256, 1664] 1664 patches · pooled · 10k blocks
mc2_g14_378 LANG [729, 1664] 1664 patches · pooled · 10k blocks
mc2_h14_378 LANG [729, 1280] 1280 patches · pooled · 10k blocks
mc2_l14_224 LANG [256, 1024] 1024 patches · pooled · 10k blocks
mc2_m16_224 LANG [196, 512] 512 patches · pooled · 10k blocks
mc2_m16_224_mt5 LANG [196, 512] 512 patches · pooled · 10k blocks
mc2_m16_384 LANG [576, 512] 512 patches · pooled · 10k blocks
mc2_s16_224 LANG [196, 384] 384 patches · pooled · 10k blocks
mc2_s16_224_mt5 LANG [196, 384] 384 patches · pooled · 10k blocks
mc2_s16_384 LANG [576, 384] 384 patches · pooled · 10k blocks
pe_core_b16_224 LANG [196, 768] 768 patches · pooled · 10k blocks
pe_core_g14_448 LANG [1024, 1536] 1536 patches · pooled · 10k blocks
pe_lang_l14_448 LANG [1024, 1024] 1024 patches · pooled · 10k blocks
siglip2_b16_224 LANG [196, 768] 768 patches · pooled · 10k blocks
siglip2_b16_256 LANG [256, 768] 768 patches · pooled · 10k blocks
siglip2_b16_384 LANG [576, 768] 768 patches · pooled · 10k blocks
siglip2_b16_512 LANG [1024, 768] 768 patches · pooled · 10k blocks
siglip2_b32_256 LANG [64, 768] 768 patches · pooled · 10k blocks
siglip2_g16_256 LANG [256, 1536] 1536 patches · pooled · 10k blocks
siglip2_g16_384 LANG [576, 1536] 1536 patches · pooled · 10k blocks
siglip2_l16_256 LANG [256, 1024] 1024 patches · pooled · 10k blocks
siglip2_l16_384 LANG [576, 1024] 1024 patches · pooled · 10k blocks
siglip2_l16_512 LANG [1024, 1024] 1024 patches · pooled · 10k blocks
siglip2_sm14_224 LANG [256, 1152] 1152 patches · pooled · 10k blocks
siglip2_sm14_384 LANG [729, 1152] 1152 patches · pooled · 10k blocks
siglip2_sm16_256 LANG [256, 1152] 1152 patches · pooled · 10k blocks
siglip2_sm16_384 LANG [576, 1152] 1152 patches · pooled · 10k blocks
siglip2_sm16_512 LANG [1024, 1152] 1152 patches · pooled · 10k blocks
dino_vitb16 SSL [196, 768] 1536 patches · pooled · 10k blocks
dino_vitb8 SSL [784, 768] 1536 patches · pooled · 10k blocks
dino_vits16 SSL [196, 384] 768 patches · pooled · 10k blocks
dino_vits8 SSL [784, 384] 768 patches · pooled · 10k blocks
dinov2_base SSL [256, 768] 1536 patches · pooled · 10k blocks
dinov2_giant SSL [256, 1536] 3072 patches · pooled · 10k blocks
dinov2_large SSL [256, 1024] 2048 patches · pooled · 10k blocks
dinov2_small SSL [256, 384] 768 patches · pooled · 10k blocks
dinov3_vitl16 SSL [256, 1024] 2048 patches · pooled · 10k blocks
eupe_convnext_b SSL [64, 1024] 1024 patches · pooled · 10k blocks
eupe_vit_b SSL [256, 768] 1536 patches · pooled · 10k blocks
eupe_vit_s SSL [256, 384] 768 patches · pooled · 10k blocks
eupe_vit_t SSL [256, 192] 384 patches · pooled · 10k blocks
ijepa_vith14 SSL [256, 1280] 1280 patches · pooled · 10k blocks
pixio_vitb16 SSL [256, 768] 768 patches · pooled · 10k blocks
pixio_vith16 SSL [256, 1280] 1280 patches · pooled · 10k blocks
pixio_vitl16 SSL [256, 1024] 1024 patches · pooled · 10k blocks
raev2_dinov3l_k7 SSL [256, 1024] 1024 patches · pooled · 10k blocks
webssl_dino1b_full2b_224 SSL [256, 1536] 1536 patches · pooled · 10k blocks
webssl_mae1b_full2b_224 SSL [256, 1536] 1536 patches · pooled · 10k blocks
webssl_mae300m_full2b_224 SSL [196, 1024] 1024 patches · pooled · 10k blocks
webssl_mae3b_full2b_224 SSL [256, 3072] 3072 patches · pooled · 10k blocks

Dataset Creation and Provenance

This release assembles the project's existing feature caches. Feature arrays are published without additional pooling, quantization, or re-extraction. Released metadata uses repository-relative paths for shared samples and arrays. Inaccessible historical local paths are marked source-local:<filename>.

SHA-256 hashes of original metadata and original sample manifests are retained separately from the hashes of sanitized release files. For text features, extraction_identity preserves the original extraction identity; its manifest hash refers to the original manifest. The top-level sample_manifest_sha256 refers to the sanitized published manifest, and source_sample_manifest_sha256 retains the original hash.

All arrays passed finite-value checks before upload. Shapes/dtypes and row-order fingerprints were checked; the 70 encoder IDs match across both subsets. The ImageNet subset has exactly 200 examples per class; the kNN pool/query split is disjoint and shot subsets are nested. The repaired UniAR array matches its recorded repaired hash.

The added 140 patch arrays and six last-token text arrays passed full-file finite-value and SHA-256 checks before publication. All 70 encoder pairs have matching block shapes and dtypes. The component manifests concatenate exactly to the 10,000-row manifest, with no overlap in source index, image ID, or text ID. Text file hashes match their original extraction audits. Full source-index arrays are derived from the ordered canonical manifests, preserving the original caches.

The dataset inventory records array shapes, dtypes, byte sizes, SHA-256 hashes, and nonfinite-value counts. checksums.sha256 verifies all listed files; it excludes itself and FILES.json to avoid circular hashes. Sources were preserved during publication.

Intended Uses and Limitations

  • RAVEL and alignment probes: use paired LCS visual and text features, preserving the shared row order. LCS-1000 uses mean-token text; the historical LCS-10000 cache uses last-token text. Keep these surfaces distinct. Captions and text embeddings are required for cross-modal probes.
  • kNN and linear probes: use ImageNet pooled features with shared labels and the provided split. A full ImageNet linear-probe benchmark additionally requires the appropriate training and validation data.
  • Historical patch provenance: the original visual audits do not record a uniform feature-layer specification. Missing extraction-layer, processor, or weight-revision fields remain explicitly unverified in this release. The arrays should be interpreted using available per-encoder metadata and the extraction code, rather than assuming a common layer/readout.
  • UniAR correction (LCS-1000 only): the published LCS-1000 UniAR array uses the documented legacy BSQ deepstack concatenation. One NaN at [630, 295, 1051] was replaced by 1.7109375, obtained by re-extraction with the official model. Its metadata retains original/repaired hashes, pinned model/source revisions, weight hash, and verification of the remaining 1,151 components in that BSQ vector.
  • Coverage and bias: LCS-1000 and LCS-10000 are captioned-image samples; ImageNet200k is a class-balanced training subset. Findings depend on these data sources and selected encoders. Features inherit the content and representation biases of the upstream datasets and models.
  • Scope: this release contains the three feature subsets described above. Obtain raw images and encoder weights from the upstream sources, and MLLM checkpoints from the Model Zoo. Derived PCA/distance caches and additional experiments beyond the documented subsets are outside the current release.

Licensing and Attribution

See LICENSES.md. Use of the artifacts is subject to the applicable source-dataset and encoder terms. Source license information should be checked at the upstream links before reuse or redistribution; this card does not grant new rights over upstream images, captions, or model-derived artifacts.

Citation

If you use these feature caches or RAVEL, please cite the paper and the relevant source datasets and encoders:

@misc{yang2026strong,
  title={A Strong Baseline for Evaluating Vision Encoders in Multimodal Large Language Models},
  author={Yang, Yilin and Tang, Jun-Tao and Wang, Kengyi and Su, Siyuan and Luo, Gaoyong and Chen, Mingda},
  year={2026},
  eprint={2610.05413},
  archivePrefix={arXiv},
  primaryClass={cs.CV},
  url={https://arxiv.org/abs/2610.05413}
}

Questions or corrections: open a discussion on this dataset or an issue in the evaluation code repository.