Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用openai的数据格式微调多模态模型,数据加载的时候会报错 #6298

Closed
1 task done
anhuaxiang opened this issue Dec 10, 2024 · 1 comment
Closed
1 task done
Labels
solved This problem has been already solved

Comments

@anhuaxiang
Copy link

Reminder

  • I have read the README and searched the existing issues.

System Info

  • llamafactory version: 0.9.2.dev0
  • Platform: Linux-5.15.0-89-generic-x86_64-with-glibc2.35
  • Python version: 3.11.9
  • PyTorch version: 2.4.0 (GPU)
  • Transformers version: 4.45.2
  • Datasets version: 2.21.0
  • Accelerate version: 0.34.2
  • PEFT version: 0.12.0
  • TRL version: 0.9.6
  • GPU type: NVIDIA GeForce RTX 3090
  • DeepSpeed version: 0.15.3

Reproduction

llamafactory-cli train vision.yaml

Expected behavior

微调 Llama-3.2-11B-Vision-Instruct 模型时
使用openai格式数据,如
{"messages": [{"role": "system", "content": "You are an assistant that identifies uncommon cheeses."}, {"role": "user", "content": "What is this cheese?"}, {"role": "user", "content": [{"type": "image_url", "image_url": {"url": "https://upload.wikimedia.org/wikipedia/commons/3/36/Danbo_Cheese.jpg"}}]}, {"role": "assistant", "content": "Danbo"}]}

加载数据会报错
pyarrow.lib.ArrowInvalid: JSON parse error: Column(/messages/[]/content) changed from string to array in row 0 或者
ValueError: Failed to convert pandas DataFrame to Arrow Table from file /workspace/text.jsonl.
我的panda版本已经>2.0了
pandas==2.3.0

Others

如何支持openai这种格式呢?

@github-actions github-actions bot added the pending This problem is yet to be addressed label Dec 10, 2024
@hiyouga
Copy link
Owner

hiyouga commented Dec 10, 2024

@hiyouga hiyouga closed this as completed Dec 10, 2024
@hiyouga hiyouga added solved This problem has been already solved and removed pending This problem is yet to be addressed labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

No branches or pull requests

2 participants