Merge pull request #6422 from oobabooga/dev

Merge dev branch
This commit is contained in:
oobabooga 2024-10-01 15:21:53 -03:00 committed by GitHub
commit d1af7a41ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 3 deletions

View File

@ -604,11 +604,11 @@ headerBar.addEventListener("click", (e) => {
// Add a confirmation dialog when leaving the page // Add a confirmation dialog when leaving the page
// Useful to avoid data loss // Useful to avoid data loss
//------------------------------------------------ //------------------------------------------------
window.addEventListener('beforeunload', function (event) { window.addEventListener("beforeunload", function (event) {
// Cancel the event // Cancel the event
event.preventDefault(); event.preventDefault();
// Chrome requires returnValue to be set // Chrome requires returnValue to be set
event.returnValue = ''; event.returnValue = "";
}); });
moveToChatTab(); moveToChatTab();

View File

@ -90,6 +90,7 @@ loaders_and_params = OrderedDict({
'cache_8bit', 'cache_8bit',
'cache_4bit', 'cache_4bit',
'autosplit', 'autosplit',
'enable_tp',
'alpha_value', 'alpha_value',
'compress_pos_emb', 'compress_pos_emb',
'trust_remote_code', 'trust_remote_code',
@ -105,6 +106,7 @@ loaders_and_params = OrderedDict({
'cache_8bit', 'cache_8bit',
'cache_4bit', 'cache_4bit',
'autosplit', 'autosplit',
'enable_tp',
'alpha_value', 'alpha_value',
'compress_pos_emb', 'compress_pos_emb',
'exllamav2_info', 'exllamav2_info',

View File

@ -90,6 +90,7 @@ def list_model_elements():
'cache_8bit', 'cache_8bit',
'cache_4bit', 'cache_4bit',
'autosplit', 'autosplit',
'enable_tp',
'threads', 'threads',
'threads_batch', 'threads_batch',
'n_batch', 'n_batch',

View File

@ -74,7 +74,7 @@ def handle_save_preset_confirm_click(filename, contents):
try: try:
utils.save_file(f"presets/{filename}.yaml", contents) utils.save_file(f"presets/{filename}.yaml", contents)
available_presets = utils.get_available_presets() available_presets = utils.get_available_presets()
output = gr.update(choices=available_presets, value=filename), output = gr.update(choices=available_presets, value=filename)
except Exception: except Exception:
output = gr.update() output = gr.update()
traceback.print_exc() traceback.print_exc()

View File

@ -136,6 +136,7 @@ def create_ui():
shared.gradio['disk'] = gr.Checkbox(label="disk", value=shared.args.disk) shared.gradio['disk'] = gr.Checkbox(label="disk", value=shared.args.disk)
shared.gradio['bf16'] = gr.Checkbox(label="bf16", value=shared.args.bf16) shared.gradio['bf16'] = gr.Checkbox(label="bf16", value=shared.args.bf16)
shared.gradio['autosplit'] = gr.Checkbox(label="autosplit", value=shared.args.autosplit, info='Automatically split the model tensors across the available GPUs.') shared.gradio['autosplit'] = gr.Checkbox(label="autosplit", value=shared.args.autosplit, info='Automatically split the model tensors across the available GPUs.')
shared.gradio['enable_tp'] = gr.Checkbox(label="enable_tp", value=shared.args.enable_tp, info='Enable Tensor Parallelism (TP).')
shared.gradio['no_flash_attn'] = gr.Checkbox(label="no_flash_attn", value=shared.args.no_flash_attn) 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_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['no_sdpa'] = gr.Checkbox(label="no_sdpa", value=shared.args.no_sdpa)