llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

Is it possible to run llama.cpp in Google Colab Pro?

Open codepunisher10 opened this issue 2 years ago • 1 comments

Any help or guidance would be greatly appreciated.

codepunisher10 avatar Mar 14 '23 12:03 codepunisher10

upload models. let the directory be model

!git clone https://github.com/ggerganov/llama.cpp.git
!(cd llama.cpp; make)
!llama.cpp/main -m ..... -t 4 -l 128 .....

freedomtan avatar Mar 15 '23 02:03 freedomtan

Alternatively use https://github.com/abetlen/llama-cpp-python. This will handle caching the model.

!CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python

llm = Llama(
  model_path="",
  n_gpu_layers=...,
  n_ctx=...,
)

PhilDakin avatar Jun 23 '23 18:06 PhilDakin