mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
show warning if genamt >= ctxsize, show t/s values
This commit is contained in:
parent
71cc19e76d
commit
340fbbbb04
2 changed files with 5 additions and 3 deletions
|
@ -334,9 +334,9 @@ def generate(prompt, memory="", max_length=32, max_context_length=512, temperatu
|
|||
outputs = ctypes.create_unicode_buffer(ctypes.sizeof(generation_outputs))
|
||||
inputs.prompt = prompt.encode("UTF-8")
|
||||
inputs.memory = memory.encode("UTF-8")
|
||||
if max_length >= max_context_length:
|
||||
if max_length >= (max_context_length-1):
|
||||
max_length = max_context_length-1
|
||||
print("\nWARNING: You are trying to generate with max_length near or exceeding max_context_length. Most of the context will be gone and your outputs will not be very coherent.")
|
||||
print("\nWarning: You are trying to generate with max_length near or exceeding max_context_length. Most of the context will be removed, and your outputs will not be very coherent.")
|
||||
global showmaxctxwarning
|
||||
if max_context_length > maxctx:
|
||||
if showmaxctxwarning:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue