Qwen
Qwen copied to clipboard
[BUG] <title>TypeError: list indices must be integers or slices, not str
是否已有关于该错误的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
期望行为 | Expected Behavior
执行微调正常运行
复现方法 | Steps To Reproduce
按照教程配置环境平且测试Qwen/Qwen-14B-Chat-Int4问答 bash finetune/finetune_qlora_single_gpu.sh
运行环境 | Environment
- OS:Ubuntu20.04
- Python:Python 3.10
- Transformers:
- PyTorch:Pytorch 2.0.1
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`): CUDA11.8, cuDNN 8
备注 | Anything else?
用于微调的.json格式如下
看着是训练数据格式不对,多了一级列表
[
{
"id": "identity_0",
"conversations": [
{
"from": "user",
"value": "你好"
},
{
"from": "assistant",
"value": "我是一个语言模型,我叫通义千问。"
}
]
},
{
"id": "identity_1",
"conversations": [
{
"from": "user",
"value": "xxx"
},
{
"from": "assistant",
"value": "xxx"
}
]
}
]
看着是训练数据格式不对,多了一级列表
[ { "id": "identity_0", "conversations": [ { "from": "user", "value": "你好" }, { "from": "assistant", "value": "我是一个语言模型,我叫通义千问。" } ] }, { "id": "identity_1", "conversations": [ { "from": "user", "value": "xxx" }, { "from": "assistant", "value": "xxx" } ] } ]
我也是同样的qlora报错,单卡是没问题,多卡现在在报这个错