MiniCPM-V icon indicating copy to clipboard operation
MiniCPM-V copied to clipboard

[BUG] <title> When using MiniCPM as the language Model, getting "data fetch error", bug in dataset.py file.

Open beingdutta opened this issue 1 year ago • 4 comments

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

  • [X] 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?

  • [X] 我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior

The input_ids being generated is not a tensor and the dimensions are complete mismatch, hence tensors cant be formed even if we try to make the list a tensor.

input_ids being generated as a python list looks like below: [[95396, 4194, 95388], [101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 111, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 112, 5, 5856, 3813, 3427, 2608, 1877, 45077, 1699, 1382, 2661, 1789, 1377, 1510, 1895, 2412, 2459, 1358, 2676, 74], [95396, 10850, 95388], [7558, 32648, 2]]

I believe there is a bug in the conversation_to_ids_minicpm() in the dataset.py file.

期望行为 | Expected Behavior

The input_ids should have been a tensor of consistent shape.

复现方法 | Steps To Reproduce

No response

运行环境 | Environment

- OS:
- Python:
- Transformers:
- PyTorch:
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):

备注 | Anything else?

No response

beingdutta avatar Dec 24 '24 05:12 beingdutta

Thank you very much for your feedback!

LDLINGLINGLING avatar Jan 02 '25 09:01 LDLINGLINGLING

how you solve this problem?

whoam-challenge avatar Jan 11 '25 21:01 whoam-challenge

Thank you very much for your feedback!

Do you know how to solve this problem?

whoam-challenge avatar Jan 11 '25 22:01 whoam-challenge

请问错误解决了吗

lsa798 avatar May 06 '25 09:05 lsa798