From 221ec1583a3673841b6f66fe7ec17d7d575a1c5d Mon Sep 17 00:00:00 2001 From: Harry Jordan Date: Fri, 26 Jul 2024 21:28:28 +0900 Subject: [PATCH] make compress_pos_emb float Originally, compress_pos_emb had a slider gradation of 0.01. However, webui now uses gr.Number instead of gr.Slider to represent the value (to avoid having to repeatedly update max value limit) and the precision was set to 0. Setting precision to 0.01 to return to previous behaviour. --- modules/ui_model_menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui_model_menu.py b/modules/ui_model_menu.py index 2938c12017..7b9cd1c729 100644 --- a/modules/ui_model_menu.py +++ b/modules/ui_model_menu.py @@ -105,7 +105,7 @@ def create_ui(): with gr.Blocks(): shared.gradio['alpha_value'] = gr.Number(label='alpha_value', value=shared.args.alpha_value, precision=2, info='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='rope_freq_base', value=shared.args.rope_freq_base, precision=0, info='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='compress_pos_emb', value=shared.args.compress_pos_emb, precision=0, info='Positional embeddings compression factor. Should be set to (context length) / (model\'s original context length). Equal to 1/rope_freq_scale.') + shared.gradio['compress_pos_emb'] = gr.Number(label='compress_pos_emb', value=shared.args.compress_pos_emb, precision=2, info='Positional embeddings compression factor. Should be set to (context length) / (model\'s original context length). Equal to 1/rope_freq_scale.') shared.gradio['autogptq_info'] = gr.Markdown('ExLlamav2_HF is recommended over AutoGPTQ for models derived from Llama.')