Distribute and run LLMs with a single file.
C++ cross-platformggufllama-cpplocal-ailocal-inferencelocal-llmopen-source-aisingle-file-executablespeech-to-text
Don't use ggml-backend on non-Apple platforms
Justine Tunney922c4f165930
diff --git a/llama.cpp/llava/clip.cpp b/llama.cpp/llava/clip.cppindex 7f384137..71db914b 100644--- a/llama.cpp/llava/clip.cpp+++ b/llama.cpp/llava/clip.cpp@@ -540,10 +540,13 @@ struct clip_ctx * clip_model_load(const char * fname, const int verbosity = 1) {clip_ctx * new_clip = new clip_ctx;+#if 0if (llamafile_gpu_supported() == LLAMAFILE_GPU_NVIDIA) {new_clip->backend = ggml_backend_cuda_init(0);tinylogf("%s: CLIP using CUDA backend\n", __func__);}+#endif+if (llamafile_gpu_supported() == LLAMAFILE_GPU_APPLE) {new_clip->backend = ggml_backend_metal_init();tinylogf("%s: CLIP using Metal backend\n", __func__);