From 569916ab445d47c697df04fdfbc04b66b11e8a6a Mon Sep 17 00:00:00 2001 From: Jose Yukiteru Amano Date: Thu, 20 Jul 2023 00:11:30 -0400 Subject: [PATCH] Little changes in .gitignore for Poetry users A fix in Makefile for FreeBSD users. In the platfrom x86_64 is amd64. This fix resolve compilation using CFLAGS and CXXFLAGS with -march=native and -mtune=native Add two examples for interactive mode using Llama2 models (thx TheBloke for models) --- .gitignore | 4 ++++ Makefile | 2 +- examples/llama2-13b.sh | 18 ++++++++++++++++++ examples/llama2.sh | 18 ++++++++++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100755 examples/llama2-13b.sh create mode 100755 examples/llama2.sh diff --git a/.gitignore b/.gitignore index a23ac5928..52caf2e98 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,7 @@ qnt-*.txt perf-*.txt examples/jeopardy/results.txt + +pyproject.toml +poetry.lock +poetry.toml diff --git a/Makefile b/Makefile index 6c74e1346..a7bdb244d 100644 --- a/Makefile +++ b/Makefile @@ -102,7 +102,7 @@ endif # Architecture specific # TODO: probably these flags need to be tweaked on some architectures # feel free to update the Makefile for your architecture and send a pull request or issue -ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686)) +ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686 amd64)) # Use all CPU extensions that are available: CFLAGS += -march=native -mtune=native CXXFLAGS += -march=native -mtune=native diff --git a/examples/llama2-13b.sh b/examples/llama2-13b.sh new file mode 100755 index 000000000..92b3f6dd8 --- /dev/null +++ b/examples/llama2-13b.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# +# Temporary script - will be removed in the future +# + +cd `dirname $0` +cd .. + +./main -m models/available/Llama2/13B/llama-2-13b.ggmlv3.q4_0.bin \ + --color \ + --ctx_size 2048 \ + -n -1 \ + -ins -b 256 \ + --top_k 10000 \ + --temp 0.2 \ + --repeat_penalty 1.1 \ + -t 8 diff --git a/examples/llama2.sh b/examples/llama2.sh new file mode 100755 index 000000000..221b37553 --- /dev/null +++ b/examples/llama2.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# +# Temporary script - will be removed in the future +# + +cd `dirname $0` +cd .. + +./main -m models/available/Llama2/7B/llama-2-7b.ggmlv3.q4_0.bin \ + --color \ + --ctx_size 2048 \ + -n -1 \ + -ins -b 256 \ + --top_k 10000 \ + --temp 0.2 \ + --repeat_penalty 1.1 \ + -t 8