mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-06 07:03:37 +00:00
UI: Correctly propagate truncation_length when ctx_size is auto
This commit is contained in:
parent
3e6bd1a310
commit
bbd43d9463
3 changed files with 14 additions and 2 deletions
|
|
@ -388,7 +388,11 @@ def download_model_wrapper(repo_id, specific_file, progress=gr.Progress(), retur
|
|||
def update_truncation_length(current_length, state):
|
||||
if 'loader' in state:
|
||||
if state['loader'].lower().startswith('exllama') or state['loader'] == 'llama.cpp':
|
||||
return state['ctx_size']
|
||||
if state['ctx_size'] > 0:
|
||||
return state['ctx_size']
|
||||
|
||||
# ctx_size == 0 means auto: use the actual value from the server
|
||||
return shared.settings['truncation_length']
|
||||
|
||||
return current_length
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue