mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-06 07:03:37 +00:00
llama.cpp: allow ctx_size=0 for auto context via --fit
This commit is contained in:
parent
fbfcd59fe0
commit
69fa4dd0b1
6 changed files with 13 additions and 9 deletions
|
|
@ -128,7 +128,7 @@ def create_event_handlers():
|
|||
|
||||
|
||||
def get_truncation_length():
|
||||
if 'ctx_size' in shared.provided_arguments or shared.args.ctx_size != shared.args_defaults.ctx_size:
|
||||
if shared.args.ctx_size > 0 and ('ctx_size' in shared.provided_arguments or shared.args.ctx_size != shared.args_defaults.ctx_size):
|
||||
return shared.args.ctx_size
|
||||
else:
|
||||
return shared.settings['truncation_length']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue