Distribute and run LLMs with a single file.
C++ cross-platformggufllama-cpplocal-ailocal-inferencelocal-llmopen-source-aisingle-file-executablespeech-to-text
Confirm Apple Metal can load tensors from ZIP file
Justine Tunneyb9b759b3cfa2
diff --git a/llamafile/cuda.c b/llamafile/cuda.cindex d5457d95..4a7e11c6 100644--- a/llamafile/cuda.c+++ b/llamafile/cuda.c@@ -405,14 +405,9 @@ static bool ImportCudaImpl(void) {}static void ImportCuda(void) {- if (ggml_cuda.disabled) {- return;- }- if (ImportCudaImpl()) {+ if (!ggml_cuda.disabled && ImportCudaImpl()) {ggml_cuda.supported = true;- tinyprint(2, "NVIDIA cuBLAS GPU supported locked and loaded\n", NULL);- } else {- tinyprint(2, "warning: couldn't load Nvidia CUDA GPU support\n", NULL);+ tinyprint(2, "NVIDIA cuBLAS GPU support successfully loaded\n", NULL);}}diff --git a/llamafile/metal.c b/llamafile/metal.cindex 0a5af6fa..dbaf3581 100644--- a/llamafile/metal.c+++ b/llamafile/metal.c@@ -110,7 +110,7 @@ static bool ImportMetalImpl(void) {case -1:return false;case 0:- return true;+ break;case 1:needs_rebuild = true;break;@@ -203,12 +203,9 @@ static bool ImportMetalImpl(void) {}static void ImportMetal(void) {- if (IsXnuSilicon()) {- if (ImportMetalImpl()) {- ggml_metal.supported = true;- } else {- tinyprint(2, "couldn't import metal gpu support\n", NULL);- }+ if (IsXnuSilicon() && ImportMetalImpl()) {+ ggml_metal.supported = true;+ tinyprint(2, "Apple Metal GPU support successfully loaded\n", NULL);}}