jingyaogong / minimind-v

「大模型」3小时从0训练27M参数的视觉多模态VLM,个人显卡即可推理训练!
https://jingyaogong.github.io/minimind-v
Apache License 2.0
386 stars 42 forks source link

微调的时候报错了是什么问题呢 #27

Open LiuCharming opened 4 days ago

LiuCharming commented 4 days ago

Traceback (most recent call last): File "/root/autodl-tmp/minimind-v-master/2-sft_vlm.py", line 229, in train_epoch(epoch, wandb) File "/root/autodl-tmp/minimind-v-master/2-sft_vlm.py", line 64, in train_epoch logits = model(X, Y, image_encoders=image_encoders).logits ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/autodl-tmp/minimind-v-master/model/myModel.py", line 424, in forward h = self.count_vision_proj(tokens=tokens, h=h, image_encoders=image_encoders, seqlen=seqlen) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/autodl-tmp/minimind-v-master/model/myModel.py", line 394, in count_vision_proj if len(image_indices[i]) == 0:

LiuCharming commented 4 days ago

File "/root/autodl-tmp/minimind-v-master/model/model.py", line 391, in count_vision_proj before = h[i, :image_indices[i][0], :]


IndexError: list index out of range
LiuCharming commented 4 days ago

这跟数据集有关嘛?

jingyaogong commented 4 days ago

数据里有占位符吗?数据问题

LiuCharming commented 4 days ago

不清楚我是直接下载下来的后面我看看数据集

LiuCharming commented 1 day ago

1732638288940

是这样的吗空格会影响吗 其他的无效占位符倒是没看到过