Downloads · 30 days
33
11% of all-time downloads
burgerbee/txtai-en-wikipedia
txtai-en-wikipedia is a sentence similarity model from burgerbee. Use it when you need a score for how close two texts are. It is set up for txtai. The card lists the license as cc-by-sa-3.0.
This is a txtai embeddings index (5GB embeddings + 25GB documents) for the english edition of Wikipedia.
Downloads · 30 days
33
11% of all-time downloads
All-time downloads
291
Public
Repo size
60 GB
Likes
0
Public
Click a slice to open those files.
Other30.3 GB · 100%
From the Hugging Face model README
This is a txtai embeddings index (5GB embeddings + 25GB documents) for the english edition of Wikipedia.
Embeddings is the engine that delivers semantic search. Data is transformed into embeddings vectors where similar concepts will produce similar vectors. An embeddings index generated by txtai is a fully encapsulated index format. It doesn't require a database server.
This index is built from the Wikipedia october 2024 dataset.
The Wikipedia index works well as a fact-based context source for retrieval augmented generation (RAG). It also uses Wikipedia Page Views data to add a percentile field. The percentile field can be used
to only match commonly visited pages.
txtai must be (pip) installed to use this.
from txtai.embeddings import Embeddings
import json
# Load the index from the HF Hub
embeddings = Embeddings()
embeddings.load(provider="huggingface-hub", container="burgerbee/txtai-en-wikipedia")
# Run a search
for x in embeddings.search("Bob Dylans second album", 1):
print(x["text"])
# Run a search and filter on popular results (page views).
for x in embeddings.search("SELECT id, text, score, percentile FROM txtai WHERE similar('Where in the World Is Carmen Sandiego?') AND percentile >= 0.99", 1):
print(json.dumps(x, indent=2))
The Freewheelin' Bob Dylan is the second studio album by American singer-songwriter Bob Dylan, released on May 27, 1963 by Columbia Records... (full article)
{
"id": "Where in the World Is Carmen Sandiego? (game show)",
"text": "Where in the World Is Carmen Sandiego? is an American half-hour children's television game show based on... (full article)
"score": 0.8537465929985046,
"percentile": 0.996002961084341
}
https://dumps.wikimedia.org/enwiki/
https://dumps.wikimedia.org/other/pageview_complete/
https://huggingface.co/datasets/burgerbee/wikipedia-en-20241020