glove
收藏资源简介:
本数据集是GloVe预训练词向量的HuggingFace版本,旨在为自然语言处理任务提供高质量的预训练词嵌入表示。它包含四个主要配置:6B配置基于Wikipedia 2014和Gigaword 5语料,有400,000个词条;42B配置基于Common Crawl 42B tokens语料,有1,917,494个词条;840B配置基于Common Crawl 840B tokens语料,有2,196,017个词条;twitter27B配置基于Twitter 27B tokens语料,有1,193,514个词条。每个配置下提供不同维度的split(如25维、50维、100维、200维、300维)。每个样本包含word字段(字符串类型的原始词表token)和vector字段(float32类型的向量列表)。该数据集适用于文本分类、情感分析、机器翻译等任务,用户可按需选择配置和维度加载,总下载大小约为7.9GB。
This dataset is the HuggingFace version of GloVe pre-trained word vectors, designed to provide high-quality pre-trained word embeddings for natural language processing tasks. It includes four main configurations: the 6B configuration is based on Wikipedia 2014 and Gigaword 5 corpus, with 400,000 entries; the 42B configuration is based on the Common Crawl 42B tokens corpus, with 1,917,494 entries; the 840B configuration is based on the Common Crawl 840B tokens corpus, with 2,196,017 entries; and the twitter27B configuration is based on the Twitter 27B tokens corpus, with 1,193,514 entries. Each configuration offers splits of different dimensions (e.g., 25d, 50d, 100d, 200d, 300d). Each sample contains a word field (string type, representing the original token with case, punctuation, and tokenization preserved) and a vector field (a list of float32 values, with the length determined by the split dimension). The dataset is suitable for tasks such as text classification, sentiment analysis, and machine translation, and users can load specific configurations and dimensions as needed, with a total download size of approximately 7.9GB.
GloVe 预训练词向量数据集
该数据集将 GloVe(Global Vectors for Word Representation)预训练词向量整理为 Hugging Face Dataset 格式,每个配置对应一套官方发布语料,每个 split 名称表示词向量维度。
数据集配置
| 配置 | 语料 | 维度 | 词表大小 |
|---|---|---|---|
6B |
Wikipedia 2014 + Gigaword 5 | 50d, 100d, 200d, 300d |
400,000 |
42B |
Common Crawl 42B tokens | 300d |
1,917,494 |
840B |
Common Crawl 840B tokens | 300d |
2,196,017 |
twitter27B |
Twitter 27B tokens | 25d, 50d, 100d, 200d |
1,193,514 |
全部配置的下载大小合计约为 7.9 GB。
字段说明
每行表示一个 token 及其词向量:
word:原始词表中的 token(字符串类型)vector:对应的float32向量,长度由 split 名称决定
例如,6B 配置的 100d split 中,每个 vector 包含 100 个浮点数。
使用方式
可通过 load_dataset 加载指定配置和维度,例如加载 6B 全部维度或仅加载 twitter27B 的 100d 维度。也可通过 Dataset.filter() 查询特定词向量,但需注意该方法会扫描整个 split。
注意事项
- token 的大小写、标点和分词形式沿用原始 GloVe 文件。
- 不同配置的词表互不保证一致。
- split 名称是向量维度,不是训练集或测试集划分。
- 向量以
float32保存。
引用
该数据集基于 GloVe 论文,引用格式:
bibtex @inproceedings{pennington2014glove, title={GloVe: Global Vectors for Word Representation}, author={Pennington, Jeffrey and Socher, Richard and Manning, Christopher D.}, booktitle={Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP)}, pages={1532--1543}, year={2014} }
原始向量、语料说明和使用条款请以 GloVe 官方项目页面(https://nlp.stanford.edu/projects/glove/)为准。




