Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
35
588k
No announcement yet. Concept Update: Air Burst - Impact Hammer Alt-Fire • Filter • Time • Show Clear All new posts Concept Update: Air Burst - Impact Hammer Alt-Fire New Theme: An Electrolyzed Metallic Sulfide Dust Cloud Discharged by Compressed Air What is the Impact Hammer? Originally used ...
5 minutes reading time (1019 words) You can stop Tory and Labour's extreme version of Brexit. It will take about 3 minutes. Here's how. Brexit firey logo: not in my name The best analogy we can find for the next election is of choosing contemporary Britain's mode of execution: disembowelled by Brexit, and ready for t...
Love Tester 1985 and the St. Louis Global Game Jam 2013 Matching Hearts Over the weekend of Jan 25-27, 2013 I co-organized and participated in the St. Louis Global Game Jam 2013. See my posts over at http://www.stlgamejam.com for more posts by me. I’m particularly proud of this post: http://www.stlgamejam.com/everyon...
Crossword Puzzle Number 316 (Large Grid)   10 11  12 13 14 15  16    17     18     19     20   21    22 23        24   25     26        27  28    29           30 31         32   33 34 35 36   37        38 39  40   41    42     43 44 45  46  47   48    49      50    51    52  53      54  55     56   57  58   59   60   ...
Speed Up Your Dynamics Simulations with Proxy Objects Dynamics are used to add real-world physics to CG objects. You can use dynamics to have objects fall realistically or for a character's clothing to fold in natural ways, and even to simulate jiggle effects on pliable surfaces like skin. However, since complex algor...
Screen Shot 2015-03-20 at 9.24.42 PMAt the southern end of the plateau, which lies at the top of Echo Rock, more than 500 tonnes of opaque quartz protrude from the surrounding soil. Less than fifty yards west, on the other side of the Solitaire Lake Trail, five or six smaller quartz outcrops are located, with others ...
Ageing, marginal gains and #BigitupforOTs IMG_7292I suspect that part of the problem about aging is that it’s an insidious process; it’s not like you wake up one day and suddenly you are ‘old’. It’s a gradual process noticeable by a series of small incremental changes; stiffness when you get out of bed on a morning th...
11 Trending Words of 2014 [goos] /gus/ noun, plural geese for 1, 2, 4, 8; gooses for 5–7. the flesh of a goose, used as food. a silly or foolish person; simpleton. Slang. a poke between the buttocks to startle. Informal. anything that energizes, strengthens, or the like: to give the economy a badly needed goose. a ta...
The Teacher’s Diary Movie Review “Such an inspiring masterpiece, a very unique and heart-felt movie. I cried a bucket tho. Still, better late than never.” Teacher’s Diary [2014] is a Thai movie that told us about teachers who taught in the school that located in the remote area (in the middle of lake). The school was...
Skip to main content News Ticker London police make 'significant' new arrest in Sabina Nessa murder investigation Posted , updated  Sabina Nessa in a graduation photo. Sabina Nessa's family say they feel "stuck in a bad dream and can't get out" following the murder.(Supplied: Metropolitan Police) Share this article ...
Company MLM Resisted and prejuzgados since its inception, the MLM business are no longer a promise, they are a reality. Thousands of companies worldwide have chosen this way of distributing its products and/or services, offering the possibility to be part of their enterprises as independent distributors to ordinary pe...
Does Cholesterol Medication Raise Blood Sugar Does Cholesterol Medication Raise Blood Sugar Cholesterol is just one of the most usual ingredients of foods we eat. It offers numerous objectives in our bodies, yet its major feature is to produce bile acids that help in the digestion of fat. Consequently, it is frequent...
Barbara Hartwell My Photo Sunday, December 10, 2006 New Age Politically Correct Thought Police Note: The following was posted on the Rumor Mill News Forum in October, 2003, just about a month before I resigned as a news agent. I should also mention that although (as mentioned briefly in the report) I was utilized ...
Electricity and health 240 volt plug end (two pin) Electricity powerlines, substations, transformers and other electrical sources such as common electrical appliances and wiring, all emit extremely low frequency (ELF) electric and magnetic fields (EMF). As we are surrounded by electrical sources in our daily lives we...
[an error occurred while processing this directive] PC Transcript Tuesday 11/20/01 [an error occurred while processing this directive] [an error occurred while processing this directive] Port Charles Transcript Tuesday 11/20/01 By John Proofread by Beth Caleb's Voice: Here's my offer, Chris -- you give me the seru...
[IP] HbA1c formula I thought that more than bg readings, HbA1c's were really compared to what was the "normal range" for the particular lab. If this is true, how can a formula like this one be Perhaps another way to look at it is how much variation is there between labs on HbA1c's? <<There is a formula for doin...
Couple guilty of murdering boy after ‘utterly horrific and prolonged’ torture A 15-year-old boy who was tortured and killed by his mother and her partner in a campaign of “utterly horrific and prolonged” torture was murdered by the two people he “should have been able to trust the most in the world”, a senior prosecut...
Natural Remedies For Tension Headaches Tension headaches are characterized by a mild feeling of pain and pressure on the forehead, along the sides of the head and across the back of the head. While the causes for tension headaches are not entirely clear, there are many home remedies that can help to alleviate symptoms...
What is Mailchimp? Mailchimp is a marketing automation platform and an email marketing service created so that people could create their own personal emails which they could then send out to potential customers. Founded back in 2001 Mailchimp began as a paid service and then added a fermium option in 2009. By 2014 Mai...
What Are Solo Ads, Why They Are The  "Holy Grail" Of Traffic And  How YOU Can Start Using Them Today Unless you have been living under a rock for the last few years, you will know that the most successful online marketers have all used solo ads in one way or another to grow their business.  But what is a "solo ad" ...
JMlab Utopia loudspeaker I first met Jacques Mahul (the JM in JMlab/Focal) when my wife Kathleen and I traveled to Paris to cover HiFi (Hee-Fee) '96. The sound produced by the JMlab Grand Utopias—on a collection of many-chassis'd YBA electronics—got my enthusiastic vote for best of show (footnote 1). JMlab's large dem...
By Chelsea Boice Paid search can be a valuable channel for any inbound marketing strategy. From increasing brand awareness to driving higher traffic and sales conversions, paid search can help you build a better link between search engines and your website and content. One paid search tactic commonly used to help bus...
Skip to main content US Congress recognizes Armenian genocide 3 min Washington (AFP) The US Congress on Thursday formally recognized the 1915-1917 murder of up to 1.5 million Armenians as genocide. The Senate's passage of the repeatedly stalled resolution is expected to anger Turkey, which denies there was a genoc...
I have been writing for Catster for nearly a decade. It was early in my first year that I learned one of the basic tenets of writing about animals on the Internet: Write about cat food or dog food and ye shall be flamed. Whenever I write about pet food I think of Kathy Bates’ character in The Waterboy. To her, footbal...
Category: mental health issues Why then? PHOTO PROMPT © The Reclining Gentleman PHOTO PROMPT © The Reclining Gentleman Bobby was a good kid. He got good grades in school and had a ton of good friends. His family was supportive to him, and although they often worked away from home, they were there for him. Bobby was...
Dear Visitor It is my pleasure to address you as the appointed Ambassador of the Republic of Panama to Canada, is also a great honour as we celebrate the 55th anniversary of Diplomatic Relations with Canada in 2016. This strong bilateral relationship has been based on a shared desire to promote economic and cultural t...
What's Poppin' with Genital-headed Ghostsharks? Good morning; a species of shark with a retractable penis that "resembles a spiked club at the end of a stalk" protruding from its forehead has been discovered in the Pacific ocean. It's called the Eastern Pacific black ghostshark and it's not something you'd want to enc...
Michelle Obama -- Fashion Diva or Disaster? Sweatergate 2009! Michelle Obama wore a sweater when she met with Queen Elizabeth II this week, and her wardrobe choice has kicked up major drama in the fashion world. The First Lady often wears affordable American brand clothes to events, and apparently Oscar de la Renta ...
Business // Texanomics Rep. McCaul to students: Federal defense spending more important than education Homeland Security chair seemed fine with cuts to schools at a college forum this week. The U.S. Congress is having a lot of debates about guns and butter these days, and to an audience of students this week, Housto...
Part-1 An interview with Mr. Rajendra Puri, Mr. Sanjay Kothari and Mr, Rajan Bhatt Mr. Rajendra Puri is an alumnus of CEPT university, Ahmedabad and has over three decades of experience. Mr Puri has worked with the likes of Architect B.V Doshi. Mr. Sanjay Kothari is an alumnus of Chandigarh college of Architecture a...
Jump to content • Content Count • Joined • Last visited • Days Won smeargletail last won the day on July 27 2020 smeargletail had the most liked content! Community Reputation 161 Benefactor About smeargletail • Rank self perclaimed nerd • Birthday 07/24/1993 Profile Information • Alias ...
6 servings In the Caribbean, fungi refers to a versatile cornmeal mush. It is sometimes mixed with vegetables and served as a side dish or sweetened and served as a dessert. This recipe lightens the texture to create something more like a soufflé and crisscrosses the top with crunchy strands of caramelized sugar. How...
End of preview. Expand in Data Studio

DCLM-Baseline 1.0 dataset (150BT/4% sample)

This repository contains a repackaged version of the DCLM-Baseline 1.0 dataset for efficient use with Andrej Karpathy’s Nanochat project.

117968896 docs, ~666 856 099 899 characters, 2621 shards.

It is intended as a drop-in replacement for the FineWeb-Edu dataset.

How to load the dataset

The dataset format is identical to FineWeb. To use it with Nanochat, simply replace the dataset URL in nanochat/dataset.py:

BASE_URL = "https://huggingface.co/datasets/ddudek/nanochat-dclm-baseline-150b-shuffle/resolve/main"
MAX_SHARD = 2621

Scripts used:

The dataset was created in two stages:

1. Sampling 4% docs from the dataset

Sample size was targeted to be a bit more than original fineweb-edu. The script was a slightly modified original fineweb-edu repackage script with the following changes:

  • used streaming (because of the enormous size of dclm dataset)
  • no shuffling yet, as the streaming was used
  • added in-place random sampling

Note: I recommend to write directly to Arrow format instead of Parquet at this stage. It's done either way later during shuffling, which added unnecessary overhead — but :shrug:

import os
import time

import random

from datasets import load_dataset, Dataset
import datasets
import pyarrow.parquet as pq
import pyarrow as pa


dataset = load_dataset('mlfoundations/dclm-baseline-1.0-parquet', split='train', streaming=True) # <- set streaming
ndocs = 2732074726 # as estimated by huggingface page, turned out to be a bit more
sample_fraction = 0.04 # 4%, targeted to be a bit more than the original fineweb-edu dataset size

ds = dataset
random.seed(382)

# needs ~256 GB of space
output_folder = f"/mnt/THE_2TB/base_data_dclm_orig_nonshuffle"
output_dir = os.path.join(base_dir, output_folder)
os.makedirs(output_dir, exist_ok=True)

processing_batch_size=16*1024

# Write to parquet files
chars_per_shard = 250_000_000
row_group_size = 1024 # HF uses 1000 but we use multiple of 2, nicer for distributed data loader later
shard_docs = []
shard_index = 0
shard_characters = 0
total_docs_processed = 0
total_time_spent = 0
t0 = time.time()

ds_iter = ds.iter(batch_size=processing_batch_size)

total_docs_processed_sample = 0

for idx_batch, doc_batch in enumerate(ds_iter):
    
    for idx_doc, text in enumerate(doc_batch['text']):
        global_idx = idx_batch * processing_batch_size + idx_doc
        total_docs_processed += 1

        # sampling here
        include_sample = random.random() < sample_fraction
        if not include_sample:
            continue
        
        # text = doc['text']
        shard_docs.append(text)
        shard_characters += len(text)
        collected_enough_chars = shard_characters >= chars_per_shard
        docs_multiple_of_row_group_size = len(shard_docs) % row_group_size == 0
        if collected_enough_chars and docs_multiple_of_row_group_size: # leads to ~100MB of text (compressed)
            shard_path = os.path.join(output_dir, f"shard_{shard_index:05d}.parquet")
            shard_table = pa.Table.from_pydict({"text": shard_docs})
            pq.write_table(
                shard_table,
                shard_path,
                row_group_size=row_group_size,
                use_dictionary=False, # this is usually used for categorical data
                compression="zstd", # Valid values: {‘NONE’, ‘SNAPPY’, ‘GZIP’, ‘BROTLI’, ‘LZ4’, ‘ZSTD’}
                compression_level=3,
                write_statistics=False, # not needed for text
            )
            t1 = time.time()
            dt = t1 - t0 # for this shard alone
            t0 = t1
            total_docs_processed_sample += len(shard_docs)
            total_time_spent += dt
            remaining_docs = ndocs - total_docs_processed
            avg_time_per_doc = total_time_spent / total_docs_processed
            remaining_time = remaining_docs * avg_time_per_doc
            remaining_time_hours = remaining_time / 3600
            print(f"[{(total_docs_processed/ndocs):.2f}%] Wrote {shard_path}, batch {idx_batch}., #documents: {len(shard_docs)} | total written: {total_docs_processed_sample} | #characters: {shard_characters} | time: {dt:.2f}s | remaining time: {remaining_time_hours:.2f}h")
            shard_docs = []
            shard_characters = 0
            shard_index += 1
            num_synthetic_added = 0

2. Shuffling

Once the full 4% sample was collected, the dataset was shuffled to randomize document order, and written out in Nanochat-optimized format:

import os
import time
import threading
from queue import Queue

from nanochat.common import get_base_dir_static
from datasets import load_dataset
import datasets
import pyarrow.parquet as pq
import pyarrow as pa
import pyarrow.dataset as ds

# Some config to improve speed
datasets.config.IN_MEMORY_MAX_SIZE =  8*134217728 # 8*128MB
writer_batch_size=64 * 1024

dclm = load_dataset(
    "parquet",
    data_files={"train": "/mnt/THE_2TB/base_data_dclm_orig_nonshuffle/shard_*.parquet"},
    split="train",
    cache_dir="/mnt/FAST_1TB/base_data_dclm_orig_nonshuffle_cache", # <- ~670 GB needed for repackaging arrow, this could've been avoided if used arrow in the step 1
    num_proc=10,
)

ndocs = len(dclm) # 117968896

# Shuffle to scramble the order
print("Shuffling dataset...")
ds_shuf = dclm.shuffle(seed=42) # after this reading ds will be much slower, to mitigate use flatten_indices, but here we're repacking anyway
print("Finished.")

# Final step - package as for nanochat format
output_dir = "/mnt/THE_2TB/hf_cache/nanochat-dclm-baseline-shuffle42"
os.makedirs(output_dir, exist_ok=True)

# some batching to improve performance
processing_batch_size=16*1024

# Write to parquet files
chars_per_shard = 250_000_000
row_group_size = 1024 # HF uses 1000 but we use multiple of 2, nicer for distributed data loader later
shard_docs = []
shard_index = 0
shard_characters = 0
total_docs_processed = 0
total_time_spent = 0
t0 = time.time()

ds_iter = ds_shuf.iter(batch_size=processing_batch_size)

total_docs_processed_sample = 0

for idx_batch, doc_batch in enumerate(ds_iter):
    
    for idx_doc, text in enumerate(doc_batch['text']):
        global_idx = idx_batch * processing_batch_size + idx_doc

        total_docs_processed += 1
        
        # text = doc['text']
        shard_docs.append(text)
        shard_characters += len(text)
        collected_enough_chars = shard_characters >= chars_per_shard
        docs_multiple_of_row_group_size = len(shard_docs) % row_group_size == 0
        if collected_enough_chars and docs_multiple_of_row_group_size: # leads to ~100MB of text (compressed)
            shard_path = os.path.join(output_dir, f"shard_{shard_index:05d}.parquet")
            shard_table = pa.Table.from_pydict({"text": shard_docs})
            pq.write_table(
                shard_table,
                shard_path,
                row_group_size=row_group_size,
                use_dictionary=False, # this is usually used for categorical data
                compression="zstd", # Valid values: {‘NONE’, ‘SNAPPY’, ‘GZIP’, ‘BROTLI’, ‘LZ4’, ‘ZSTD’}
                compression_level=3,
                write_statistics=False, # not needed for text
            )
            t1 = time.time()
            dt = t1 - t0 # for this shard alone
            t0 = t1
            total_docs_processed_sample += len(shard_docs)
            total_time_spent += dt
            remaining_docs = ndocs - total_docs_processed
            avg_time_per_doc = total_time_spent / total_docs_processed
            remaining_time = remaining_docs * avg_time_per_doc
            remaining_time_hours = remaining_time / 3600
            print(f"[{(total_docs_processed/ndocs):.2f}%] Wrote {shard_path}, batch {idx_batch}., #documents: {len(shard_docs)} | total written: {total_docs_processed_sample} | #characters: {shard_characters} | time: {dt:.2f}s | remaining time: {remaining_time_hours:.2f}h")
            shard_docs = []
            shard_characters = 0
            shard_index += 1
            num_synthetic_added = 0

Uploaded using:

# ~666 856 099 899 characters, 117968896 docs
repo_id="ddudek/nanochat-dclm-baseline-150b-shuffle"
def upload():
    import os
    from huggingface_hub import HfApi
    token = os.getenv("HF_TOKEN")
    api = HfApi(token=token)
    api.upload_large_folder(
        folder_path=output_dir,
        repo_id=repo_id,
        repo_type="dataset",
    )
upload()
Downloads last month
52