Lightning-AI / Lightning-AI/litgpt

Is there any best practice for using litdata to load custom data for pretraining?

Open
#1,428 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13.7k
Forks
1.5k
Avg merge
15h 37m
Merged PRs (30d)
1

Description

Is there any best practice for using litdata to load custom data for pretraining? I found that TextFiles.py and prepare_slimpajama.py have similar data preprocessing methods. The difference between them is in the tokenizer. One is tokenizer during preprocessing, and the other is tokenizer during training?Why TextFiles are not suitable for handling large amounts of data?
![image](https://github.com/Lightning-AI/litgpt/assets/54690997/4e829139-506e-49d9-88a6-a293add6416f)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing TextFiles.py and prepare_slimpajama.py, focusing on where tokenization occurs and how each preprocessing path handles data volume. Use the issue's large-data question to determine what guidance is needed; done means documenting a clear recommended litdata workflow for custom pretraining data and explaining the tradeoffs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering, machine-learning
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.