The Dataset Viewer has been disabled on this dataset.

B-Sides Yearly Model Indexes

Semantic search index over 428,440 text generation models on the Hugging Face Hub, covering 2023 through 2026. This is the data behind the B-Sides V2 search Space.

Every model gets one 256 dimensional vector. Search is a plain dot product.

What got embedded

This is the part that makes it different from a model card scrape. Most Hub metadata sets stop at the README. This one goes into the repository and reads the files:

Source What it is
metadata Synthesized record: repo id, author, sha, dates, pipelines, model type, base model, tags, downloads, likes, license, gated
readme The root README.md, meaning the model card
config The root config.json, which is where the real architecture lives
python Every .py file in the repository, at any depth

Those last two rows are the point. A model with an empty or one line README still gets a useful vector, because its config.json and its custom modeling code carry the architecture. Hidden size, layer count, expert count, context length, attention type, and any hand written kernel or modeling file all end up in the embedding.

Fetching is capped at 2 MiB per file and 16 MiB per repository. config.json is fetched ahead of the .py files, so a repository that hits the cap drops custom code rather than losing its architecture.

How a vector is built

  1. Text is split into line preserving chunks of about 1,200 tokens with 150 tokens of overlap (tiktoken).
  2. Chunks are embedded with the OpenAI text-embedding-3-small model at dimensions=256, through the Batch API.
  3. Every chunk vector for a model is mean pooled into one vector.
  4. The pooled vector is L2 normalized and stored as float16.

Because the vectors are pre-normalized, cosine similarity is just a dot product.

Layout

The full combined index sits at the root. Each year is also available on its own.

embeddings.f16.npy        combined, all years, 428,440 x 256 float16
meta.sqlite               combined metadata
merge-manifest.json       row counts and provenance

2023-text-models/2023-text-generation-embeddings.f16.npy
2023-text-models/2023-text-generation-meta.sqlite
2024-text-models/ ...
2025-text-models/ ...
2026-text-models/ ...

The per year files carry the year in the filename on purpose, so four downloads in one folder cannot be mixed up.

Row alignment

In any pair of files, row i of the .npy matrix is the model at row = i in the models table of the matching .sqlite. The combined index is a straight in order concatenation of the years, so a year's rows map into the root by a fixed offset:

Folder Models Rows in the combined index
2023-text-models 46,431 0 to 46,430
2024-text-models 127,076 46,431 to 173,506
2025-text-models 138,794 173,507 to 312,300
2026-text-models 116,139 312,301 to 428,439

Row numbers are only meaningful inside one matched pair. Do not read a per year matrix against the combined database.

meta.sqlite

One models table, keyed on row, unique on model_id. Alongside the usual Hub fields (author, dates, downloads, likes, tags, license, gated) it carries the architecture columns pulled out of config.json: model_type, architectures, hidden_size, num_layers, context_len, num_experts, attention_type, state_space_type, vision_encoder, arch_hash, plus code_imports from the Python files and the full config JSON. Indexes exist on month, created_at, downloads, likes, author, model_type, and arch_hash.

Note that the raw README prose is not redistributed here. It was read, chunked, and embedded, but only the vector and the structured fields are stored.

Using it

import sqlite3
import numpy as np
from huggingface_hub import hf_hub_download

repo = "juiceb0xc0de/b-sides-hf-yearly-model-indexes"
vectors = np.load(hf_hub_download(repo, "embeddings.f16.npy", repo_type="dataset"))
db = sqlite3.connect(hf_hub_download(repo, "meta.sqlite", repo_type="dataset"))

# query_vector: text-embedding-3-small at dimensions=256, L2 normalized
scores = vectors.astype(np.float32) @ query_vector
for row in np.argsort(-scores)[:20]:
    model_id, downloads = db.execute(
        "SELECT model_id, downloads FROM models WHERE row = ?", (int(row),)
    ).fetchone()
    print(f"{scores[row]:.3f}  {model_id}  {downloads}")

Query vectors have to come from the same model at the same dimension count, otherwise the geometry does not line up.

Notes

Counts and downloads are a snapshot from crawl time, not live Hub numbers. Coverage is the text-generation and text2text-generation pipelines.

Downloads last month
-