llama.cpp setup on Windows WSL2 with CUDA 13.2

Learn to compile llama.cpp in WSL2 Ubuntu with CUDA. The demo uses toolkit 13.2.1, an RTX 5070 architecture setting of 120, and 20 build threads.

Player not loading? Watch on YouTube

This tutorial covers building llama.cpp with CUDA support in Ubuntu under Windows WSL2 to run models locally. The speaker says the same setup applies to bare metal Ubuntu Linux. The walkthrough starts with NVIDIA's CUDA keyring, installs it through the Debian package manager, updates the package index, and installs the toolkit. The demonstrated installation reports CUDA 13.2.1.

Next, the speaker sets PATH and LD_LIBRARY_PATH to point to the local CUDA installation, then clones the llama.cpp source from GitHub. The CMake configuration enables CUDA and specifies architecture 120 for the demonstrated RTX 5070. The release build uses 20 threads. These settings describe the speaker's hardware and build choices; the tutorial does not establish them as requirements for every system. The speaker notes that compilation time depends on hardware.

The final step runs llama-cli from the build's binary directory with a model already downloaded into the models folder. The transcript does not identify the model or provide the full command parameters. The demonstration produces a reply and displays tokens-per-second statistics, but the transcript supplies no numerical benchmark results. Viewers get a short local LLM setup walkthrough focused on GPU compilation and a basic model test.