lm-sys / lm-sys/FastChat

Empty input_ids when training use train.py

Open
#1,386 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

I am running train.py using the following parameters:

```
torchrun --nproc_per_node=4 --master_port=20001 fastchat/train/train.py \
--model_name_or_path /home/ubuntu/FastChat/llama_7B \
--data_path playground/data/dummy.json \
--fp16 True \
--output_dir output \
--num_train_epochs 3 \
--per_device_train_batch_size 1 \
--per_device_eval_batch_size 1 \
--gradient_accumulation_steps 16 \
--evaluation_strategy "no" \
--save_strategy "steps" \
--save_steps 1200 \
--save_total_limit 10 \
--learning_rate 1e-4 \
--weight_decay 0. \
--warmup_ratio 0.03 \
--lr_scheduler_type "cosine" \
--logging_steps 1 \
--model_max_length 1028 \
--gradient_checkpointing True \
--lazy_preprocess True
```

Got Error of empty input_ids. I am using the dummy sample set from playground:
![截屏2023-05-20 上午10 45 23](https://github.com/lm-sys/FastChat/assets/17308814/9c0a3218-f4bb-4d78-b74b-4ecef098f6cd)

Any ideas for the error? Thanks!

Contributor guide

No contributing guide indexed for this repository

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

The entry point is fastchat/train/train.py and the reported input is playground/data/dummy.json. Reproduce the supplied torchrun command, then inspect how that dataset is handled and where the empty input_ids error is raised; done means the dummy dataset trains without that error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.