Downloads · 30 days
31
12% of all-time downloads
cuticle999/gemma-2-27b-gguf
gemma-2-27b-gguf is a machine learning model from cuticle999. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
勉強の一環で下記のモデルをllama.cppを使用してggufに変換したものです。
Downloads · 30 days
31
12% of all-time downloads
All-time downloads
249
Public
Repo size
16.6 GB
Likes
0
Public
Click a slice to open those files.
.gguf16.6 GB · 100%
From the Hugging Face model README
勉強の一環で下記のモデルをllama.cppを使用してggufに変換したものです。
https://huggingface.co/google/gemma-2-27b<br> https://github.com/ggerganov/llama.cpp
colabでの量子化方法例
!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 "こんにちは!"
ライセンス<br> https://www.llama.com/llama3_1/license/ <br> https://github.com/ggerganov/llama.cpp?tab=MIT-1-ov-file