Skip to content

Token indices sequence length is longer than the specified maximum sequence length for this model (60022 > 32768). Running this sequence through the model will result in indexing errors #1

Description

@ADIOCLASSMATE

我们在8卡A100 80G 等效算力上复现预训练, 发现:
问题1:

[WARNING|tokenization_utils_base.py:3945] 2025-09-05 13:49:03,241 >> Token indices sequence length is longer than the specified maximum sequence length for this model (60022 > 32768). Running this sequence through the model will result in indexing errors

问题2:

[WARNING][veomni.data.dynamic_batching:110] 09/05/2025 13:49:06 >> DynamicBatchDataset iter data exception:  
Traceback (most recent call last):
  File "/inspire/hdd/project/embodied-multimodality/liuxiaoran-240108120089/projects_zhuying/Open-dLLM/veomni/data/dynamic_batching.py", line 107, in batch_data_generator
    processing_item = next(self._data_iter)
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torchdata/stateful_dataloader/stateful_dataloader.py", line 450, in __next__
    return super().__next__()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torch/utils/data/dataloader.py", line 733, in __next__
    data = self._next_data()
           ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torchdata/stateful_dataloader/stateful_dataloader.py", line 1407, in _next_data
    raise StopIteration
StopIteration

可能是由问题一导致.

问题3:

Epoch 1/1:   0%|                | 3/953675 [10:20<54448:05:23, 205.54s/it, loss: 29.20, grad_norm: 1280.00, lr: 9.44e-08]

训练速度过慢, 请问是否正常?

训练命令:

export TOKENIZERS_PARALLELISM=false

NNODES=${NNODES:=1}
NPROC_PER_NODE=$(nvidia-smi --query-gpu=name --format=csv,noheader | wc -l)
NODE_RANK=${NODE_RANK:=0}
MASTER_ADDR=${MASTER_ADDR:=[0.0.0.0](http://0.0.0.0/)}

MASTER_PORT=${MASTER_PORT:=12345}

WANDB_MODE=offline torchrun --nnodes=$NNODES --nproc-per-node $NPROC_PER_NODE --node-rank $NODE_RANK \
  --master-addr=$MASTER_ADDR --master-port=$MASTER_PORT tasks/train_torch.py \
  configs/pretrain/qwen2_5_coder_500M.yaml \
  --data.train_path=data/test_data \
  --train.ckpt_manager=dcp \
  --train.micro_batch_size=16 \
  --train.global_batch_size=512 \
  --train.output_dir=logs/Qwen2.5-Coder-0.5B_mdm \
  --train.save_steps=10000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions