Datasets:
Dataset Viewer
The dataset viewer is not available for this dataset.
Unexpected token '<', "<html>
<h"... is not valid JSON
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Dataset Card for eoinf/pile_tok4096_200m
Original dataset
Original dataset: monology/pile-uncopyrighted
Dataset Details
- Total Tokens: 200,018,944
- Total Sequences: 195,331
- Context Length: 1024 tokens
- Tokenizer: eoinf/pile_tokenizer_4096
- Format: Each example contains a single field
tokenswith a list of 1024 token IDs
Preprocessing
Each document was:
- Tokenized using the eoinf/pile_tokenizer_4096 tokenizer
- Prefixed with a BOS (beginning of sequence) token
- Suffixed with an EOS (end of sequence) token
- Packed into fixed-length sequences of 1024 tokens
Usage
from datasets import load_dataset
# Load the dataset
dataset = load_dataset("eoinf/pile_tok4096_200m")
# Access training data
train_data = dataset["train"]
print(train_data[0]["tokens"]) # First sequence
Use with PyTorch
import torch
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("eoinf/pile_tok4096_200m", split="train")
# Convert to PyTorch tensors
dataset.set_format(type="torch", columns=["tokens"])
# Create DataLoader
dataloader = DataLoader(dataset, batch_size=32, shuffle=True)
for batch in dataloader:
tokens = batch["tokens"]
- Downloads last month
- 10