Lightning-AI / Lightning-AI/litgpt

Automatically infer and download the tokenizer in pretrain?

Open
#1,260 0 comments 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

Should we automatically infer and download the tokenizer config when no `--tokenizer_dir` is provided in `litgpt pretrain`?

I.e.,

```bash
litgpt download \
--repo_id EleutherAI/pythia-14m \
--tokenizer_only true

litgpt pretrain \
--model_name pythia-14m \
--data ... \
--tokenizer_dir checkpoints/EleutherAI/pythia-14m
```

becomes

```bash
litgpt pretrain \
--model_name pythia-14m \
--data ... \
```

(The tokenizer json is saved in the out put directory perhaps.)

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 with the `litgpt pretrain` command and its existing `--tokenizer_dir` handling, then trace how the `litgpt download --tokenizer_only true` flow stores tokenizer files. The work is complete when pretraining can infer and download the tokenizer without `--tokenizer_dir`, with the tokenizer JSON saved in the chosen output directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.