mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 09:34:37 +00:00
update license, added backwards compatibility with both ggml model formats, fixed context length issues.
This commit is contained in:
parent
a2c10e0d2f
commit
8d39365af6
11 changed files with 807 additions and 15 deletions
|
@ -74,8 +74,8 @@ import json, http.server, threading, socket, sys, time
|
|||
# global vars
|
||||
global friendlymodelname
|
||||
friendlymodelname = ""
|
||||
maxctx = 1024
|
||||
maxlen = 256
|
||||
maxctx = 512
|
||||
maxlen = 128
|
||||
modelbusy = False
|
||||
port = 5001
|
||||
last_context = ""
|
||||
|
@ -151,6 +151,7 @@ class ServerRequestHandler(http.server.BaseHTTPRequestHandler):
|
|||
if last_context!="" and newprompt.startswith(last_context):
|
||||
fresh_state = False
|
||||
newprompt = newprompt[len(last_context):]
|
||||
print("Resuming state, new input len: " + str(len(newprompt)))
|
||||
#print("trimmed: " + newprompt)
|
||||
recvtxt = generate(
|
||||
prompt=newprompt,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue