Add settings UI for llama.cpp and fixed reloading of llama.cpp models (#2087)

This commit is contained in:
Jakub Strnad 2023-05-16 00:51:23 +02:00 committed by GitHub
parent 10869de0f4
commit 0227e738ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 2 deletions

View file

@ -27,7 +27,7 @@ theme = gr.themes.Default(
def list_model_elements():
elements = ['cpu_memory', 'auto_devices', 'disk', 'cpu', 'bf16', 'load_in_8bit', 'wbits', 'groupsize', 'model_type', 'pre_layer']
elements = ['cpu_memory', 'auto_devices', 'disk', 'cpu', 'bf16', 'load_in_8bit', 'wbits', 'groupsize', 'model_type', 'pre_layer', 'threads', 'n_batch', 'no-mmap', 'mlock', 'n_gpu_layers']
for i in range(torch.cuda.device_count()):
elements.append(f'gpu_memory_{i}')
return elements