Added prints for stopping sequences, made makefile 1% friendlier to arch linux users
This commit is contained in:
parent
525184930d
commit
6548d3b3fb
4 changed files with 15 additions and 6 deletions
7
Makefile
7
Makefile
|
@ -10,6 +10,10 @@ ifndef UNAME_M
|
||||||
UNAME_M := $(shell uname -m)
|
UNAME_M := $(shell uname -m)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifndef ARCH_LINUX
|
||||||
|
ARCH_LINUX := $(shell grep "Arch Linux" /etc/os-release 2>/dev/null)
|
||||||
|
endif
|
||||||
|
|
||||||
CCV := $(shell $(CC) --version | head -n 1)
|
CCV := $(shell $(CC) --version | head -n 1)
|
||||||
CXXV := $(shell $(CXX) --version | head -n 1)
|
CXXV := $(shell $(CXX) --version | head -n 1)
|
||||||
|
|
||||||
|
@ -48,6 +52,9 @@ CXXFLAGS += -pthread -s -Wno-multichar
|
||||||
ifeq ($(UNAME_S),Linux)
|
ifeq ($(UNAME_S),Linux)
|
||||||
CFLAGS += -pthread
|
CFLAGS += -pthread
|
||||||
CXXFLAGS += -pthread
|
CXXFLAGS += -pthread
|
||||||
|
ifdef ARCH_LINUX
|
||||||
|
LDFLAGS += -lcblas
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
CFLAGS += -pthread
|
CFLAGS += -pthread
|
||||||
|
|
|
@ -350,6 +350,7 @@ generation_outputs gpttype_generate(const generation_inputs inputs, generation_o
|
||||||
if (concat_output.find(matched) != std::string::npos)
|
if (concat_output.find(matched) != std::string::npos)
|
||||||
{
|
{
|
||||||
remaining_tokens = 0;
|
remaining_tokens = 0;
|
||||||
|
printf("\n(Stop sequence triggered)");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -435,7 +435,7 @@ def main(args):
|
||||||
RunServerMultiThreaded(args.host, args.port, embedded_kailite)
|
RunServerMultiThreaded(args.host, args.port, embedded_kailite)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print("Welcome to KoboldCpp - Version 1.8") # just update version manually
|
print("Welcome to KoboldCpp - Version 1.9") # just update version manually
|
||||||
parser = argparse.ArgumentParser(description='Kobold llama.cpp server')
|
parser = argparse.ArgumentParser(description='Kobold llama.cpp server')
|
||||||
modelgroup = parser.add_mutually_exclusive_group() #we want to be backwards compatible with the unnamed positional args
|
modelgroup = parser.add_mutually_exclusive_group() #we want to be backwards compatible with the unnamed positional args
|
||||||
modelgroup.add_argument("--model", help="Model file to load", nargs="?")
|
modelgroup.add_argument("--model", help="Model file to load", nargs="?")
|
||||||
|
|
|
@ -246,6 +246,7 @@ generation_outputs llama_generate(const generation_inputs inputs, generation_out
|
||||||
if (concat_output.find(matched) != std::string::npos)
|
if (concat_output.find(matched) != std::string::npos)
|
||||||
{
|
{
|
||||||
remaining_tokens = 0;
|
remaining_tokens = 0;
|
||||||
|
printf("\n(Stop sequence triggered)");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue