Distribute and run LLMs with a single file.
C++ cross-platformggufllama-cpplocal-ailocal-inferencelocal-llmopen-source-aisingle-file-executablespeech-to-text
Release llamafile v0.1
Justine Tunney1b911af127b5
diff --git a/README.md b/README.mdindex cf3653dd..c1221858 100644--- a/README.md+++ b/README.md@@ -41,13 +41,13 @@ You can download and run `llamafile` from the release page in yourterminal or command prompt.```sh-curl https://foo.example/llamafile >llamafile+curl https://github.com/Mozilla-Ocho/llamafile/releases/download/0.1/llamafile-server-0.1 >llamafilechmod +x llamafile-./llamafile+./llamafile --help```-On macOS with Apple Silicon you need to have Xcode installed for llamafile to be able-to bootstrap itself.+On macOS with Apple Silicon you need to have Xcode installed for+llamafile to be able to bootstrap itself.On Windows, you may need to rename `llamafile` to `llamafile.exe` inorder for it to run.diff --git a/llama.cpp/ggml.c b/llama.cpp/ggml.cindex 2232a00e..45c4cd4b 100644--- a/llama.cpp/ggml.c+++ b/llama.cpp/ggml.c@@ -72,6 +72,33 @@ typedef void * thread_ret_t;#define GGML_PRINT(...) printf(__VA_ARGS__)+asm(".ident\t\"\\n\\n\+llama.cpp (MIT License)\\n\+Copyright (c) 2023 Georgi Gerganov\\n\+Copyright (c) 2023 Jeffrey Quesnelle and Bowen Peng.\\n\+Copyright (c) 2023 Yuji Hirose\\n\+Copyright (c) 2022 Niels Lohmann <https://nlohmann.me>\\n\+Copyright (c) 2022 Bjoern Hoehrmann <[email protected]>\\n\+Copyright (c) 2017 Sean Barrett\\n\+\\n\+Permission is hereby granted, free of charge, to any person obtaining a copy\\n\+of this software and associated documentation files (the \\\"Software\\\"), to deal\\n\+in the Software without restriction, including without limitation the rights\\n\+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\n\+copies of the Software, and to permit persons to whom the Software is\\n\+furnished to do so, subject to the following conditions:\\n\+\\n\+The above copyright notice and this permission notice shall be included in all\\n\+copies or substantial portions of the Software.\\n\+\\n\+THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n\+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\n\+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\n\+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\n\+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\n\+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\n\+SOFTWARE.\"");+//// end of logging block//diff --git a/llamafile/llamafile.c b/llamafile/llamafile.cindex d4b6ea9a..b83d65f0 100644--- a/llamafile/llamafile.c+++ b/llamafile/llamafile.c@@ -15,6 +15,7 @@// See the License for the specific language governing permissions and// limitations under the License.+#include "llamafile.h"#include <cosmo.h>#include <errno.h>#include <fcntl.h>@@ -26,11 +27,26 @@#include <limits.h>#include <unistd.h>#include <sys/mman.h>-#include "llamafile.h"#include "zip.h"#define Min(a, b) ((a) < (b) ? (a) : (b))+asm(".ident\t\"\\n\\n\+llamafile (Apache 2.0)\\n\+Copyright 2023 Mozilla Foundation\\n\+\\n\+Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\+you may not use this file except in compliance with the License.\\n\+You may obtain a copy of the License at\\n\+\\n\+ http://www.apache.org/licenses/LICENSE-2.0\\n\+\\n\+Unless required by applicable law or agreed to in writing, software\\n\+distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\+See the License for the specific language governing permissions and\\n\+limitations under the License.\"");+struct llamafile {FILE *fp;size_t size;