anisoleai commited on
Commit
8e6e271
·
verified ·
1 Parent(s): 745fa64

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +128 -43
README.md CHANGED
@@ -4,92 +4,177 @@ language:
4
  - en
5
  source_datasets:
6
  - HuggingFaceFW/fineweb
7
- dataset_info:
8
- features:
9
- - name: token_ids
10
- dtype: uint16
11
- splits:
12
- - name: shard
13
- num_bytes: 3628
14
- num_examples: 1814
15
- download_size: 6346
16
- dataset_size: 3628
17
  configs:
18
  - config_name: default
19
  data_files:
20
  - split: shard
21
- path: data/shard-*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  ---
23
 
24
  # FineWeb Tokenized Corpus (AnisoleAI)
25
 
26
  ## Overview
27
 
28
- This repository provides:
29
 
30
- - A pretrained SentencePiece tokenizer (`tokenizer.model`) trained on a subset of FineWeb.
31
- - A pre-tokenized corpus derived from FineWeb for efficient LLM/SLM pretraining.
32
 
33
- No semantic modifications were made to the original dataset. The corpus was tokenized and stored in a memory-efficient `uint16` format for direct use in training pipelines.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  ---
36
 
37
- ## 🚀 Usage
38
 
39
- ### 1. Load the Tokenized Data
40
- You can stream or download the shards using the Hugging Face `datasets` library.
41
 
42
  ```python
43
  from datasets import load_dataset
44
- import numpy as np
45
 
46
- # Load the "shard" split
47
- ds = load_dataset("anisoleai/fineweb-tokenized", split="shard")
 
 
 
 
48
 
49
- # Access tokens from the first record
50
- # Each record contains a flat array of token_ids
51
- sample_tokens = ds[0]["token_ids"]
52
- print(f"Loaded {len(sample_tokens):,} tokens.")
53
  ```
54
 
55
- ### 2. Load the Tokenizer
56
- The `tokenizer.model` file is included in this repository.
 
 
 
 
 
 
 
 
 
57
 
58
  ```python
59
  import sentencepiece as spm
60
  from huggingface_hub import hf_hub_download
61
 
62
- # Download the model file from the dataset repo
63
  model_path = hf_hub_download(
64
- repo_id="anisoleai/fineweb-tokenized",
65
- filename="tokenizer.model",
66
  repo_type="dataset"
67
  )
68
 
69
- # Initialize SentencePiece
70
  sp = spm.SentencePieceProcessor(model_file=model_path)
71
- print(f"Vocab size: {sp.get_piece_size()}")
72
 
73
- # Example decoding
 
74
  print(sp.decode([1, 10, 20, 30]))
75
  ```
76
 
77
  ---
78
 
79
- ## 📄 Source & License
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
 
81
- **Original Dataset:** [HuggingFaceFW/fineweb](https://huggingface.co/datasets/HuggingFaceFW/fineweb) (ODC-BY 1.0)
82
 
83
- This tokenized corpus is distributed under the **Open Data Commons Attribution License (ODC-BY) v1.0**.
84
 
85
- **Attribution Requirements:**
86
- - Attribute the FineWeb dataset creators.
87
- - Attribute **AnisoleAI** for the tokenization processing.
88
 
89
  ---
90
 
91
- ## 🎯 Intended Use
92
 
93
- - LLM / SLM pretraining
94
- - Tokenizer benchmarking
95
- - Research and commercial AI development
 
4
  - en
5
  source_datasets:
6
  - HuggingFaceFW/fineweb
 
 
 
 
 
 
 
 
 
 
7
  configs:
8
  - config_name: default
9
  data_files:
10
  - split: shard
11
+ path:
12
+ - data_1/shard-*
13
+ - data_2/shard-*
14
+ - data_3/shard-*
15
+ - data_4/shard-*
16
+ - data_5/shard-*
17
+ - data_6/shard-*
18
+ - data_7/shard-*
19
+ - data_8/shard-*
20
+ - data_9/shard-*
21
+ - data_10/shard-*
22
+ - data_11/shard-*
23
+ - data_12/shard-*
24
+ - data_13/shard-*
25
+ - data_14/shard-*
26
+ - data_15/shard-*
27
+ - data_16/shard-*
28
+ - data_17/shard-*
29
+ - data_18/shard-*
30
+ - data_19/shard-*
31
+ - data_20/shard-*
32
  ---
33
 
34
  # FineWeb Tokenized Corpus (AnisoleAI)
35
 
36
  ## Overview
37
 
38
+ This repository provides a large-scale **pre-tokenized version of the FineWeb dataset** designed for efficient training of language models.
39
 
40
+ The dataset contains text from the **FineWeb corpus** that has been tokenized using a **SentencePiece tokenizer**.
41
+ Tokens are stored in a compact **`uint16` format** for efficient storage and high-throughput training.
42
 
43
+ Each dataset record contains a **flat array of token IDs** representing a continuous tokenized text sequence.
44
+
45
+ This format allows:
46
+
47
+ - fast loading
48
+ - minimal memory overhead
49
+ - efficient distributed training
50
+ - direct compatibility with LLM training pipelines
51
+
52
+ No semantic modifications were made to the original FineWeb dataset.
53
+ The text was only **tokenized and serialized into shard files**.
54
+
55
+ ---
56
+
57
+ # Dataset Structure
58
+
59
+ The dataset is organized into multiple shard directories:
60
+
61
+ ```
62
+ data_1/shard-00000.parquet
63
+ data_1/shard-00001.parquet
64
+ ...
65
+
66
+ data_2/shard-00000.parquet
67
+ ...
68
+
69
+ ...
70
+
71
+ data_20/shard-XXXXX.parquet
72
+ ```
73
+
74
+ Each shard contains:
75
+
76
+ ```
77
+ token_ids: uint16[]
78
+ ```
79
+
80
+ Each record stores a contiguous tokenized segment that can be used directly for model training.
81
 
82
  ---
83
 
84
+ # Loading the Dataset
85
 
86
+ You can load the dataset using the HuggingFace `datasets` library.
 
87
 
88
  ```python
89
  from datasets import load_dataset
 
90
 
91
+ dataset = load_dataset(
92
+ "anisoleai/fineweb-tokenized",
93
+ split="shard"
94
+ )
95
+
96
+ sample = dataset[0]["token_ids"]
97
 
98
+ print("Number of tokens:", len(sample))
 
 
 
99
  ```
100
 
101
+ The dataset supports:
102
+
103
+ - streaming
104
+ - distributed loading
105
+ - partial downloads
106
+
107
+ ---
108
+
109
+ # Loading the Tokenizer
110
+
111
+ The tokenizer used to generate the corpus is included in this repository.
112
 
113
  ```python
114
  import sentencepiece as spm
115
  from huggingface_hub import hf_hub_download
116
 
 
117
  model_path = hf_hub_download(
118
+ repo_id="anisoleai/fineweb-tokenized",
119
+ filename="tokenizer.model",
120
  repo_type="dataset"
121
  )
122
 
 
123
  sp = spm.SentencePieceProcessor(model_file=model_path)
 
124
 
125
+ print("Vocabulary size:", sp.get_piece_size())
126
+
127
  print(sp.decode([1, 10, 20, 30]))
128
  ```
129
 
130
  ---
131
 
132
+ # Intended Use
133
+
134
+ This dataset is intended for:
135
+
136
+ - large language model pretraining
137
+ - tokenizer benchmarking
138
+ - distributed LLM training pipelines
139
+ - academic AI research
140
+ - commercial AI development
141
+
142
+ The shard-based structure allows scalable multi-worker training pipelines.
143
+
144
+ ---
145
+
146
+ # Source Dataset
147
+
148
+ Original dataset:
149
+
150
+ **FineWeb**
151
+ https://huggingface.co/datasets/HuggingFaceFW/fineweb
152
+
153
+ FineWeb is a large-scale filtered web corpus designed for training language models.
154
+
155
+ ---
156
+
157
+ # License
158
+
159
+ This dataset follows the license of the original dataset:
160
+
161
+ **Open Data Commons Attribution License (ODC-BY) v1.0**
162
+
163
+ https://opendatacommons.org/licenses/by/1-0/
164
+
165
+ ---
166
 
167
+ # Attribution
168
 
169
+ If you use this dataset, please attribute:
170
 
171
+ - the creators of the FineWeb dataset
172
+ - **AnisoleAI** for the tokenization pipeline and dataset preparation
 
173
 
174
  ---
175
 
176
+ # Notes
177
 
178
+ - The dataset contains **token IDs only**.
179
+ - Original raw text is **not included**.
180
+ - Token IDs correspond to the included **SentencePiece tokenizer**.