快照格式的常用数据集

您可能会发现从数据集中创建嵌入是一个非常耗费资源的任务。如果您需要练习数据集,请随意选择本页面上的现成快照之一。这些快照包含预计算的向量,您可以轻松地将它们导入到您的 Qdrant 实例中。

可用数据集

我们的快照通常从公开可用的数据集生成,这些数据集通常用于非商业或学术目的。以下数据集当前可用。请点击数据集名称以查看其详细描述。

数据集模型向量大小文档大小Qdrant 快照HF Hub
Arxiv.org 标题InstructorXL7682.3M7.1 GB下载打开
Arxiv.org 摘要InstructorXL7682.3M8.4 GB下载打开
Wolt 食物clip-ViT-B-325121.7M7.9 GB下载打开

下载快照后,您需要在启动时使用 Qdrant CLI 或通过 API 来恢复它

Qdrant 在 Hugging Face 上

HuggingFace

Hugging Face 提供了一个共享和使用机器学习模型及数据集的平台。Qdrant 是其中的一个组织!我们的目标是为您提供包含神经嵌入的数据集,您可以使用这些数据集来练习 Qdrant 并构建基于语义搜索的应用程序。如果您希望看到特定的数据集,请告诉我们!

如果您不熟悉Hugging Face 数据集,或者想了解如何将其与 Qdrant 结合使用,请参阅教程

Arxiv.org

Arxiv.org 是一个备受推崇的多领域电子预印本开放获取存储库。由康奈尔大学运营,arXiv 允许研究人员在正式发表前与科学界分享他们的研究成果并获得反馈。其存档库包含数百万篇学术文章,是探索前沿科学研究的宝贵资源。arXiv 汇集了来自世界各地科学家的高频日常提交,形成了一个全面、不断发展的数据集,非常适合挖掘、分析和未来创新的发展。

Arxiv.org 标题

此数据集包含仅从论文标题生成的嵌入。每个向量都带有有效载荷 (payload),其中包含用于创建向量的标题以及 DOI(数字对象标识符)。

{
    "title": "Nash Social Welfare for Indivisible Items under Separable, Piecewise-Linear Concave Utilities",
    "DOI": "1612.05191"
}

使用 InstructorXL 模型生成的嵌入是按照以下指令生成的

表示用于检索的论文标题;输入

以下代码片段展示了如何使用 InstructorXL 模型生成嵌入

from InstructorEmbedding import INSTRUCTOR

model = INSTRUCTOR("hkunlp/instructor-xl")
sentence = "3D ActionSLAM: wearable person tracking in multi-floor environments"
instruction = "Represent the Research Paper title for retrieval; Input:"
embeddings = model.encode([[instruction, sentence]])

数据集快照可以在此处下载。

导入数据集

使用提供的数据集最简单的方法是通过 API 恢复它,将 URL 作为位置传递。这在Qdrant Cloud 中也适用。以下代码片段展示了如何创建一个新的集合并用快照数据填充它

PUT /collections/{collection_name}/snapshots/recover
{
  "location": "https://snapshots.qdrant.io/arxiv_titles-3083016565637815127-2023-05-29-13-56-22.snapshot"
}

Arxiv.org 摘要

此数据集包含从论文摘要生成的嵌入。每个向量都带有有效载荷 (payload),其中包含用于创建向量的摘要以及 DOI(数字对象标识符)。

{
    "abstract": "Recently Cole and Gkatzelis gave the first constant factor approximation\nalgorithm for the problem of allocating indivisible items to agents, under\nadditive valuations, so as to maximize the Nash Social Welfare. We give\nconstant factor algorithms for a substantial generalization of their problem --\nto the case of separable, piecewise-linear concave utility functions. We give\ntwo such algorithms, the first using market equilibria and the second using the\ntheory of stable polynomials.\n  In AGT, there is a paucity of methods for the design of mechanisms for the\nallocation of indivisible goods and the result of Cole and Gkatzelis seemed to\nbe taking a major step towards filling this gap. Our result can be seen as\nanother step in this direction.\n",
    "DOI": "1612.05191"
}

使用 InstructorXL 模型生成的嵌入是按照以下指令生成的

表示用于检索的论文摘要;输入

以下代码片段展示了如何使用 InstructorXL 模型生成嵌入

from InstructorEmbedding import INSTRUCTOR

model = INSTRUCTOR("hkunlp/instructor-xl")
sentence = "The dominant sequence transduction models are based on complex recurrent or convolutional neural networks in an encoder-decoder configuration. The best performing models also connect the encoder and decoder through an attention mechanism. We propose a new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely. Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train."
instruction = "Represent the Research Paper abstract for retrieval; Input:"
embeddings = model.encode([[instruction, sentence]])

数据集快照可以在此处下载。

导入数据集

使用提供的数据集最简单的方法是通过 API 恢复它,将 URL 作为位置传递。这在Qdrant Cloud 中也适用。以下代码片段展示了如何创建一个新的集合并用快照数据填充它

PUT /collections/{collection_name}/snapshots/recover
{
  "location": "https://snapshots.qdrant.io/arxiv_abstracts-3083016565637815127-2023-06-02-07-26-29.snapshot"
}

Wolt 食物

我们的美食发现演示依赖于来自 Wolt 应用的食物图片数据集。集合中的每个点代表一道菜和一张图片。图片被表示为包含 512 个浮点数的向量。每个点还附带一个 JSON 有效载荷 (payload),如下所示

{
    "cafe": {
        "address": "VGX7+6R2 Vecchia Napoli, Valletta",
        "categories": ["italian", "pasta", "pizza", "burgers", "mediterranean"],
        "location": {"lat": 35.8980154, "lon": 14.5145106},
        "menu_id": "610936a4ee8ea7a56f4a372a",
        "name": "Vecchia Napoli Is-Suq Tal-Belt",
        "rating": 9,
        "slug": "vecchia-napoli-skyparks-suq-tal-belt"
    },
    "description": "Tomato sauce, mozzarella fior di latte, crispy guanciale, Pecorino Romano cheese and a hint of chilli",
    "image": "https://wolt-menu-images-cdn.wolt.com/menu-images/610936a4ee8ea7a56f4a372a/005dfeb2-e734-11ec-b667-ced7a78a5abd_l_amatriciana_pizza_joel_gueller1.jpeg",
    "name": "L'Amatriciana"
}

使用 clip-ViT-B-32 模型生成的嵌入是使用以下代码片段生成的

from PIL import Image
from sentence_transformers import SentenceTransformer

image_path = "5dbfd216-5cce-11eb-8122-de94874ad1c8_ns_takeaway_seelachs_ei_baguette.jpeg"

model = SentenceTransformer("clip-ViT-B-32")
embedding = model.encode(Image.open(image_path))

数据集快照可以在此处下载。

导入数据集

使用提供的数据集最简单的方法是通过 API 恢复它,将 URL 作为位置传递。这在Qdrant Cloud 中也适用。以下代码片段展示了如何创建一个新的集合并用快照数据填充它

PUT /collections/{collection_name}/snapshots/recover
{
  "location": "https://snapshots.qdrant.io/wolt-clip-ViT-B-32-2446808438011867-2023-12-14-15-55-26.snapshot"
}
此页面有用吗?

感谢您的反馈!🙏

很抱歉听到这个消息。😔 您可以在 GitHub 上编辑此页面,或创建一个 GitHub issue。