Views
No views yet
!pip install gguf torch numpy sentencepiece huggingface_hub!git clone https://github.com/ggerganov/llama.cpp
%cd llama.cpp
!cmake -B build -DGGML_CUDA=ON
!cmake --build build --config Release -j 8
from huggingface_hub import snapshot_download
# モデルはお好みで変えてください。
model_path = snapshot_download(repo_id="google/gemma-2-27b")# f16に一度変換します。一度変換しないとq4_k_mにできないです。
!python convert_hf_to_gguf.py {model_path} \
--outfile gemma-24b-f16.gguf \
--outtype f16!./build/bin/llama-quantize \
gemma-24b-q4_k_m.gguf \
gemma-24b-q4_k_m_quantized.gguf \
Q4_K_M!./build/llama-cli \
-m /content/gemma-24b-f16.gguf \
-n 200 \
--n-gpu-layers 35 \
--threads 8 \
-p "こんにちは!"