Wasm build for llama.cpp
Top 95.3% on sourcepulse
This project provides WebAssembly (Wasm) bindings for the llama.cpp
library, enabling large language models (LLMs) to run directly in web browsers. It targets developers building client-side AI applications, offering a way to leverage LLMs without requiring server-side infrastructure, thus reducing latency and costs.
How It Works
The project compiles llama.cpp
to WebAssembly, allowing it to execute within the browser's sandboxed environment. It utilizes Emscripten for the compilation process and provides JavaScript bindings to interact with the compiled C++ code. This approach enables efficient execution of LLM inference directly on the user's machine, leveraging WebAssembly's performance capabilities.
Quick Start & Requirements
./build-single-thread.sh
or ./build-multi-thread.sh
. The compiled llama.cpp
will be in dist/llama-st
or dist/llama-mt
.git
, bash
, make
, cmake
, clang
, Node.js
(for server example).npx http-server -S -C cert.pem
).Highlighted Details
llama.cpp
.LlamaCpp
) for easy integration into web applications.Maintenance & Community
Licensing & Compatibility
llama.cpp
itself is typically under the MIT license, but the specific licensing for this Wasm build and its bindings would need verification.Limitations & Caveats
The project appears to be a direct compilation of llama.cpp
to Wasm, and performance will be heavily dependent on the user's hardware and browser capabilities. The README does not detail specific browser compatibility or performance benchmarks.
1 year ago
Inactive