urls-sampled
收藏资源简介:
该数据集为 URLs (hash-sampled),是 ks46/urls 的哈希采样版本,包含 74,918,894,107 个唯一 URL,通过 xxh3_64 哈希函数将整个语料库均匀随机划分为 2048 个块,每个块约 36.6M 行,作为 1/2048 的均匀随机样本。这种布局克服了 SURT 布局在抽样偏差、稳定性(块划分不随语料库变化)和并行性方面的不足。数据仅包含一个字段 url(字符串)。训练集样本数为 74,918,894,107,总字节数约 6.3 TB,下载大小约 1.79 TB。数据来源与 ks46/urls 相同:来自 62 个 URL 数据集和 43 个 Common Crawl 爬取,经过全局去重、轻微规范化和验证,并移除了 5,188,960 个无效 URL。数据以 Parquet V2 格式存储,zstd 等级 9 压缩,每行组 1,000,000 行。每个块内部的 URL 按 SURT 键和 URL 排序,但块之间无顺序。提供了验证方法(位置、排序、去重、未键控)和每个块的统计信息。该数据集适用于文本生成、文本检索等任务,并可用于可重现的样本划分(如按块选择)。许可证为每个来源各自的许可证,不包含页面内容。
This dataset is URLs (hash-sampled), a hash-sampled version of ks46/urls, containing 74,918,894,107 unique URLs. The entire corpus is uniformly and randomly partitioned into 2048 blocks using the xxh3_64 hash function, each block having approximately 36.6M rows, representing a 1/2048 uniform random sample. This layout overcomes the shortcomings of the SURT layout in terms of sampling bias, stability (block partitioning does not change with the corpus), and parallelism. The data contains only one field url (string). The training set has 74,918,894,107 samples, total bytes about 6.3 TB, and download size about 1.79 TB. The data source is the same as ks46/urls: from 62 URL datasets and 43 Common Crawl crawls, after global deduplication, slight normalization and validation, and removal of 5,188,960 invalid URLs. The data is stored in Parquet V2 format, zstd level 9 compression, with 1,000,000 rows per row group. URLs within each block are sorted by SURT key and URL, but blocks are not ordered. Validation methods (position, sorting, deduplication, unkeyed) and statistics for each block are provided. This dataset is suitable for tasks such as text generation and text retrieval, and can be used for reproducible sample partitioning (e.g., by block selection). The license is the respective license of each source, and the dataset does not contain page content.
数据集概述
该数据集为 URLs (hash-sampled),由 ks46 发布,是一个包含 74,918,894,107 条 URL 的海量多语言数据集,覆盖文本生成、文本检索等任务场景。
核心特性
- 数据规模:约 749 亿条 URL 记录,数据集总大小约 6.3 TB(下载大小约 1.79 TB)
- 存储格式:Parquet V2,使用 zstd 压缩(等级 9),每个行组包含 1,000,000 行
- 文件结构:共 2,048 个分块文件(
data/part-00000.parquet至data/part-02047.parquet),另附chunks.json元数据、stats/统计目录及removed.parquet(被剔除的 URL 记录) - 分块方式:基于
xxh3_64哈希值将 URL 空间均匀划分为 2,048 个区块,每个区块约 3,660 万行,是整体语料的均匀随机样本
与原始数据集的关系
该数据集与 ks46/urls 包含 完全相同的 URL 集合,区别仅在于分块策略:
- 原始数据集按 SURT 键范围分块,侧重主机聚类,磁盘占用约 665 GiB
- 本数据集按哈希范围分块,实现均匀采样与稳定性,但磁盘占用约 1.79 TB(字节/URL 为 23.89,约为原始数据集的 2.5 倍)
设计优势
- 无偏采样:任意前缀区块均为全语料的 1/2048 均匀随机样本,避免 SURT 布局中按字母排序导致的偏差
- 稳定性:URL 到区块的映射是纯函数,语料增删不会改变已有 URL 的归属区块,适合构建可持续的训练/评估划分
- 并行友好:各区块行数差异仅 0.03%(约 3,657 万至 3,658 万行),远优于 SURT 布局中 5.6 M 至 118.8 M 的巨大差异
数据验证
所有 749 亿行数据均通过以下检查:
- 位置校验:每个 URL 的
xxh3_64哈希值落在其声明区块范围内(使用独立的 DuckDB 扩展实现) - 排序校验:区块内部按
surt(url), url排序 - 去重校验:无重复 URL
- 键完整性:每行均包含 SURT 键
来源与许可
- 数据来源包括 62 个 URL 数据集及 Common Crawl 的 43 次爬取,经全局去重、轻度标准化处理
- 数据集中不包含网页内容,仅含 URL 字符串,属于对公共资源的客观引用
- 各来源数据依据其自身许可条款使用;Common Crawl 数据遵循其使用条款
- 如需移除特定 URL,可在数据集仓库发起讨论
使用建议
- 单区块即可作为全语料的 1/2048 均匀样本
- 如需可复现的 1% 样本,可直接选取任意 20 个区块文件(无需扫描或洗牌)
- 计算 URL 所属区块无需查询索引,可通过
xxh3_64哈希直接计算确定





