From 3e9963be48cf8f451f48b1e186a57a518e9b9a4f Mon Sep 17 00:00:00 2001 From: ystartgo Date: Sun, 15 Feb 2026 21:02:04 +0800 Subject: [PATCH] fix --- modules/i18n.py | 10 ++++++++++ modules/ui_model_menu.py | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/modules/i18n.py b/modules/i18n.py index d1578e7b..781c749d 100644 --- a/modules/i18n.py +++ b/modules/i18n.py @@ -106,6 +106,16 @@ _ZH_TW = { "Start reply with": "以此開頭回覆", "Reasoning effort": "推理強度", "Enable thinking": "啟用思考", + "compute_dtype": "compute_dtype 計算精度", + "quant_type": "quant_type 量化類型", + "Number of experts per token": "每個詞元的專家數", + "cpu": "cpu CPU 模式", + "disk": "disk 硬碟卸載", + "bf16": "bf16 bfloat16", + "no_flash_attn": "no_flash_attn 停用 Flash-Attn", + "no_xformers": "no_xformers 停用 xFormers", + "no_sdpa": "no_sdpa 停用 SDPA", + "cfg-cache": "cfg-cache CFG 快取", "Activate web search": "啟用網頁搜尋", "Number of pages to download": "下載頁數", "Mode": "模式", diff --git a/modules/ui_model_menu.py b/modules/ui_model_menu.py index 82d63508..8742a00e 100644 --- a/modules/ui_model_menu.py +++ b/modules/ui_model_menu.py @@ -92,23 +92,23 @@ def create_ui(): shared.gradio['alpha_value'] = gr.Number(label='alpha_value', value=shared.args.alpha_value, precision=2, info=t('Positional embeddings alpha factor for NTK RoPE scaling. Recommended values (NTKv1): 1.75 for 1.5x context, 2.5 for 2x context. Use either this or compress_pos_emb, not both.')) shared.gradio['rope_freq_base'] = gr.Number(label=t('rope_freq_base'), value=shared.args.rope_freq_base, precision=0, info=t('Positional embeddings frequency base for NTK RoPE scaling. Related to alpha_value by rope_freq_base = 10000 * alpha_value ^ (64 / 63). 0 = from model.')) shared.gradio['compress_pos_emb'] = gr.Number(label=t('compress_pos_emb'), value=shared.args.compress_pos_emb, precision=2, info=t("Positional embeddings compression factor. Should be set to (context length) / (model's original context length). Equal to 1/rope_freq_scale.")) - shared.gradio['compute_dtype'] = gr.Dropdown(label="compute_dtype", choices=["bfloat16", "float16", "float32"], value=shared.args.compute_dtype, info=t('Used by load-in-4bit.')) - shared.gradio['quant_type'] = gr.Dropdown(label="quant_type", choices=["nf4", "fp4"], value=shared.args.quant_type, info=t('Used by load-in-4bit.')) - shared.gradio['num_experts_per_token'] = gr.Number(label="Number of experts per token", value=shared.args.num_experts_per_token, info=t('Only applies to MoE models like Mixtral.')) + shared.gradio['compute_dtype'] = gr.Dropdown(label=t("compute_dtype"), choices=["bfloat16", "float16", "float32"], value=shared.args.compute_dtype, info=t('Used by load-in-4bit.')) + shared.gradio['quant_type'] = gr.Dropdown(label=t("quant_type"), choices=["nf4", "fp4"], value=shared.args.quant_type, info=t('Used by load-in-4bit.')) + shared.gradio['num_experts_per_token'] = gr.Number(label=t("Number of experts per token"), value=shared.args.num_experts_per_token, info=t('Only applies to MoE models like Mixtral.')) with gr.Column(): - shared.gradio['cpu'] = gr.Checkbox(label="cpu", value=shared.args.cpu, info=t('Use PyTorch in CPU mode.')) - shared.gradio['disk'] = gr.Checkbox(label="disk", value=shared.args.disk) + shared.gradio['cpu'] = gr.Checkbox(label=t("cpu"), value=shared.args.cpu, info=t('Use PyTorch in CPU mode.')) + shared.gradio['disk'] = gr.Checkbox(label=t("disk"), value=shared.args.disk) shared.gradio['row_split'] = gr.Checkbox(label=t("row_split"), value=shared.args.row_split, info=t('Split the model by rows across GPUs. This may improve multi-gpu performance.')) shared.gradio['no_kv_offload'] = gr.Checkbox(label=t("no_kv_offload"), value=shared.args.no_kv_offload, info=t('Do not offload the K, Q, V to the GPU. This saves VRAM but reduces the performance.')) shared.gradio['no_mmap'] = gr.Checkbox(label=t("no-mmap"), value=shared.args.no_mmap) shared.gradio['mlock'] = gr.Checkbox(label=t("mlock"), value=shared.args.mlock) shared.gradio['numa'] = gr.Checkbox(label=t("numa"), value=shared.args.numa, info=t('NUMA support can help on some systems with non-uniform memory access.')) - shared.gradio['bf16'] = gr.Checkbox(label="bf16", value=shared.args.bf16) - shared.gradio['no_flash_attn'] = gr.Checkbox(label="no_flash_attn", value=shared.args.no_flash_attn) - shared.gradio['no_xformers'] = gr.Checkbox(label="no_xformers", value=shared.args.no_xformers) - shared.gradio['no_sdpa'] = gr.Checkbox(label="no_sdpa", value=shared.args.no_sdpa) - shared.gradio['cfg_cache'] = gr.Checkbox(label="cfg-cache", value=shared.args.cfg_cache, info=t('Necessary to use CFG with this loader.')) + shared.gradio['bf16'] = gr.Checkbox(label=t("bf16"), value=shared.args.bf16) + shared.gradio['no_flash_attn'] = gr.Checkbox(label=t("no_flash_attn"), value=shared.args.no_flash_attn) + shared.gradio['no_xformers'] = gr.Checkbox(label=t("no_xformers"), value=shared.args.no_xformers) + shared.gradio['no_sdpa'] = gr.Checkbox(label=t("no_sdpa"), value=shared.args.no_sdpa) + shared.gradio['cfg_cache'] = gr.Checkbox(label=t("cfg-cache"), value=shared.args.cfg_cache, info=t('Necessary to use CFG with this loader.')) shared.gradio['no_use_fast'] = gr.Checkbox(label="no_use_fast", value=shared.args.no_use_fast, info=t('Set use_fast=False while loading the tokenizer.')) if not shared.args.portable: with gr.Row():