[misc] upgrade cli (#7714)

This commit is contained in:
hoshi-hiyouga
2025-04-14 15:41:22 +08:00
committed by GitHub
parent c60971f4b8
commit 8f46aced51
6 changed files with 26 additions and 10 deletions

View File

@@ -96,6 +96,7 @@ def patch_config(
model_args.compute_dtype = infer_optim_dtype(model_dtype=getattr(config, "torch_dtype", None))
if is_torch_npu_available():
# avoid JIT compile on NPU devices, see https://zhuanlan.zhihu.com/p/660875458
torch.npu.set_compile_mode(jit_compile=is_env_enabled("JIT_COMPILE"))
configure_attn_implementation(config, model_args, is_trainable)