input_ids listlengths 128 2.05k | length int32 128 2.05k | bucket int32 256 2.05k |
|---|---|---|
[
50258,
1026,
9422,
82,
11,
1165,
13,
357,
6191,
25,
1810,
315,
7361,
86,
315,
8,
198,
198,
464,
4693,
286,
6175,
1247,
541,
18654,
326,
5519,
5071,
287,
26015,
7229,
318,
3624,
8331,
890,
11,
41919,
9610,
11,
290,
38255,
699,
13,
... | 295 | 512 |
[
50258,
464,
34766,
14,
49,
11603,
717,
2835,
41325,
2168,
318,
1541,
852,
2826,
503,
287,
262,
2056,
1022,
10727,
1439,
12,
8248,
42574,
406,
32681,
290,
6995,
6110,
14709,
415,
9925,
22185,
1636,
13,
406,
32681,
1718,
6631,
284,
22185,... | 660 | 1,024 |
[
50258,
47669,
316,
5426,
274,
17382,
309,
9269,
685,
43826,
20910,
290,
6602,
60,
198,
198,
20610,
1755,
17382,
7547,
12007,
262,
256,
9269,
286,
20001,
5426,
274,
329,
9533,
2254,
44943,
6,
5214,
400,
1622,
13,
2080,
511,
4097,
338,
... | 513 | 1,024 |
[
50258,
10260,
25,
3321,
11,
3389,
1596,
11,
1946,
198,
198,
16643,
3245,
3334,
3961,
25891,
17687,
1781,
319,
3321,
11,
290,
783,
468,
257,
16013,
12,
41347,
432,
10302,
11,
1864,
284,
257,
4783,
11821,
13,
14890,
994,
15168,
198,
198... | 382 | 512 |
[
50258,
818,
428,
1281,
11,
1180,
21128,
10581,
284,
4461,
17218,
656,
26809,
481,
307,
6693,
13,
775,
2911,
326,
7183,
481,
8676,
511,
3612,
286,
644,
257,
13347,
13187,
561,
804,
588,
11,
290,
703,
284,
3975,
262,
2975,
3371,
340,
... | 1,997 | 2,048 |
[
50258,
9203,
777,
3403,
262,
1994,
284,
4547,
644,
257,
13347,
1692,
13187,
3073,
588,
2058,
866,
284,
16855,
477,
8271,
15623,
832,
262,
3773,
290,
663,
5884,
30020,
13,
383,
16855,
286,
281,
2104,
564,
250,
17079,
1080,
447,
251,
13... | 1,118 | 2,048 |
[
50258,
11928,
541,
2879,
3259,
508,
547,
9322,
379,
257,
5045,
31693,
684,
287,
38982,
494,
11,
347,
13,
34,
1539,
423,
10282,
511,
1692,
2489,
8224,
329,
281,
33457,
2033,
13,
198,
198,
818,
2211,
11,
1811,
8584,
3215,
3259,
379,
2... | 272 | 512 |
[
50258,
23839,
383,
3649,
16815,
286,
1919,
2056,
1724,
326,
356,
1690,
8791,
3194,
3303,
16264,
416,
1111,
22152,
2569,
12291,
290,
15828,
8563,
13,
1374,
857,
262,
8806,
286,
262,
9173,
953,
5039,
12737,
284,
1729,
12,
20307,
2420,
30,... | 2,038 | 2,048 |
[
50258,
11399,
11,
611,
1259,
1930,
290,
14599,
16785,
423,
1180,
1919,
26368,
11,
356,
561,
1607,
284,
766,
1180,
7572,
286,
8806,
12213,
329,
262,
734,
3858,
286,
8563,
13,
198,
198,
17410,
26122,
412,
14400,
12,
15542,
6868,
3594,
1... | 2,047 | 2,048 |
[
50258,
13111,
286,
262,
2267,
319,
3303,
35915,
16507,
319,
3194,
25973,
780,
12291,
287,
1957,
7587,
8722,
460,
3538,
307,
8630,
355,
48785,
640,
357,
273,
3555,
640,
8,
290,
10360,
29512,
25364,
460,
307,
13941,
685,
1983,
1906,
2078,... | 1,786 | 2,048 |
[
50258,
1532,
345,
16352,
11,
1919,
2056,
481,
307,
973,
284,
2610,
345,
866,
13,
1320,
318,
645,
2392,
257,
5975,
284,
2687,
13,
317,
649,
14528,
287,
1919,
2056,
8452,
670,
1708,
262,
3576,
23766,
11,
996,
11,
743,
307,
262,
779,
... | 752 | 1,024 |
[
50258,
1026,
338,
587,
257,
5897,
16349,
13,
14190,
5897,
11,
2048,
13,
3244,
757,
11,
340,
338,
546,
644,
356,
2938,
284,
428,
966,
13,
198,
198,
6395,
621,
262,
12673,
286,
9847,
4614,
86,
5329,
290,
11118,
84,
7285,
32671,
40398,... | 519 | 1,024 |
[
50258,
3118,
40985,
1627,
12,
929,
25,
383,
5007,
43256,
1938,
1702,
262,
2260,
24577,
878,
511,
938,
2872,
1028,
262,
1338,
278,
65,
28194,
13,
10504,
25,
46655,
400,
844,
323,
360,
270,
400,
615,
506,
366,
40,
716,
10607,
351,
262... | 822 | 1,024 |
[
50258,
2202,
530,
1241,
11,
15981,
447,
247,
82,
881,
12,
45178,
4046,
11170,
262,
1578,
1829,
447,
247,
82,
2551,
407,
284,
18860,
257,
1729,
12,
30786,
4725,
6323,
4585,
329,
2692,
284,
2245,
2615,
18573,
287,
12030,
8501,
7674,
373... | 794 | 1,024 |
[
50258,
7371,
1301,
357,
35,
3727,
4590,
416,
471,
13,
50,
13,
8565,
41505,
10391,
362,
358,
5016,
11817,
2350,
317,
13,
23076,
7058,
8,
198,
198,
10364,
3759,
1301,
373,
510,
1903,
3217,
290,
5729,
4964,
22128,
447,
247,
82,
564,
25... | 501 | 512 |
[
50258,
818,
257,
20244,
5243,
2720,
351,
40922,
11972,
2586,
5303,
11,
16283,
4665,
9920,
46884,
5437,
531,
339,
6834,
326,
406,
13,
32,
13,
16095,
11,
9920,
286,
262,
15530,
1281,
17047,
516,
3899,
6612,
1700,
1395,
6794,
11,
318,
65... | 292 | 512 |
[
50258,
2953,
257,
640,
618,
523,
881,
286,
262,
995,
447,
247,
82,
1705,
2331,
523,
3223,
11,
18804,
318,
31701,
257,
11648,
9593,
257,
14727,
15346,
326,
318,
7360,
6079,
517,
1657,
656,
262,
995,
13,
4946,
3406,
18301,
13692,
319,
... | 1,703 | 2,048 |
[
50258,
1890,
262,
23781,
457,
28117,
640,
25,
383,
1711,
5405,
286,
534,
21573,
4962,
17196,
866,
379,
1542,
11,
290,
1936,
812,
1568,
340,
447,
247,
82,
477,
475,
29738,
13,
198,
198,
1639,
760,
326,
5068,
810,
262,
3516,
2925,
11,... | 1,798 | 2,048 |
[
50258,
464,
968,
1971,
20082,
714,
307,
10708,
503,
257,
890,
1057,
286,
36595,
286,
262,
6280,
29467,
13,
632,
1244,
1716,
281,
5079,
1785,
13,
198,
198,
8421,
345,
44007,
428,
2443,
329,
2003,
38098,
11,
1249,
502,
257,
2068,
36531,... | 824 | 1,024 |
[
50258,
39190,
1547,
5402,
262,
5627,
28791,
290,
45393,
4581,
3917,
351,
262,
15338,
1584,
14935,
13,
3486,
5555,
14,
15086,
8869,
28493,
421,
959,
4598,
198,
198,
31334,
3840,
484,
447,
247,
260,
523,
7818,
329,
4736,
13,
198,
198,
3... | 664 | 1,024 |
[
50258,
14231,
8487,
2805,
2211,
532,
8702,
25,
1314,
3122,
198,
198,
40,
447,
247,
76,
994,
284,
1577,
617,
3307,
319,
262,
7865,
36357,
1487,
11,
543,
17857,
4750,
287,
262,
2211,
2805,
17404,
5890,
10133,
1281,
13,
1318,
389,
617,
... | 338 | 512 |
[
50258,
400,
1381,
88,
1536,
1381,
4919,
67,
388,
1525,
516,
633,
25,
198,
198,
82,
6017,
12,
1287,
666,
25,
198,
198,
1026,
447,
247,
82,
6507,
326,
618,
257,
5863,
16527,
2058,
503,
290,
1139,
484,
389,
257,
13191,
286,
4961,
248... | 348 | 512 |
[
50258,
47359,
274,
1222,
20833,
11,
543,
468,
890,
1364,
1280,
262,
5885,
286,
16118,
663,
898,
7914,
9173,
11,
318,
2938,
284,
43784,
319,
3431,
379,
257,
1705,
4495,
287,
13458,
644,
340,
318,
4585,
262,
399,
566,
13,
198,
198,
46... | 488 | 512 |
[
50258,
464,
46244,
7859,
23964,
373,
257,
1688,
23964,
326,
2277,
262,
471,
13,
50,
13,
1181,
286,
7859,
11,
355,
880,
355,
262,
12841,
319,
1700,
287,
262,
1181,
13,
632,
373,
717,
6515,
319,
2693,
2808,
11,
3584,
3660,
4837,
6108,... | 1,432 | 2,048 |
[
50258,
3673,
284,
307,
10416,
351,
27252,
33553,
198,
198,
464,
27252,
3615,
286,
3340,
357,
7841,
72,
15792,
1313,
8,
373,
257,
48461,
5398,
1964,
2151,
543,
468,
12228,
319,
257,
2717,
1241,
11,
290,
899,
259,
2131,
287,
14778,
13,
... | 390 | 512 |
[
50258,
5195,
466,
356,
8659,
262,
4257,
29078,
21657,
9210,
319,
674,
24817,
82,
30,
18903,
416,
14377,
39567,
735,
14,
43,
361,
274,
1096,
14,
22073,
13578,
13,
198,
198,
40,
1422,
447,
247,
83,
1607,
284,
307,
530,
286,
883,
3397,... | 1,484 | 2,048 |
[
50258,
17439,
10692,
48463,
33671,
3854,
6063,
3827,
564,
246,
3629,
14378,
447,
247,
23999,
13868,
198,
198,
27245,
286,
5278,
10692,
447,
247,
82,
655,
12,
30147,
1086,
14378,
357,
8130,
564,
246,
3629,
623,
447,
247,
8,
198,
198,
1... | 715 | 1,024 |
[
50258,
1212,
1281,
743,
3994,
17375,
6117,
13,
383,
2756,
345,
1414,
355,
257,
7172,
857,
407,
1487,
11,
475,
314,
743,
787,
257,
1402,
5810,
1912,
319,
534,
5001,
13,
6952,
345,
329,
6493,
25048,
14628,
3232,
0,
198,
198,
4711,
140... | 324 | 512 |
[
50258,
1026,
447,
247,
82,
257,
922,
640,
284,
307,
257,
13693,
11,
355,
890,
355,
345,
447,
247,
260,
287,
3340,
13,
198,
198,
28203,
21685,
4376,
257,
1700,
2033,
286,
1637,
287,
262,
717,
3860,
286,
1584,
11,
1864,
284,
33517,
... | 476 | 512 |
[
50258,
20418,
2375,
19196,
1642,
3967,
2928,
319,
262,
26905,
3773,
198,
198,
13152,
2650,
198,
198,
3132,
3269,
1946,
198,
198,
20418,
2375,
19196,
1642,
3967,
2928,
319,
262,
968,
8936,
3773,
198,
198,
32,
649,
989,
2523,
326,
5692,
... | 512 | 512 |
[
50258,
447,
250,
3198,
286,
262,
1243,
326,
356,
447,
247,
260,
4379,
1645,
318,
326,
257,
11622,
2837,
286,
4113,
389,
3177,
3128,
4113,
11,
447,
251,
531,
7244,
3998,
11,
257,
9119,
286,
16283,
359,
396,
13,
785,
11,
262,
6714,
... | 2,048 | 2,048 |
[
50258,
447,
250,
1532,
345,
2298,
257,
1295,
326,
447,
247,
82,
1611,
286,
503,
612,
290,
673,
447,
247,
82,
1239,
2982,
286,
340,
475,
607,
1545,
468,
11,
290,
607,
1545,
447,
247,
82,
588,
11,
326,
1295,
318,
4385,
284,
307,
4... | 313 | 512 |
[
50258,
464,
4039,
13683,
286,
262,
4037,
15531,
3078,
319,
3321,
15832,
1965,
329,
13657,
19601,
284,
1280,
257,
1336,
3645,
656,
262,
5885,
326,
1175,
6741,
290,
6741,
1028,
9265,
423,
587,
5364,
287,
8037,
25,
416,
262,
15471,
11,
4... | 1,184 | 2,048 |
[
50258,
36287,
73,
1878,
73,
439,
1228,
9101,
74,
724,
22189,
82,
28856,
290,
15114,
286,
12530,
13,
198,
198,
10798,
416,
2409,
36714,
6343,
14,
6633,
5382,
198,
198,
20854,
768,
257,
5296,
284,
281,
4075,
32410,
743,
2128,
588,
7067,... | 1,066 | 2,048 |
[
50258,
1026,
447,
247,
67,
307,
281,
3489,
7734,
326,
356,
447,
247,
260,
1708,
257,
7684,
286,
27223,
24959,
7261,
11257,
11,
645,
4719,
39092,
3037,
318,
852,
9197,
12,
44009,
9091,
290,
645,
4719,
24004,
318,
257,
3024,
7243,
475,
... | 621 | 1,024 |
[
50258,
7571,
3259,
787,
28431,
287,
9015,
9653,
287,
11824,
329,
3227,
286,
30862,
12319,
13,
198,
198,
1858,
318,
257,
7918,
2491,
716,
482,
1871,
9377,
31778,
326,
2628,
588,
3098,
12,
85,
897,
87,
945,
389,
9944,
257,
1917,
319,
... | 412 | 512 |
[
50258,
7371,
1301,
3377,
262,
2457,
2745,
286,
262,
1584,
3071,
8512,
326,
262,
8414,
373,
852,
31043,
13,
632,
4962,
503,
339,
373,
826,
26,
262,
3415,
3615,
338,
812,
12,
6511,
3626,
379,
41895,
9137,
4446,
6840,
31043,
262,
3071,
... | 468 | 512 |
[
50258,
9787,
503,
3624,
6452,
6419,
546,
262,
28892,
290,
14212,
6802,
13,
198,
198,
16,
13,
15085,
28372,
373,
3177,
257,
1200,
386,
41923,
13,
198,
198,
28524,
287,
337,
6557,
75,
8126,
319,
262,
8372,
7051,
286,
8602,
287,
1248,
... | 1,419 | 2,048 |
[
50258,
3673,
284,
307,
10416,
351,
509,
42643,
19266,
393,
327,
3372,
4763,
198,
198,
21868,
10936,
371,
48078,
357,
6286,
3945,
1679,
11,
16382,
828,
1365,
1900,
416,
465,
3800,
1438,
509,
2093,
671,
11,
318,
281,
1605,
13004,
11,
17... | 1,955 | 2,048 |
[
50258,
1858,
373,
257,
5441,
4,
2620,
287,
262,
1271,
286,
1705,
6685,
7268,
366,
26221,
1042,
1,
393,
366,
26221,
396,
1,
1022,
4793,
290,
3648,
13,
198,
198,
32,
1588,
6903,
286,
6685,
319,
38365,
547,
33941,
416,
4158,
23142,
11,... | 245 | 256 |
[
50258,
1238,
17476,
290,
2764,
278,
11,
766,
1114,
262,
3517,
2168,
749,
2904,
1900,
355,
11,
766,
5325,
3841,
1641,
198,
198,
1129,
17476,
290,
2764,
278,
4418,
1900,
355,
1596,
17476,
290,
2764,
278,
357,
11528,
1906,
2931,
8,
198,
... | 2,023 | 2,048 |
[
50258,
32,
1178,
1933,
706,
262,
4082,
286,
511,
4957,
16640,
2047,
49746,
11,
8518,
290,
11735,
27436,
4563,
4499,
326,
673,
373,
10423,
351,
511,
1218,
1200,
11,
475,
262,
10241,
4444,
287,
257,
45931,
3693,
2623,
60,
1550,
511,
495... | 2,000 | 2,048 |
[
50258,
32,
513,
12,
3911,
7906,
12,
2364,
2168,
11,
22772,
290,
12707,
64,
25,
2764,
278,
1550,
11,
10759,
319,
8308,
86,
5379,
22772,
290,
9626,
624,
360,
32681,
11,
12707,
64,
290,
3932,
1001,
413,
1940,
11,
11735,
27436,
4563,
11... | 906 | 1,024 |
[
50258,
8496,
750,
262,
2866,
286,
1657,
287,
257,
17076,
1282,
422,
30,
4162,
318,
340,
31011,
11,
48156,
11,
29334,
10700,
583,
1218,
290,
407,
617,
584,
3785,
30,
198,
198,
464,
2829,
3280,
318,
326,
11,
1201,
13540,
11,
3783,
468... | 744 | 1,024 |
[
50258,
39,
4595,
11,
399,
8401,
11,
290,
3719,
3694,
25,
632,
338,
36844,
257,
29949,
16061,
329,
43528,
27710,
34179,
379,
7477,
34,
7658,
11,
19443,
2185,
1039,
20127,
417,
11,
290,
3619,
1549,
423,
925,
3945,
257,
2089,
7539,
329,
... | 384 | 512 |
[
50258,
1929,
270,
647,
198,
198,
818,
428,
2393,
4590,
11,
788,
12,
10445,
13,
4390,
10540,
35877,
6607,
13183,
647,
9209,
379,
257,
2041,
3240,
6899,
3249,
379,
27209,
25335,
546,
262,
2928,
286,
10964,
13,
22543,
338,
4466,
319,
705... | 762 | 1,024 |
[
50258,
26737,
318,
262,
4097,
326,
19575,
351,
790,
2650,
11,
475,
428,
8819,
384,
457,
316,
468,
1760,
340,
757,
13,
770,
2116,
12,
83,
7803,
5062,
784,
262,
4097,
447,
247,
82,
5544,
784,
318,
663,
1266,
1865,
11,
10200,
1194,
1... | 758 | 1,024 |
OWT GPT-2 sentence segments (buckets 256 / 512 / 1024 / 2048)
Tokenized sentence/paragraph segments of OpenWebText (Skylion007/openwebtext, revision main), encoded with GPT-2 BPE plus three extra special tokens, then assigned to length buckets.
This repository is a derived dataset. It does not rediscover or replace the original text corpus. Every input_ids sequence comes from documents in OpenWebText.
- Packaging / conversion code & this card: MIT (see
LICENSE) - Underlying web text: inherited from OpenWebText /
Skylion007/openwebtext. Use of the token sequences remains subject to the original corpus terms and to the licenses of the crawled pages.
中文摘要
本仓库是 OpenWebText 的派生数据:用 GPT-2 BPE 按句段切分(process_d=2048),再按有效长度分到 256/512/1024/2048 四档。validation 对应本地训练里的 dev。内容与 bdelf 本地缓存 owt_owt-bucket_2dba74e39372313f(fingerprint 2dba74e39372313f)逐 token 一致。仓库协议为 MIT;文本来源仍归 OpenWebText。
本地训练存盘时每行会再 pad 到 2048 以便 memmap。Hub 上只保留到有效 length(pad 可按 PAD_ID 确定性还原)。
What's in a row
| column | type | meaning |
|---|---|---|
input_ids |
list[int32] |
tokens without pad, length = length. Always starts with BOS and ends with EOS. |
length |
int32 |
len(input_ids), in [128, 2048] |
bucket |
int32 |
pad bucket: 256 if length≤256, else 512 / 1024 / 2048 (right-closed) |
Bucket rule (same as training):
128 ≤ n ≤ 256→ 256n ≤ 512→ 512n ≤ 1024→ 1024n ≤ 2048→ 2048
To restore the exact bdelf training row (storage width 2048, right-padded with PAD_ID):
PAD_ID = 50257
row = example["input_ids"] + [PAD_ID] * (2048 - example["length"])
Training loss in bdelf masks with length, not with bucket. bucket is the pad width used when mixing similar-length samples.
Splits
OpenWebText on Hub only ships a train split. Document-level holdout is applied on parquet row order of Skylion007/openwebtext (identical to fengluoqiuwu/owt-seg512):
| Hub split | bdelf name | #chunks | source |
|---|---|---|---|
train |
train |
9,422,029 | remaining documents |
validation |
dev |
1,184 | 1,024 documents |
test |
test |
1,231 | 1,024 documents |
Holdout: shuffle indices 0 .. N-1 with holdout_seed=42, take first 1,024 rows → test documents, next 1,024 → dev documents.
Train bucket counts
| bucket | count |
|---|---|
| 256 | 771,681 |
| 512 | 2,223,433 |
| 1024 | 2,842,803 |
| 2048 | 3,584,112 |
Validation / test bucket counts are in meta.json.
Tokenization
| item | value |
|---|---|
| Base tokenizer | Hugging Face gpt2 (GPT-2 BPE, Fast) |
| Encode | add_special_tokens=False |
| Added specials (in this order) | <|pad|>=50257, <|bos|>=50258, <|eos|>=50259 |
Layout vocab_size |
50260 |
| Unused original EOT | GPT-2 <|endoftext|> = 50256 is not used as BOS/EOS here |
Each segment is wrapped as [BOS] + content + [EOS]. Segments with wrapped length ≤ 128 are dropped (min_chunk_len=128).
Segmentation (must match training)
Documents are not concatenated. For each document:
- GPT-2 Fast encode with
offset_mapping(byte BPE; punctuation is matched on UTF-8 text, then mapped to token boundaries). - Content cap
d - 2 = 2046,process_d=2048. - If remaining tokens exceed the cap, look back
min(256, d/8)=256tokens and cut on the best delimiter: paragraph blank lines (P0) → single newline (P1) → sentence punctuation (P2). If none, hard-cut at the cap and continue from that index (no tokens dropped). - Assign a bucket, then (in bdelf) pad to 2048 for memmap storage. This Hub export strips pad.
Block shuffle after cutting: shuffle_seed=42, block size 65,536 rows.
Fingerprint of the local cache this export was taken from: 2dba74e39372313f.
Load
from datasets import load_dataset
ds = load_dataset("fengluoqiuwu/owt-bucket")
ex = ds["train"][0]
print(len(ex["input_ids"]), ex["length"], ex["bucket"])
# only the 512-bucket
ds512 = ds["train"].filter(lambda r: r["bucket"] == 512)
Streaming:
ds = load_dataset("fengluoqiuwu/owt-bucket", split="train", streaming=True)
Relation to the sibling dataset
fengluoqiuwu/owt-seg512 uses process_d=512 and a single pad width 512. Do not mix owt-seg512 with this repo's 512-bucket in the same step: cut points differ, so the 512-length populations are not the same.
Source / citation
Primary source: Skylion007/openwebtext.
@misc{Gokaslan2019OpenWeb,
title={OpenWebText Corpus},
author={Aaron Gokaslan and Vanya Cohen},
year={2019},
howpublished={\url{https://skylion007.github.io/OpenWebTextCorpus/}}
}
Please also cite this derived segmentation if you use these exact splits, cuts, and buckets.
License
MIT for the files in this Hub repository (conversion, metadata, token-id tables). The original OpenWebText documents remain a scrape of public web pages; this repo does not grant additional rights to that underlying text.
- Downloads last month
- 87