reenable sdpa and fast tok by default

Former-commit-id: 9e00902dbedc71d55743d1bf237843506a557891
This commit is contained in:
hiyouga
2024-04-24 02:18:44 +08:00
parent 35c4a2c212
commit d2bb1b3a6b
8 changed files with 64 additions and 27 deletions

View File

@@ -67,7 +67,7 @@ class Runner:
if not model_path:
return ALERTS["err_no_path"][lang]
if len(dataset) == 0:
if not dataset:
return ALERTS["err_no_dataset"][lang]
if not from_preview and self.demo_mode:
@@ -122,7 +122,7 @@ class Runner:
quantization_bit=int(get("top.quantization_bit")) if get("top.quantization_bit") in ["8", "4"] else None,
template=get("top.template"),
rope_scaling=get("top.rope_scaling") if get("top.rope_scaling") in ["linear", "dynamic"] else None,
flash_attn=(get("top.booster") == "flashattn"),
flash_attn="fa2" if get("top.booster") == "flashattn2" else "auto",
use_unsloth=(get("top.booster") == "unsloth"),
dataset_dir=get("train.dataset_dir"),
dataset=",".join(get("train.dataset")),