FlagEmbedding icon indicating copy to clipboard operation
FlagEmbedding copied to clipboard

微调时报错runtime error

Open ariessweety07 opened this issue 10 months ago • 2 comments

RuntimeError: Expected to mark a variable ready only once. This error is caused by one of the following reasons: 1) Use of a module parameter outside the forward function. Please make sure model parameters are not shared across multiple concurrent forward-backward passes. or try to use _set_static_graph() as a workaround if this module graph does not change during training loop.2) Reused parameters in multiple reentrant backward passes. For example, if you use multiple checkpoint functions to wrap the same part of your model, it would result in the same set of parameters been used by different reentrant backward passes multiple times, and hence marking a variable ready multiple times. DDP does not support such use cases in default. You can try to use _set_static_graph() as a workaround if your module graph does not change over iterations. cuda:12.4 flashattention:flash_attn-2.7.3+cu12torch2.4cxx11abiFALSE-cp39-cp39-linux_x86_64.whl torch2.1 2.4都不行

ariessweety07 avatar Mar 12 '25 03:03 ariessweety07

请问最终解决了吗

WjMessi1 avatar Mar 14 '25 03:03 WjMessi1

mark

yy9996 avatar Mar 21 '25 06:03 yy9996