simonw / simonw/llm

Enable CUDA on llama.cpp with LLM

Open
#176 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12.5k
Forks
998
Avg merge
3d 13h
Merged PRs (30d)
10

Description

Following the docs to install works perfectly on my machine with Debian and an Nvidia GPU(3060). All of the CUDA bits are working as I can train models and do inference with PyTorch and see that the GPU gets activated.

When following the docs to install llama.cpp with llm install llm-llama-cpp and llm install llama-cpp-python the version that is installed does not attempt to use the GPU.

According the the llama.cpp page if it is compiled from the source this can be enabled with:

make clean && LLAMA_CUBLAS=1 make -j

Any recommendations for how to modify the installed llama.cpp to leverage a GPU and still communicate via the llm project?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the installation path for llm-llama-cpp and llama-cpp-python, along with the project documentation describing their integration. Determine how a CUDA-enabled llama.cpp build could be installed while remaining usable through the llm command, and verify that GPU-backed inference communicates correctly with the project.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.