Skip to content

Distribute and run LLMs with a single file.

Cleanup some code

Justine Tunney9b872133567d
diff --git a/llama.cpp/cuda.c b/llama.cpp/cuda.c
deleted file mode 100644
index e69de29b..00000000
diff --git a/llama.cpp/llava/llava-quantize.cpp b/llama.cpp/llava/llava-quantize.cpp
index 022ef68d..8b91c2a4 100644
--- a/llama.cpp/llava/llava-quantize.cpp
+++ b/llama.cpp/llava/llava-quantize.cpp
@@ -8,8 +8,15 @@
int main(int argc, char *argv[]) {
llamafile_check_cpu();
if (argc != 4) {
- fprintf(stderr, "Usage: %s INPUT OUTPUT FORMAT\n");
- exit(1);
+ fprintf(stderr,
+ "Usage: %s INPUT OUTPUT FORMAT\n"
+ " - 2 is Q4_0\n"
+ " - 3 is Q4_1\n"
+ " - 6 is Q5_0\n"
+ " - 7 is Q5_1\n"
+ " - 8 is Q8_0\n",
+ argv[0]);
+ return 1;
}
if (!clip_model_quantize(argv[1], argv[2], atoi(argv[3]))) {
exit(1);
diff --git a/llamafile/compcat.cu b/llamafile/compcap.cu
similarity index 100%
rename from llamafile/compcat.cu
rename to llamafile/compcap.cu
diff --git a/llamafile/cuda.c b/llamafile/cuda.c
index a33e859e..d5457d95 100644
--- a/llamafile/cuda.c
+++ b/llamafile/cuda.c
@@ -32,7 +32,7 @@
#include "llama.cpp/ggml-cuda.h"
__static_yoink("llama.cpp/ggml.h");
-__static_yoink("llamafile/compcat.cu");
+__static_yoink("llamafile/compcap.cu");
__static_yoink("llamafile/llamafile.h");
__static_yoink("llama.cpp/ggml-cuda.h");
__static_yoink("llama.cpp/ggml-cuda.cu");
@@ -57,7 +57,7 @@ static const struct Source {
const char *name;
} srcs[] = {
{"/zip/llama.cpp/ggml.h", "ggml.h"},
- {"/zip/llamafile/compcat.cu", "compcat.cu"},
+ {"/zip/llamafile/compcap.cu", "compcap.cu"},
{"/zip/llamafile/llamafile.h", "llamafile.h"},
{"/zip/llama.cpp/ggml-cuda.h", "ggml-cuda.h"},
{"/zip/llama.cpp/ggml-cuda.cu", "ggml-cuda.cu"}, // must come last
@@ -195,7 +195,7 @@ static dontinline bool GetNvccArchFlag(char *nvcc, char flag[static 32]) {
// create path of exe
char exe[PATH_MAX];
llamafile_get_app_dir(exe, sizeof(exe));
- strlcat(exe, "compcat", PATH_MAX);
+ strlcat(exe, "compcap", PATH_MAX);
// get path of sauce
char src[PATH_MAX];