Fix generation_config validation raises Exception for do_merge_lora (#1184)
This commit is contained in:
committed by
GitHub
parent
71141deb18
commit
02f2c720fc
@@ -82,6 +82,7 @@ def do_merge_lora(
|
|||||||
model.to(dtype=cfg.torch_dtype)
|
model.to(dtype=cfg.torch_dtype)
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
pass
|
pass
|
||||||
|
model.generation_config.do_sample = True
|
||||||
|
|
||||||
if cfg.local_rank == 0:
|
if cfg.local_rank == 0:
|
||||||
LOG.info(f"saving merged model to: {str(Path(cfg.output_dir) / 'merged')}")
|
LOG.info(f"saving merged model to: {str(Path(cfg.output_dir) / 'merged')}")
|
||||||
|
|||||||
Reference in New Issue
Block a user