datawhalechina / self-llm

《开源大模型食用指南》基于Linux环境快速部署开源大模型,更适合中国宝宝的部署教程
Apache License 2.0
6.14k stars 753 forks source link

想问下在这个项目下的lora微调和Chatglm3官方微调的demo的数据格式怎么不一样呀 #96

Closed McRays closed 2 months ago

McRays commented 2 months ago

该项目下的lora微调数据格式:

{
    "instruction": "",
    "input":"你是谁?",
    "output":"家父是大理寺少卿甄远道。"
}

官方的lora微调数据格式:

[
  {
    "conversations": [
      {
        "role": "system",
        "content": "<system prompt text>"
      },
      {
        "role": "user",
        "content": "<user prompt text>"
      },
      {
        "role": "assistant",
        "content": "<assistant response text>"
      },
      // ... Muti Turn
      {
        "role": "user",
        "content": "<user prompt text>"
      },
      {
        "role": "assistant",
        "content": "<assistant response text>"
      }
    ]
  }
  // ...
]
KMnO4-zx commented 2 months ago

格式什么的无所谓,怎么样都可以,只要保证输入模型的数据符合模型本来的prompt template即可,这一点在教程里有提到