Skip to content

fix doc #1315

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix doc #1315

wants to merge 1 commit into from

Conversation

luo3300612
Copy link

LLama-factory的训练文档有处不一致,原始文档中,构建sharegpt格式数据时,文档给出的示例是:
dataset.json

[
  {
    "conversations": [
      {
        "from": "human",
        "value": "user instruction"
      },
      {
        "from": "gpt",
        "value": "model response"
      }
    ],
    "system": "system prompt (optional)",
    "tools": "tool description (optional)"
  }
]

dataset_info.json

"dataset_name": {
    "file_name": "dataset_name.json",
    "formatting": "sharegpt",
    "columns": {
      "messages": "conversations",
      "system": "system",
      "tools": "tools"
    },
    "tags": {
      "role_tag": "from",
      "content_tag": "value",
      "user_tag": "user",
      "assistant_tag": "assistant"
    }
  }

其中,dataset_info.json的user_tag和assistant_tag与dataset.json的tag不一致,会导致LLama-factory训练时报错raise ValueError("Invalid role tag in {}.".format(messages))

这个pr修改了相应的内容,使dataset_info.jsondataset.json中的tag一致

@jklj077 jklj077 requested a review from yangjianxin1 April 30, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant