Views
No views yet
1# install git lfs
2# Ubuntu
3git lfs install
4# Mac
5brew install git-lfs
6
7# install huggingface CLI tools in a python environment
8pip install huggingface-hub
9
10# Clone this repo
11# https
12git clone https://huggingface.co/onicai/llama_cpp_canister_models
13# ssh
14git clone git@hf.co:onicai/llama_cpp_canister_models
15
16cd llama_cpp_canister_models
17
18# configure lfs for local repo
19huggingface-cli lfs-enable-largefiles .
20
21# tell lfs what files to track (.gitattributes)
22git lfs track "*.gguf"
23
24# add, commit & push as usual with git
25git add <file-name>
26git commit -m "Adding <file-name>"
27git push -u origin main1# From llama.cpp root folder
2
3# Build everything
4make -j
5
6# Convert a llama2c model+tokenizer to gguf
7convert-llama2c-to-ggml --llama2c-model stories260Ktok512.bin --copy-vocab-from-model tok512.bin --llama2c-output-model stories260Ktok512.gguf
8convert-llama2c-to-ggml --llama2c-model stories15Mtok4096.bin --copy-vocab-from-model tok4096.bin --llama2c-output-model stories15Mtok4096.gguf
9convert-llama2c-to-ggml --llama2c-model stories42Mtok4096.bin --copy-vocab-from-model tok4096.bin --llama2c-output-model stories42Mtok4096.gguf
10convert-llama2c-to-ggml --llama2c-model stories110Mtok32000.bin --copy-vocab-from-model models/ggml-vocab-llama.gguf --llama2c-output-model stories110Mtok32000.gguf
11convert-llama2c-to-ggml --llama2c-model stories42Mtok32000.bin --copy-vocab-from-model models/ggml-vocab-llama.gguf --llama2c-output-model stories42Mtok32000.gguf
12
13# Run it local, like this
14./llama-cli -m stories15Mtok4096.gguf -p "Joe loves writing stories" -n 600 -c 128