Skip to content

Installation

Silas Marvin edited this page Aug 6, 2024 · 9 revisions

LSP-AI is entirely written in Rust. Install it on any platform with cargo. Be sure to first install rust with rustup.

This is the recommended installation for all users. If you want to use local models we recommend using Ollama. You do not need to install with llama_cpp, metal or cublas to use Ollama.

cargo install lsp-ai

If you want to use llama_cpp (advanced users):

Install with the llama_cpp feature to use llama.cpp.

cargo install lsp-ai -F llama_cpp

Install with llama_cpp and metal feature to use llama.cpp models with metal.

cargo install lsp-ai -F llama_cpp -F metal

Install with llama_cpp and cublas feature to use llama.cpp models with cuBlas.

cargo install lsp-ai -F llama_cpp -F cuda

If you are having compilation errors installing with cuda support. You may need to set the C++ compiler to an older version. You can do so by setting the environment variable: CXX="g++-11".

Note that we use the llama-cpp-rs crate to bind to llama.cpp if there are issues compiling Cuda or Metal, please make an issue on their page.

Clone this wiki locally