Skip to content

Distribute and run LLMs with a single file.

Make clickable HTTP server links easier to see

Justine Tunney7a8d5ee4e1bb
diff --git a/build/config.mk b/build/config.mk
index 2230b544..6a1d37bd 100644
--- a/build/config.mk
+++ b/build/config.mk
@@ -13,9 +13,9 @@ MKDEPS = $(COSMOCC)/bin/mkdeps
INSTALL = install
ARFLAGS = rcsD
-CCFLAGS = -g -O3 -fexceptions
-TARGET_ARCH = -Xx86_64-mavx
+CCFLAGS = -g -O3 -fopenmp -fexceptions
CPPFLAGS_ = -iquote. -mcosmo -DGGML_MULTIPLATFORM
+TARGET_ARCH = -Xx86_64-mavx -Xx86_64-mtune=alderlake
TMPDIR = o//tmp
IGNORE := $(shell mkdir -p $(TMPDIR))
diff --git a/build/llamafile-convert b/build/llamafile-convert
index 5346639e..39507742 100755
--- a/build/llamafile-convert
+++ b/build/llamafile-convert
@@ -9,7 +9,7 @@ if [ x"$1" = x"--help" ]; then
echo "Your .llamafile is outputted to the current directory."
echo
echo "You can supply either a .gguf filename, or the URL to"
- echo "to download one from an online service Hugging Face."
+ echo "download one from an online service like Hugging Face."
echo
echo "When you run this program, it's recommended that you've"
echo "downloaded or installed an official llamafile-VERSION.zip"
diff --git a/llama.cpp/common.cpp b/llama.cpp/common.cpp
index 75a3c180..12607944 100644
--- a/llama.cpp/common.cpp
+++ b/llama.cpp/common.cpp
@@ -884,7 +884,6 @@ bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params) {
}
params.n_gpu_layers = llamafile_gpu_layers(params.n_gpu_layers);
- // tinylog(__func__, ": parsed configuration flags\n", NULL);
return true;
}
diff --git a/llama.cpp/server/server.cpp b/llama.cpp/server/server.cpp
index e43daaf3..3d414091 100644
--- a/llama.cpp/server/server.cpp
+++ b/llama.cpp/server/server.cpp
@@ -2535,6 +2535,17 @@ int server_cli(int argc, char **argv)
}
});
+ // load the model
+ if (!llama.load_model(params))
+ {
+ state.store(SERVER_STATE_ERROR);
+ return 1;
+ } else {
+ llama.initialize();
+ state.store(SERVER_STATE_READY);
+ LOG_INFO("model loaded", {});
+ }
+
// set timeouts and change hostname and port
svr.set_read_timeout (sparams.read_timeout);
svr.set_write_timeout(sparams.write_timeout);
@@ -2604,17 +2615,6 @@ int server_cli(int argc, char **argv)
return 0;
});
- // load the model
- if (!llama.load_model(params))
- {
- state.store(SERVER_STATE_ERROR);
- return 1;
- } else {
- llama.initialize();
- state.store(SERVER_STATE_READY);
- LOG_INFO("model loaded", {});
- }
-
// launch browser tab
if (!sparams.nobrowser) {
char url[128];