mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-08-26 06:31:13 +02:00
show warning if genamt >= ctxsize, show t/s values
This commit is contained in:
+2
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user