Spaces:
Runtime error
Runtime error
omkarenator
commited on
Commit
•
fac35b0
1
Parent(s):
b46a18f
fix hrefs on the navbar, should not #inner-text
Browse files
main.py
CHANGED
@@ -137,30 +137,37 @@ def main():
|
|
137 |
),
|
138 |
),
|
139 |
),
|
140 |
-
# Div(
|
141 |
-
# A("Overview", href="#inner-text"),
|
142 |
-
# hx_get="/overview",
|
143 |
-
# hx_target="#inner-text",
|
144 |
-
# ),
|
145 |
Div(
|
146 |
-
A(
|
147 |
-
|
148 |
-
|
|
|
|
|
|
|
149 |
),
|
150 |
Div(
|
151 |
-
A(
|
152 |
-
|
153 |
-
|
|
|
|
|
|
|
154 |
),
|
155 |
Div(
|
156 |
-
A(
|
157 |
-
|
158 |
-
|
|
|
|
|
|
|
159 |
),
|
160 |
Div(
|
161 |
-
A(
|
162 |
-
|
163 |
-
|
|
|
|
|
|
|
164 |
),
|
165 |
role="navigation",
|
166 |
cls="l-text figcaption",
|
@@ -212,88 +219,101 @@ intro_list1 = Ol(
|
|
212 |
|
213 |
|
214 |
dataset_comparison1 = pd.DataFrame(
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
)
|
289 |
|
290 |
# Apply table styling: Light green for the header, alternating white and light grey for rows
|
291 |
-
styled_table =
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
|
298 |
# Use _repr_html_() method to get the HTML representation of the styled DataFrame
|
299 |
table_html = styled_table._repr_html_()
|
@@ -301,87 +321,100 @@ table_html = styled_table._repr_html_()
|
|
301 |
table_div_1 = Div(NotStr(table_html), style="margin: 40px;")
|
302 |
|
303 |
dataset_comparison2 = pd.DataFrame(
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
"
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
"
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
"
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
"
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
"
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
"
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
)
|
378 |
# Apply table styling: Light green for the header, alternating white and light grey for rows
|
379 |
-
styled_table =
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
|
386 |
# Use _repr_html_() method to get the HTML representation of the styled DataFrame
|
387 |
table_html2 = styled_table._repr_html_()
|
@@ -389,65 +422,70 @@ table_html2 = styled_table._repr_html_()
|
|
389 |
table_div_2 = Div(NotStr(table_html2), style="margin: 40px;")
|
390 |
|
391 |
dataset_sources = pd.DataFrame(
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
# Apply table styling: Light green for the header, alternating white and light grey for rows
|
448 |
styled_table = dataset_sources.style.apply(
|
449 |
-
lambda x: [
|
450 |
-
|
|
|
|
|
|
|
|
|
|
|
451 |
).hide(axis="index") # Hide the row index
|
452 |
|
453 |
table_html_data = styled_table._repr_html_()
|
@@ -456,109 +494,218 @@ table_div_data = Div(NotStr(table_html_data), style="margin: 40px;")
|
|
456 |
|
457 |
|
458 |
def get_curated_chart():
|
459 |
-
|
460 |
data = {
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
481 |
}
|
482 |
# Calculate percentage for each data source
|
483 |
-
total_count = sum(data[
|
484 |
-
data[
|
485 |
-
|
486 |
# Create treemap
|
487 |
-
fig = px.treemap(
|
488 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
# Set the size of the chart
|
490 |
fig.update_layout(width=800, height=600)
|
491 |
-
|
492 |
# Display treemap
|
493 |
st.plotly_chart(fig)
|
494 |
|
|
|
495 |
overview_div = Div(
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
P("In pretraining, it is common to combine web data and curated sources (cite). Web data is included to provide a vast quantity of long tail and diverse data, while curated datasets are often information rich and provide the 'deep-dive' domain information. Both datasets play critical for effective LLM pre-training."),
|
508 |
-
H4("The Gap TxT360 Fills"),
|
509 |
-
P("Despite advancements in filtering and source material for both data types, each type of dataset has its limitations. RefinedWeb is known for its high quality content but and only about 10% of the entire dataset has been disclosed and the processing scripts have not been released. For datasets that have combined curated sources with web data, the web component is relatively small (NEED TO UPDATE - citation needed)."),
|
510 |
-
P("By integrating the extensive reach of web data with the exceptional quality of curated sources, TxT360 meets and surpasess the rigorous standards required for state-of-the-art LLM pre-training as demostated in the Results section."),
|
511 |
-
|
512 |
-
P("Table 1: The following table shows TxT360 and other well-known datasets on the coverage and size of data sources."),
|
513 |
-
table_div_1,
|
514 |
-
table_div_2,
|
515 |
-
P("Table 2: Basic TxT360 Statistics."),
|
516 |
-
table_div_data,
|
517 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
518 |
Section(
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
|
|
|
|
526 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
527 |
Section(
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
P("Furthermore, by controlling the pretraining data distribution through deduplication and selective upsampling avoida relying on the often inconsistent distribution of internet-sourced data."),
|
537 |
-
H3("Highlights of the TxT360 Deduplication Process"),
|
538 |
-
P("Our deduplication process began with 61.8 TB of filtered, and compressed documents, totaling approximately 48.83 billion documents. We first performed exact deduplication using a Bloom filter, reducing the dataset by 17% to 40.21 billion documents. For global near-deduplication, we scaled methodologies from prior works like SlimPajama to handle the entire dataset, including 87 Common Crawl dumps and other curated data. This involved generating document signatures, matching them to identify near-duplicates, and clustering these to retain only one document per cluster. We prioritized retaining documents from curated sources and more recent CommonCrawl dumps. Throughout the deduplication stages, we extensively used Dask for distributed data processing."),
|
539 |
-
P("After the global near-deduplication of all 87 CommonCrawl dumps and other curated data, we removed around 85% of the total documents. This leaves us with approximately 4.24 trillion deduplicated tokens, which aligns with what FineWeb has reported for their iterative global deduplication. Along with the list of duplicated documents to delete, our deduplication code also saves some metadata about the duplicate clusters that we find. We save statistics about every duplicate cluster we find, with the document ID of the document we retain from the cluster as the key and with a value capturing the distribution of the duplicates within the cluster over the CommonCrawl dumps (identified by the first 2 digits of every document ID). This way, we always have information about the duplicates we have deleted, allowing us to upsample any data distribution we want for training."),
|
540 |
-
P("During deduplication, it is not feasible to store all the duplicate clusters we form, but we do save some samples at every size. Here are some observations we made by examining these sample duplicate clusters:"),
|
541 |
-
Ul(
|
542 |
-
Li("Smaller components tend to have more overlap in their MinHash bands. The smallest components, which are essentially pairs, consist of exact duplicate documents that local exact deduplication missed."),
|
543 |
-
Li("When clusters contain three or more documents, incremental changes in the text become apparent. For example, there may be a growing list of personnel over the years."),
|
544 |
-
Li("In sizable clusters comprising 1,000 or more documents, we observe a trend towards templatization. This involves the recurrent use of standardized language to convey general topics such as terms and conditions, warnings, and disclaimers. Such language is prevalent on commercial websites, offering a consistent and efficient way to communicate commonly encountered information."),
|
545 |
),
|
546 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
547 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
548 |
)
|
549 |
|
|
|
550 |
@app.get("/intro")
|
551 |
def intro():
|
552 |
return Div(
|
553 |
Section(
|
554 |
H2("About TxT360"),
|
555 |
-
P(
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
|
|
|
|
|
|
|
|
|
|
562 |
id="section1",
|
563 |
),
|
564 |
overview_div,
|
@@ -566,7 +713,7 @@ def intro():
|
|
566 |
)
|
567 |
|
568 |
|
569 |
-
#rt("/overview")(overview.overview)
|
570 |
|
571 |
rt("/update/{target}")(data_viewer.update)
|
572 |
|
|
|
137 |
),
|
138 |
),
|
139 |
),
|
|
|
|
|
|
|
|
|
|
|
140 |
Div(
|
141 |
+
A(
|
142 |
+
"Global Processing Steps",
|
143 |
+
href="/common#_self",
|
144 |
+
hx_get="/common",
|
145 |
+
hx_target="#inner-text",
|
146 |
+
)
|
147 |
),
|
148 |
Div(
|
149 |
+
A(
|
150 |
+
"Web Data Processing",
|
151 |
+
href="/webdata#_self",
|
152 |
+
hx_get="/webdata",
|
153 |
+
hx_target="#inner-text",
|
154 |
+
)
|
155 |
),
|
156 |
Div(
|
157 |
+
A(
|
158 |
+
"Curated Sources Processing",
|
159 |
+
href="/curated#_self",
|
160 |
+
hx_get="/curated",
|
161 |
+
hx_target="#inner-text",
|
162 |
+
)
|
163 |
),
|
164 |
Div(
|
165 |
+
A(
|
166 |
+
"TxT360 Results",
|
167 |
+
href="/results#_self",
|
168 |
+
hx_get="/results",
|
169 |
+
hx_target="#inner-text",
|
170 |
+
),
|
171 |
),
|
172 |
role="navigation",
|
173 |
cls="l-text figcaption",
|
|
|
219 |
|
220 |
|
221 |
dataset_comparison1 = pd.DataFrame(
|
222 |
+
{
|
223 |
+
"Dataset": [
|
224 |
+
"TxT360",
|
225 |
+
"FineWeb",
|
226 |
+
"RefinedWeb",
|
227 |
+
"RedPajama-v2",
|
228 |
+
"C4",
|
229 |
+
"Dolma",
|
230 |
+
"RedPajama-v1",
|
231 |
+
"The Pile",
|
232 |
+
],
|
233 |
+
"CommonCrawl": [
|
234 |
+
"99 Snapshots",
|
235 |
+
"96 Snapshots",
|
236 |
+
"90 Snapshots",
|
237 |
+
"84 Snapshots",
|
238 |
+
"1 Snapshots",
|
239 |
+
"24 Snapshots",
|
240 |
+
"5 Snapshots",
|
241 |
+
"0.6% of 74 Snapshots",
|
242 |
+
],
|
243 |
+
"Papers": [
|
244 |
+
"5 Sources",
|
245 |
+
"-",
|
246 |
+
"-",
|
247 |
+
"-",
|
248 |
+
"-",
|
249 |
+
"1 Source",
|
250 |
+
"1 Source",
|
251 |
+
"4 Sources",
|
252 |
+
],
|
253 |
+
"Wikipedia": [
|
254 |
+
"310+ Languages",
|
255 |
+
"-",
|
256 |
+
"-",
|
257 |
+
"-",
|
258 |
+
"-",
|
259 |
+
"what does a check mark mean?",
|
260 |
+
"what does a check mark mean?",
|
261 |
+
"English Only",
|
262 |
+
],
|
263 |
+
"FreeLaw": [
|
264 |
+
"Included",
|
265 |
+
"-",
|
266 |
+
"-",
|
267 |
+
"-",
|
268 |
+
"-",
|
269 |
+
"-",
|
270 |
+
"-",
|
271 |
+
"Included",
|
272 |
+
],
|
273 |
+
"DM Math": [
|
274 |
+
"Included",
|
275 |
+
"-",
|
276 |
+
"-",
|
277 |
+
"-",
|
278 |
+
"-",
|
279 |
+
"-",
|
280 |
+
"-",
|
281 |
+
"Included",
|
282 |
+
],
|
283 |
+
"USPTO": [
|
284 |
+
"Included",
|
285 |
+
"-",
|
286 |
+
"-",
|
287 |
+
"-",
|
288 |
+
"-",
|
289 |
+
"-",
|
290 |
+
"-",
|
291 |
+
"Included",
|
292 |
+
],
|
293 |
+
}
|
294 |
+
)
|
|
|
295 |
|
296 |
# Apply table styling: Light green for the header, alternating white and light grey for rows
|
297 |
+
styled_table = (
|
298 |
+
dataset_comparison1.style.set_properties(
|
299 |
+
**{"background-color": "#E1EEDB"},
|
300 |
+
subset=pd.IndexSlice[0, :], # Row 0 with a light green background
|
301 |
+
)
|
302 |
+
.apply(
|
303 |
+
lambda x: [
|
304 |
+
"background-color: #E1EEDB"
|
305 |
+
if i == 0
|
306 |
+
else (
|
307 |
+
"background-color: rgb(237, 242, 251)"
|
308 |
+
if i % 2 == 0
|
309 |
+
else "background-color: white"
|
310 |
+
)
|
311 |
+
for i in range(len(x))
|
312 |
+
],
|
313 |
+
axis=0,
|
314 |
+
)
|
315 |
+
.hide(axis="index")
|
316 |
+
) # Hide the row index
|
317 |
|
318 |
# Use _repr_html_() method to get the HTML representation of the styled DataFrame
|
319 |
table_html = styled_table._repr_html_()
|
|
|
321 |
table_div_1 = Div(NotStr(table_html), style="margin: 40px;")
|
322 |
|
323 |
dataset_comparison2 = pd.DataFrame(
|
324 |
+
{
|
325 |
+
"Dataset": [
|
326 |
+
"TxT360",
|
327 |
+
"FineWeb",
|
328 |
+
"RefinedWeb",
|
329 |
+
"RedPajama-v2",
|
330 |
+
"C4",
|
331 |
+
"Dolma",
|
332 |
+
"RedPajama-v1",
|
333 |
+
"The Pile",
|
334 |
+
],
|
335 |
+
"PG-19": [
|
336 |
+
"Included",
|
337 |
+
"-",
|
338 |
+
"-",
|
339 |
+
"-",
|
340 |
+
"-",
|
341 |
+
"Included",
|
342 |
+
"Included",
|
343 |
+
"Included",
|
344 |
+
],
|
345 |
+
"HackerNews": [
|
346 |
+
"Included",
|
347 |
+
"-",
|
348 |
+
"-",
|
349 |
+
"-",
|
350 |
+
"-",
|
351 |
+
"-",
|
352 |
+
"-",
|
353 |
+
"Included",
|
354 |
+
],
|
355 |
+
"Ubuntu IRC": [
|
356 |
+
"Included",
|
357 |
+
"-",
|
358 |
+
"-",
|
359 |
+
"-",
|
360 |
+
"-",
|
361 |
+
"-",
|
362 |
+
"-",
|
363 |
+
"Included",
|
364 |
+
],
|
365 |
+
"EuroParl": [
|
366 |
+
"Included",
|
367 |
+
"-",
|
368 |
+
"-",
|
369 |
+
"-",
|
370 |
+
"-",
|
371 |
+
"-",
|
372 |
+
"-",
|
373 |
+
"Included",
|
374 |
+
],
|
375 |
+
"StackExchange": [
|
376 |
+
"Included",
|
377 |
+
"-",
|
378 |
+
"-",
|
379 |
+
"-",
|
380 |
+
"-",
|
381 |
+
"-",
|
382 |
+
"Included",
|
383 |
+
"Included",
|
384 |
+
],
|
385 |
+
"Code": [
|
386 |
+
"- what is this?",
|
387 |
+
"-",
|
388 |
+
"-",
|
389 |
+
"-",
|
390 |
+
"-",
|
391 |
+
"Included",
|
392 |
+
"Included",
|
393 |
+
"Included",
|
394 |
+
],
|
395 |
+
}
|
396 |
+
)
|
|
|
397 |
# Apply table styling: Light green for the header, alternating white and light grey for rows
|
398 |
+
styled_table = (
|
399 |
+
dataset_comparison2.style.set_properties(
|
400 |
+
**{"background-color": "#E1EEDB"},
|
401 |
+
subset=pd.IndexSlice[0, :], # Row 0 with a light green background
|
402 |
+
)
|
403 |
+
.apply(
|
404 |
+
lambda x: [
|
405 |
+
"background-color: #E1EEDB"
|
406 |
+
if i == 0
|
407 |
+
else (
|
408 |
+
"background-color: rgb(237, 242, 251)"
|
409 |
+
if i % 2 == 0
|
410 |
+
else "background-color: white"
|
411 |
+
)
|
412 |
+
for i in range(len(x))
|
413 |
+
],
|
414 |
+
axis=0,
|
415 |
+
)
|
416 |
+
.hide(axis="index")
|
417 |
+
) # Hide the row index
|
418 |
|
419 |
# Use _repr_html_() method to get the HTML representation of the styled DataFrame
|
420 |
table_html2 = styled_table._repr_html_()
|
|
|
422 |
table_div_2 = Div(NotStr(table_html2), style="margin: 40px;")
|
423 |
|
424 |
dataset_sources = pd.DataFrame(
|
425 |
+
{
|
426 |
+
"Data Source": [
|
427 |
+
"CommonCrawl",
|
428 |
+
"Papers",
|
429 |
+
"Wikipedia",
|
430 |
+
"Freelaw",
|
431 |
+
"DM Math",
|
432 |
+
"USPTO",
|
433 |
+
"PG-19",
|
434 |
+
"HackerNews",
|
435 |
+
"Ubuntu IRC",
|
436 |
+
"Europarl",
|
437 |
+
"StackExchange",
|
438 |
+
],
|
439 |
+
"Raw Data Size": [
|
440 |
+
"11 TB",
|
441 |
+
"712 GB",
|
442 |
+
"210 GB",
|
443 |
+
"23 GB",
|
444 |
+
"22 GB",
|
445 |
+
"45 GB",
|
446 |
+
"11 GB",
|
447 |
+
"4.1 GB",
|
448 |
+
"4.7 GB",
|
449 |
+
"6.1 GB",
|
450 |
+
"45 GB",
|
451 |
+
],
|
452 |
+
"Token Count": [
|
453 |
+
"5.71T",
|
454 |
+
"154.96B",
|
455 |
+
"4.75B",
|
456 |
+
"7.34B",
|
457 |
+
"5.23B",
|
458 |
+
"4.95B",
|
459 |
+
"2.94B",
|
460 |
+
"1.08B",
|
461 |
+
"1.54B",
|
462 |
+
"1.96B",
|
463 |
+
"8.37B",
|
464 |
+
],
|
465 |
+
"Cut-Off Date": [
|
466 |
+
"2024-30",
|
467 |
+
"Q4 2023",
|
468 |
+
"-",
|
469 |
+
"Q1 2024",
|
470 |
+
"-",
|
471 |
+
"Q4 2023",
|
472 |
+
"-",
|
473 |
+
"Q4 2023",
|
474 |
+
"Q4 2023",
|
475 |
+
"-",
|
476 |
+
"Q4 2023",
|
477 |
+
],
|
478 |
+
}
|
479 |
+
)
|
480 |
# Apply table styling: Light green for the header, alternating white and light grey for rows
|
481 |
styled_table = dataset_sources.style.apply(
|
482 |
+
lambda x: [
|
483 |
+
"background-color: white"
|
484 |
+
if i % 2 == 0
|
485 |
+
else "background-color: rgb(237, 242, 251)"
|
486 |
+
for i in range(len(x))
|
487 |
+
],
|
488 |
+
axis=0,
|
489 |
).hide(axis="index") # Hide the row index
|
490 |
|
491 |
table_html_data = styled_table._repr_html_()
|
|
|
494 |
|
495 |
|
496 |
def get_curated_chart():
|
497 |
+
# Dataset
|
498 |
data = {
|
499 |
+
"Source": [
|
500 |
+
"ArXiv",
|
501 |
+
"PubMed Central",
|
502 |
+
"PubMed Abstract",
|
503 |
+
"S2ORC Full Text",
|
504 |
+
"S2ORC Abstract",
|
505 |
+
"PhilPapers",
|
506 |
+
"Wikipedia",
|
507 |
+
"StackExchange",
|
508 |
+
"EuroParl",
|
509 |
+
"Ubuntu IRC",
|
510 |
+
"Freelaw",
|
511 |
+
"PG19",
|
512 |
+
"USPTO",
|
513 |
+
"HackerNews",
|
514 |
+
"DM Maths",
|
515 |
+
],
|
516 |
+
"Category": [
|
517 |
+
"Papers",
|
518 |
+
"Papers",
|
519 |
+
"Papers",
|
520 |
+
"Papers",
|
521 |
+
"Papers",
|
522 |
+
"Papers",
|
523 |
+
"Internet",
|
524 |
+
"Conversational",
|
525 |
+
"Legal/Formal",
|
526 |
+
"Conversational",
|
527 |
+
"Legal/Formal",
|
528 |
+
"Books",
|
529 |
+
"Legal/Formal",
|
530 |
+
"Conversational",
|
531 |
+
"Reasoning",
|
532 |
+
],
|
533 |
+
"Count": [
|
534 |
+
100,
|
535 |
+
200,
|
536 |
+
150,
|
537 |
+
120,
|
538 |
+
80,
|
539 |
+
90,
|
540 |
+
300,
|
541 |
+
250,
|
542 |
+
180,
|
543 |
+
150,
|
544 |
+
150,
|
545 |
+
250,
|
546 |
+
180,
|
547 |
+
120,
|
548 |
+
90,
|
549 |
+
],
|
550 |
+
"Details": [
|
551 |
+
"A repository of scientific papers in various disciplines, including computer science, physics, mathematics, and more.",
|
552 |
+
"A database of biomedical and life sciences research articles.",
|
553 |
+
"Abstracts of biomedical literature from various sources.",
|
554 |
+
"Full-text articles from the Semantic Scholar Open Research Corpus.",
|
555 |
+
"Abstracts of articles from the Semantic Scholar Open Research Corpus.",
|
556 |
+
"Papers from the PhilPapers database, a comprehensive index and bibliography of philosophy research.",
|
557 |
+
"A collaborative online encyclopedia that covers a wide range of topics.",
|
558 |
+
"A network of question-and-answer websites on various subjects, including programming, science, mathematics, and more.",
|
559 |
+
"A collection of multilingual parallel corpora of parliamentary debates from the European Parliament.",
|
560 |
+
"Chat logs from the Ubuntu Internet Relay Chat (IRC) channels.",
|
561 |
+
"Legal documents and court cases from various jurisdictions.",
|
562 |
+
"A collection of books from Project Gutenberg, a digital library of public domain works.",
|
563 |
+
"Patent documents from the United States Patent and Trademark Office.",
|
564 |
+
"User-generated news and discussion platform focused on technology and startups.",
|
565 |
+
"Deep Mind Maths dataset with generated questions.",
|
566 |
+
],
|
567 |
}
|
568 |
# Calculate percentage for each data source
|
569 |
+
total_count = sum(data["Count"])
|
570 |
+
data["Percentage"] = [count / total_count * 100 for count in data["Count"]]
|
571 |
+
|
572 |
# Create treemap
|
573 |
+
fig = px.treemap(
|
574 |
+
data,
|
575 |
+
path=["Category", "Source"],
|
576 |
+
values="Count",
|
577 |
+
hover_data=["Details", "Percentage"],
|
578 |
+
hover_name="Source",
|
579 |
+
)
|
580 |
+
|
581 |
# Set the size of the chart
|
582 |
fig.update_layout(width=800, height=600)
|
583 |
+
|
584 |
# Display treemap
|
585 |
st.plotly_chart(fig)
|
586 |
|
587 |
+
|
588 |
overview_div = Div(
|
589 |
+
Section(
|
590 |
+
H2("Overview"),
|
591 |
+
H3("What This Section Contains"),
|
592 |
+
Ul(
|
593 |
+
Li("Motivation Behind TxT360", style="margin-bottom: 5px"),
|
594 |
+
Li("The Highlevel Data Process Approach", style="margin-bottom: 5px"),
|
595 |
+
Li("Introduction to Global Deduplication", style="margin-bottom: 5px"),
|
596 |
+
),
|
597 |
+
H2("Motivation Behind Txt360"),
|
598 |
+
H3(
|
599 |
+
"TxT360 is the first dataset to combine both web and curated data sources commonly used in pretraining."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
600 |
),
|
601 |
+
P(
|
602 |
+
"The quality and size of a pre-training dataset play a crucial role in the performance of large language models (LLMs). Data is often referred as low quality if it has not been filtered to review unwanted text. The community has introduced a variety of filtered datasets including purely web-based datasets."
|
603 |
+
),
|
604 |
+
P(
|
605 |
+
"In pretraining, it is common to combine web data and curated sources (cite). Web data is included to provide a vast quantity of long tail and diverse data, while curated datasets are often information rich and provide the 'deep-dive' domain information. Both datasets play critical for effective LLM pre-training."
|
606 |
+
),
|
607 |
+
H4("The Gap TxT360 Fills"),
|
608 |
+
P(
|
609 |
+
"Despite advancements in filtering and source material for both data types, each type of dataset has its limitations. RefinedWeb is known for its high quality content but and only about 10% of the entire dataset has been disclosed and the processing scripts have not been released. For datasets that have combined curated sources with web data, the web component is relatively small (NEED TO UPDATE - citation needed)."
|
610 |
+
),
|
611 |
+
P(
|
612 |
+
"By integrating the extensive reach of web data with the exceptional quality of curated sources, TxT360 meets and surpasess the rigorous standards required for state-of-the-art LLM pre-training as demostated in the Results section."
|
613 |
+
),
|
614 |
+
P(
|
615 |
+
"Table 1: The following table shows TxT360 and other well-known datasets on the coverage and size of data sources."
|
616 |
+
),
|
617 |
+
table_div_1,
|
618 |
+
table_div_2,
|
619 |
+
P("Table 2: Basic TxT360 Statistics."),
|
620 |
+
table_div_data,
|
621 |
+
),
|
622 |
Section(
|
623 |
+
H2("Our Generalizable Approach to Data Processing"),
|
624 |
+
P(
|
625 |
+
"To produce TxT360, a comprehensive and transparent data processing pipeline was designed to account for the nuances of both web and curated datasets. The pipeline presents a unified framework for processing both data types, making it convenient and easily adaptive for users to revise and fine-tune the pipeline for their own use cases."
|
626 |
+
),
|
627 |
+
P(
|
628 |
+
"Web datasets are inherently noisy and varied. Thus, the pipeline includes sophisticated filtering and deduplication techniques to clean the data and remove redundancies or irrelevant information."
|
629 |
+
),
|
630 |
+
P(
|
631 |
+
"Curated datasets are typically already structured and consistently formatted. TxT360 filters these sources with selective steps to maintain their integrity while providing seamless integration into the larger dataset."
|
632 |
),
|
633 |
+
P(
|
634 |
+
"We will open-source the scripts for the whole pipeline, allowing the community to review, replicate, and build upon our processes."
|
635 |
+
),
|
636 |
+
Img(src="images/pipeline.png", height="300", width="600"),
|
637 |
+
P(
|
638 |
+
"Figure 1: Data processing pipeline. All the steps are adopted for processing web data while the yellow blocks are adopted for processing curated sources."
|
639 |
+
),
|
640 |
+
),
|
641 |
Section(
|
642 |
+
H2("Introducing Global Deduplication"),
|
643 |
+
P(
|
644 |
+
"Deduplication is crucial in language model pre-training for several reasons (NEEDS CITATION). Main hypothesis on why deduplicaiton is necessary and help include:"
|
645 |
+
),
|
646 |
+
Ul(
|
647 |
+
Li(
|
648 |
+
"reducing data volume reduces training time (and cost)",
|
649 |
+
style="margin-bottom: 5px",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
650 |
),
|
651 |
+
Li(
|
652 |
+
"removing duplicataive data can lead to better accuracy",
|
653 |
+
style="margin-bottom: 5px",
|
654 |
+
),
|
655 |
+
Li("prevent train-test overlap", style="margin-bottom: 5px"),
|
656 |
+
Li(
|
657 |
+
"minimizes the risk of memorization leading to test loss",
|
658 |
+
style="margin-bottom: 5px",
|
659 |
+
),
|
660 |
+
),
|
661 |
+
P(
|
662 |
+
"Furthermore, by controlling the pretraining data distribution through deduplication and selective upsampling avoida relying on the often inconsistent distribution of internet-sourced data."
|
663 |
+
),
|
664 |
+
H3("Highlights of the TxT360 Deduplication Process"),
|
665 |
+
P(
|
666 |
+
"Our deduplication process began with 61.8 TB of filtered, and compressed documents, totaling approximately 48.83 billion documents. We first performed exact deduplication using a Bloom filter, reducing the dataset by 17% to 40.21 billion documents. For global near-deduplication, we scaled methodologies from prior works like SlimPajama to handle the entire dataset, including 87 Common Crawl dumps and other curated data. This involved generating document signatures, matching them to identify near-duplicates, and clustering these to retain only one document per cluster. We prioritized retaining documents from curated sources and more recent CommonCrawl dumps. Throughout the deduplication stages, we extensively used Dask for distributed data processing."
|
667 |
),
|
668 |
+
P(
|
669 |
+
"After the global near-deduplication of all 87 CommonCrawl dumps and other curated data, we removed around 85% of the total documents. This leaves us with approximately 4.24 trillion deduplicated tokens, which aligns with what FineWeb has reported for their iterative global deduplication. Along with the list of duplicated documents to delete, our deduplication code also saves some metadata about the duplicate clusters that we find. We save statistics about every duplicate cluster we find, with the document ID of the document we retain from the cluster as the key and with a value capturing the distribution of the duplicates within the cluster over the CommonCrawl dumps (identified by the first 2 digits of every document ID). This way, we always have information about the duplicates we have deleted, allowing us to upsample any data distribution we want for training."
|
670 |
+
),
|
671 |
+
P(
|
672 |
+
"During deduplication, it is not feasible to store all the duplicate clusters we form, but we do save some samples at every size. Here are some observations we made by examining these sample duplicate clusters:"
|
673 |
+
),
|
674 |
+
Ul(
|
675 |
+
Li(
|
676 |
+
"Smaller components tend to have more overlap in their MinHash bands. The smallest components, which are essentially pairs, consist of exact duplicate documents that local exact deduplication missed."
|
677 |
+
),
|
678 |
+
Li(
|
679 |
+
"When clusters contain three or more documents, incremental changes in the text become apparent. For example, there may be a growing list of personnel over the years."
|
680 |
+
),
|
681 |
+
Li(
|
682 |
+
"In sizable clusters comprising 1,000 or more documents, we observe a trend towards templatization. This involves the recurrent use of standardized language to convey general topics such as terms and conditions, warnings, and disclaimers. Such language is prevalent on commercial websites, offering a consistent and efficient way to communicate commonly encountered information."
|
683 |
+
),
|
684 |
+
),
|
685 |
+
P(
|
686 |
+
"All Deduplication details can be found in the Global Data Processing Steps section."
|
687 |
+
),
|
688 |
+
),
|
689 |
)
|
690 |
|
691 |
+
|
692 |
@app.get("/intro")
|
693 |
def intro():
|
694 |
return Div(
|
695 |
Section(
|
696 |
H2("About TxT360"),
|
697 |
+
P(
|
698 |
+
"We introduce Trillion eXtracted Text (TxT360): the highest quality, most comprehensive, and production ready pretraining dataset released to date, an open source pre training textual dataset with the widest coverage to date, including all 99 Common Crawl snapshots released to date and 14 widely used curated sources such as Wikipedia, StackExchange, and ArXiv."
|
699 |
+
),
|
700 |
+
P(
|
701 |
+
"Building on top of the prior study on pre-training data, (cite C4, chinchilla, fineweb, refinedweb, 2305.16264, ) TxT360 carefully implements data processing steps such as extraction, filtering, deduplication, PII removal and so on. Notably, we design a schema to provide users with full control on the weights of each data point, instead of relying on unknown distribution from the raw dataset. Specifically, we strive to make each data point appear only once, via global deduplication across the whole corpus. Importantly, we store enough metadata to recover the raw distribution, and additionally allow one to have fine-grained control to create data distributions and corpus of desired size. As an example, we present one simple upsampling scheme that takes into account the duplication counts, resulting in a 15~16 trillion token corpus, outperforming FineWeb and our non-upsampling baselines, on diverse evaluations. Unlike DCLM and RedPajama V2, we present the final deduplicated dataset that is ready to go."
|
702 |
+
),
|
703 |
+
P(
|
704 |
+
"We have carefully implemented a large set of filters by carefully reviewing the input, output from data samples and tailored design for each data source. We learned from and compared our implementation with prior data pipelines, such as Chinchilla, C4, DataTrove, Dolma, and RedPajama Data V2 to make carefully considered decisions."
|
705 |
+
),
|
706 |
+
P(
|
707 |
+
"In light of the 360 open source spirit, we will open source the code and document all the implementation details in this blog post, along with the examples and why each decision is made, hoping to shed some light on this important but tedious step."
|
708 |
+
),
|
709 |
id="section1",
|
710 |
),
|
711 |
overview_div,
|
|
|
713 |
)
|
714 |
|
715 |
|
716 |
+
# rt("/overview")(overview.overview)
|
717 |
|
718 |
rt("/update/{target}")(data_viewer.update)
|
719 |
|