Views
No views yet
pip3 install huggingface-hub>=0.17.1huggingface-cli download 24bean/Llama-2-ko-7B-GGUF llama-2-ko-7b_q8_0.gguf --local-dir . --local-dir-use-symlinks Falsehuggingface-cli download 24bean/Llama-2-ko-7B-GGUF llama-2-ko-7b.gguf --local-dir . --local-dir-use-symlinks Falsellama.cpp commandllama.cpp from commit d0cee0d36d5be95a0d9088b674dbb27354107221 or later../main -ngl 32 -m llama-2-ko-7b_q8_0.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "{prompt}"1# Base ctransformers with no GPU acceleration
2pip install ctransformers>=0.2.24
3# Or with CUDA GPU acceleration
4pip install ctransformers[cuda]>=0.2.24
5# Or with ROCm GPU acceleration
6CT_HIPBLAS=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
7# Or with Metal GPU acceleration for macOS systems
8CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers1from ctransformers import AutoModelForCausalLM
2
3# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
4llm = AutoModelForCausalLM.from_pretrained("24bean/Llama-2-ko-7B-GGUF", model_file="llama-2-7b_q8_0.gguf", model_type="llama", gpu_layers=50)
5
6print(llm("AI is going to"))