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

历史消息貌似没有正确加到训练数据中 #4683

Closed
1 task done
ylsdamxssjxxdd opened this issue Jul 4, 2024 · 3 comments
Closed
1 task done

历史消息貌似没有正确加到训练数据中 #4683

ylsdamxssjxxdd opened this issue Jul 4, 2024 · 3 comments
Labels
solved This problem has been already solved

Comments

@ylsdamxssjxxdd
Copy link

ylsdamxssjxxdd commented Jul 4, 2024

Reminder

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

System Info

root@8d9356cd571a:/nerv/nerv-workspace# llamafactory-cli env
[2024-07-04 16:14:35,683] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[WARNING] async_io requires the dev libaio .so object and headers but these were not found.
[WARNING] async_io: please install the libaio-dev package with apt
[WARNING] If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found.
[WARNING] Please specify the CUTLASS repo directory as environment variable $CUTLASS_PATH
[WARNING] sparse_attn requires a torch version >= 1.5 and < 2.0 but detected 2.3
[WARNING] using untested triton version (2.3.1), only 1.0.0 is known to be compatible

  • llamafactory version: 0.8.3.dev0
  • Platform: Linux-5.10.0-8-generic-x86_64-with-glibc2.35
  • Python version: 3.10.12
  • PyTorch version: 2.3.1+cu121 (GPU)
  • Transformers version: 4.42.3
  • Datasets version: 2.20.0
  • Accelerate version: 0.32.1
  • PEFT version: 0.11.1
  • TRL version: 0.9.4
  • GPU type: NVIDIA GeForce RTX 3090 Ti
  • DeepSpeed version: 0.14.4
  • vLLM version: 0.5.0.post1

Reproduction

  • 我修改了LLaMA-Factory-main/src/llamafactory/data/loader.py中的print_function(next(iter(dataset)))为
for item in dataset:
    print_function(item)

这样应该可以打印出所有训练数据

  • 我的数据集就是,一个字没改~
[
  {
    "instruction": "人类指令(必填)",
    "input": "人类输入(选填)",
    "output": "模型回答(必填)",
    "system": "系统提示词(选填)",
    "history": [
      ["第一轮指令(选填)", "第一轮回答(选填)"],
      ["第二轮指令(选填)", "第二轮回答(选填)"]
    ]
  }
]
  • 训练qwen2时weiui输出

input_ids:
[151644, 8948, 198, 72448, 45139, 99689, 9909, 30767, 68756, 7552, 151645, 198, 151644, 872, 198, 99363, 99620, 109504, 9909, 30767, 68756, 7552, 151645, 198, 151644, 77091, 198, 99363, 99620, 102104, 9909, 30767, 68756, 7552, 151645]
inputs:
<|im_start|>system
系统提示词(选填)<|im_end|>
<|im_start|>user
第一轮指令(选填)<|im_end|>
<|im_start|>assistant
第一轮回答(选填)<|im_end|>
label_ids:
[-100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 99363, 99620, 102104, 9909, 30767, 68756, 7552, 151645]
labels:
第一轮回答(选填)<|im_end|>

Expected behavior

按道理weiui应该输出
第一轮回答
第二轮回答
模型回答
但是现在只有第一轮回答,说明历史消息没有正确加到训练数据中~

Others

No response

@github-actions github-actions bot added the pending This problem is yet to be addressed label Jul 4, 2024
@hiyouga hiyouga closed this as completed in e43809b Jul 4, 2024
@hiyouga
Copy link
Owner

hiyouga commented Jul 4, 2024

抱歉 已修复

@hiyouga hiyouga added solved This problem has been already solved and removed pending This problem is yet to be addressed labels Jul 4, 2024
xtchen96 pushed a commit to xtchen96/LLaMA-Factory that referenced this issue Jul 17, 2024
@maksimstw
Copy link

没太理解,这意味着在这个bug修复前,模型训练的时候都只是训练在第一轮上?之后几轮的数据完全没用上?请问这个bug存在多久了,是指到两周前才修好吗?

@hiyouga
Copy link
Owner

hiyouga commented Jul 22, 2024

@maksimstw 在被修复为止存在了7天时间

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

3 participants