mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-05 06:35:15 +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
|
|
@ -54,6 +54,8 @@ def load_model(model_name, loader=None):
|
|||
if loader.lower().startswith('exllama') or loader.lower().startswith('tensorrt') or loader == 'llama.cpp':
|
||||
if shared.args.ctx_size > 0:
|
||||
shared.settings['truncation_length'] = shared.args.ctx_size
|
||||
elif loader == 'llama.cpp' and hasattr(model, 'n_ctx') and model.n_ctx:
|
||||
shared.settings['truncation_length'] = model.n_ctx
|
||||
|
||||
shared.is_multimodal = False
|
||||
if loader.lower() in ('exllamav3', 'llama.cpp') and hasattr(model, 'is_multimodal'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue