fix webui
This commit is contained in:
parent
9dc6a296e3
commit
d69b1388e6
|
@ -26,7 +26,7 @@ def create_top() -> Dict[str, "Component"]:
|
|||
|
||||
with gr.Accordion(label="Advanced config", open=False) as advanced_tab:
|
||||
with gr.Row():
|
||||
quantization_bit = gr.Dropdown([8, 4], scale=1)
|
||||
quantization_bit = gr.Dropdown(["", "8", "4"], scale=1)
|
||||
template = gr.Dropdown(value="default", choices=list(templates.keys()), scale=1)
|
||||
source_prefix = gr.Textbox(scale=2)
|
||||
|
||||
|
|
|
@ -126,8 +126,6 @@ class Runner:
|
|||
logging_steps=logging_steps,
|
||||
save_steps=save_steps,
|
||||
warmup_steps=warmup_steps,
|
||||
fp16=(compute_type == "fp16"),
|
||||
bf16=(compute_type == "bf16"),
|
||||
padding_side=padding_side,
|
||||
lora_rank=lora_rank,
|
||||
lora_dropout=lora_dropout,
|
||||
|
@ -135,7 +133,7 @@ class Runner:
|
|||
resume_lora_training=resume_lora_training,
|
||||
output_dir=output_dir
|
||||
)
|
||||
|
||||
args[compute_type] = True
|
||||
if val_size > 1e-6:
|
||||
args["val_size"] = val_size
|
||||
args["evaluation_strategy"] = "steps"
|
||||
|
|
|
@ -65,7 +65,7 @@ def can_quantize(finetuning_type: str) -> Dict[str, Any]:
|
|||
def gen_cmd(args: Dict[str, Any]) -> str:
|
||||
cmd_lines = ["CUDA_VISIBLE_DEVICES=0 python "]
|
||||
for k, v in args.items():
|
||||
if v is not None and v is not False and v != "":
|
||||
if v is not None and v != "":
|
||||
cmd_lines.append(" --{} {} ".format(k, str(v)))
|
||||
cmd_text = "\\\n".join(cmd_lines)
|
||||
cmd_text = "```bash\n{}\n```".format(cmd_text)
|
||||
|
|
Loading…
Reference in New Issue