Views
No views yet
1from txtai.embeddings import Embeddings
2
3# Load the index from the HF Hub
4embeddings = Embeddings()
5embeddings.load(provider="huggingface-hub", container="neuml/txtai-arxiv")
6
7# Search for papers matching a query
8embeddings.search("Survey of vector databases")
9
10# Search for papers matching an abstract
11embeddings.search("""
12Mixtral 8x7B, a Sparse Mixture of Experts (SMoE) language model. Mixtral
13has the same architecture as Mistral 7B, with the difference that each
14layer is composed of 8 feedforward blocks (i.e. experts). For every
15token, at each layer, a router network selects two experts to process
16the current state and combine their outputs.
17""")
18
19embeddings.search("""
20Humanity has wondered whether we are alone for millennia. The discovery
21of life elsewhere in the Universe, particularly intelligent life, would
22have profound effects, comparable to those of recognizing that the Earth
23is not the center of the Universe and that humans evolved from previous
24species.
25""")
26
27embeddings.search("""
28The main objective of this paper is to investigate the extent to which
29the margin of victory can be predicted solely by the rankings of the
30opposing teams in NCAA Division I men's basketball games.
31""")pip install ragdata1python -m ragdata.arxiv.index \
2 -d <path to directory with file downloaded in previous step> \
3 -o txtai-arxiv