Dataset Viewer
Auto-converted to Parquet Duplicate
entity_id
stringlengths
2
8
label
stringlengths
1
140
embedding
list
Q1406298
Serbian Empire
[ -0.07114808261394501, 0.0011354032903909683, 0.00021731224842369556, -0.03094404749572277, 0.06051676720380783, 0.0477336049079895, -0.0568060576915741, 0.04547378793358803, -0.003996067214757204, -0.004583250265568495, -0.0256132073700428, -0.0034147093538194895, 0.010147372260689735, -0....
Q1406307
Geiersbach
[ -0.08807569742202759, -0.01510357391089201, -0.057280223816633224, 0.009123101830482483, -0.04717669636011124, 0.051963891834020615, 0.04242163896560669, 0.06854347139596939, 0.04204736277461052, -0.04531671106815338, -0.04914936050772667, 0.004961846861988306, -0.0032211521174758673, 0.02...
Q1406315
Ferienhort am Wolfgangsee
[ -0.033597175031900406, 0.03846258670091629, -0.08308940380811691, -0.010165464133024216, -0.015381761826574802, 0.03782128542661667, -0.019619302824139595, 0.023611441254615784, 0.006535542197525501, -0.06008439511060715, -0.005585575010627508, -0.05370783060789108, -0.02148807980120182, 0...
Q1406338
Lucé
[ -0.09596238285303116, 0.05131402611732483, -0.0039955866523087025, -0.012038910761475563, 0.03207157924771309, 0.03134046867489815, -0.03037303127348423, 0.00396632170304656, -0.0018229794222861528, -0.06381145119667053, -0.038383517414331436, 0.009331459179520607, 0.03862404823303223, -0....
Q1406340
Ferit
[ -0.08170680701732635, -0.011148422956466675, 0.029806286096572876, -0.0175181794911623, -0.023225078359246254, 0.010058025829494, 0.0016599568771198392, 0.010788082145154476, 0.044121116399765015, -0.08234692364931107, 0.013780077919363976, -0.027757739648222923, -0.018610544502735138, -0....
Q1406359
Nordhoff
[ -0.08677693456411362, 0.009617221541702747, -0.039074741303920746, 0.017565885558724403, -0.04053390026092529, 0.023789057508111, -0.019649144262075424, 0.01328076608479023, 0.0070099602453410625, -0.04660835862159729, 0.01576145924627781, -0.03044798970222473, 0.008935363031923771, -0.038...
Q1406379
2000–01 División de Honor de Futsal
[ -0.024803485721349716, -0.027736658230423927, -0.05926187336444855, -0.00786548014730215, 0.03477201610803604, 0.01522198785096407, -0.016435550525784492, 0.09539923816919327, 0.028865231201052666, -0.053607430309057236, -0.035120297223329544, -0.03841843828558922, -0.05518597736954689, 0....
Q1406388
Ferman Akgül
[ -0.07495741546154022, 0.019466457888484, 0.006105192005634308, -0.04135382920503616, -0.04598728194832802, 0.020998673513531685, 0.02904345467686653, 0.005131517071276903, 0.029098523780703545, -0.01568852923810482, 0.00360224605537951, -0.008618252351880074, -0.04808532074093819, -0.03712...
Q1406396
Hermann Freund
[ -0.0840594694018364, -0.0010456807212904096, -0.050938576459884644, -0.03184044361114502, -0.06549481302499771, 0.0005092662759125233, 0.06702983379364014, 0.02450268343091011, 0.02116992324590683, -0.04088088497519493, -0.01512051373720169, 0.0001985176932066679, 0.03035733290016651, -0.0...
Q1406398
Schloss Bothmer
[ -0.07743982970714569, -0.021676599979400635, -0.0010304602328687906, -0.01480034738779068, -0.018414374440908432, 0.006238768808543682, 0.00972914882004261, 0.08567585796117783, 0.027895519509911537, -0.009299056604504585, 0.001993345795199275, -0.010424269363284111, -0.016008470207452774, ...
Q1406404
Richard Askey
[ -0.0718839019536972, 0.0435500405728817, 0.05989198759198189, -0.024220161139965057, -0.0956161767244339, 0.016092561185359955, -0.031036565080285072, 0.023430265486240387, 0.02635839208960533, -0.037224240601062775, 0.014309579506516457, 0.023197520524263382, 0.011275898665189743, -0.0031...
Q1406407
Blood Money
[ -0.08435123413801193, 0.021506238728761673, -0.025616584345698357, -0.008009668439626694, -0.0016138664213940501, -0.024376824498176575, -0.048879608511924744, 0.01723352260887623, 0.04537744075059891, 0.011902268044650555, -0.0433739572763443, -0.02652907557785511, 0.003124147653579712, -...
End of preview. Expand in Data Studio

200k Wikidata Embeddings (EmbeddingGemma)

Text embeddings for ~200,000 Wikidata entities, generated from each entity's English label with Google's open google/embeddinggemma-300m model. Vectors are 768-dimensional and unit length (the model normalizes its output), so cosine similarity equals a plain dot product.

What's inside

Column Type Description
entity_id string Wikidata Q-identifier, e.g. Q42
label string English label, e.g. Douglas Adams
embedding list<float32>[768] Unit-length embedding of the label
  • Rows: 199,998
  • Dimensions: 768
  • Normalization: L2 (every vector has norm 1.0, applied by the model)
  • Source model: google/embeddinggemma-300m
  • File: gemma.parquet

The entities are a sample of the full Wikidata label set (~118.7M labelled entities). Only the label string was embedded — no descriptions, aliases, or statements were used.

Usage

from datasets import load_dataset

ds = load_dataset("dejanseo/200k-wiki-data-embeddings-gemma", split="train")
print(ds[0]["entity_id"], ds[0]["label"])
print(len(ds[0]["embedding"]))  # 768

Semantic search with cosine similarity (a dot product, since vectors are unit-length):

import numpy as np

emb = np.array(ds["embedding"], dtype=np.float32)   # (199998, 768)
ids = ds["entity_id"]
labels = ds["label"]

def nearest(query_vec, k=10):
    scores = emb @ np.asarray(query_vec, dtype=np.float32)  # cosine similarity
    top = np.argsort(-scores)[:k]
    return [(ids[i], labels[i], float(scores[i])) for i in top]

To embed a new query with the same model:

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("google/embeddinggemma-300m")
q = model.encode_query("science fiction author")   # matches the query prompt
hits = nearest(q, k=10)

How it was built

  1. English labels were pulled from a local Wikidata label database.
  2. Each label was embedded with google/embeddinggemma-300m in document mode (encode_document), which applies the model's document prompt.
  3. The model returns unit-length vectors, which were written to Parquet as-is.

Companion dataset

A parallel set of embeddings for the same 199,998 entities was produced with Google's gemini-embedding-001 API model (also 768-dim, unit-length). Because the entity_id keys are identical, the two sets can be joined row-for-row for cross-model comparison.

Note on cross-model use: the two models place entities in differently-oriented spaces. Do not compare a Gemma vector directly against a Gemini vector — raw cross-model similarity is meaningless. Within a single model, similarity is well-behaved.

Licensing

Wikidata labels are released under CC0. The embedding vectors are derived outputs of google/embeddinggemma-300m and are subject to the Gemma Terms of Use. Choose and set a license: value in the metadata above that reflects how you intend to distribute the derived vectors before publishing.

Citation

If you use this dataset, please cite the source model and Wikidata:

  • Google, EmbeddingGemma (google/embeddinggemma-300m)
  • Wikidata (Wikimedia Foundation)
Downloads last month
-