mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-12-06 07:12:10 +01:00
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
This commit is contained in:
commit
16f77b74c4
|
|
@ -611,7 +611,7 @@ def do_train(lora_name: str, always_override: bool, q_proj_en: bool, v_proj_en:
|
||||||
bf16=shared.args.bf16,
|
bf16=shared.args.bf16,
|
||||||
optim=optimizer,
|
optim=optimizer,
|
||||||
logging_steps=2 if stop_at_loss > 0 else 5,
|
logging_steps=2 if stop_at_loss > 0 else 5,
|
||||||
evaluation_strategy="steps" if eval_data is not None else "no",
|
eval_strategy="steps" if eval_data is not None else "no",
|
||||||
eval_steps=math.ceil(eval_steps / gradient_accumulation_steps) if eval_data is not None else None,
|
eval_steps=math.ceil(eval_steps / gradient_accumulation_steps) if eval_data is not None else None,
|
||||||
save_strategy="steps" if eval_data is not None else "no",
|
save_strategy="steps" if eval_data is not None else "no",
|
||||||
output_dir=lora_file_path,
|
output_dir=lora_file_path,
|
||||||
|
|
@ -620,7 +620,7 @@ def do_train(lora_name: str, always_override: bool, q_proj_en: bool, v_proj_en:
|
||||||
# TODO: Enable multi-device support
|
# TODO: Enable multi-device support
|
||||||
ddp_find_unused_parameters=None,
|
ddp_find_unused_parameters=None,
|
||||||
no_cuda=shared.args.cpu,
|
no_cuda=shared.args.cpu,
|
||||||
use_ipex=True if is_torch_xpu_available() and not shared.args.cpu else False
|
# use_ipex=True if is_torch_xpu_available() and not shared.args.cpu else False
|
||||||
),
|
),
|
||||||
data_collator=transformers.DataCollatorForLanguageModeling(shared.tokenizer, mlm=False),
|
data_collator=transformers.DataCollatorForLanguageModeling(shared.tokenizer, mlm=False),
|
||||||
callbacks=list([Callbacks()])
|
callbacks=list([Callbacks()])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue