ms-swift
ms-swift copied to clipboard
新版本的kto无效
-
报错'KTOTrainer' object has no attribute 'calculate_KL'
-
desirable_weight设置无效 /usr/local/lib/python3.10/dist-packages/swift/trainers/rlhf_trainer/kto_trainer.py:81: UserWarning:
You have different amounts of desirable/positive and undesirable/negative examples but the weights on the desirable and undesirable losses don't seem to be in an ideal range. Based on your data, we recommend EITHER desirable_weight in [0.42, '0.56] or undesirable_weight in [1.8, 2.39] (but NOT BOTH). See the documentation on how to optimally set these weights.
warnings.warn(
Please use trl==0.10.* first, we will soon be compatible with trl==0.11.*
还是有第一个问题,脚本里设置了undesirable_weight,但是设置无效。 /code/llm_env/lib/python3.10/site-packages/swift/trainers/rlhf_trainer/kto_trainer.py:81: UserWarning:
You have different amounts of desirable/positive and undesirable/negative examples but the
weights on the desirable and undesirable losses don't seem to be in an ideal range. Based
on your data, we recommend EITHER desirable_weight in [0.42, '0.56]
or undesirable_weight in [1.8, 2.39] (but NOT BOTH).
See the documentation on how to optimally set these weights.