最終更新:2025-01-24 (金) 17:11:26 (14d)  

GGUF/変換
Top / GGUF / 変換

モデルのダウンロード

変換

  • git clone https://github.com/ggerganov/llama.cpp
    cd llama.cpp
    pip install -r requirements.txt
    python .\convert-hf-to-gguf.py さっき落としてきたモデルのディレクトリ

llama.cpp/convert-hf-to-gguf.py

  • --outtype
    "--outtype", type=str, choices=["f32", "f16", "bf16", "q8_0", "tq1_0", "tq2_0", "auto"], default="f16",
    output format - use f32 for float32, f16 for float16, bf16 for bfloat16, q8_0 for Q8_0, tq1_0 or tq2_0 for ternary, and auto for the highest-fidelity 16-bit float type depending on the first loaded tensor type

llama.cpp/convert_hf_to_gguf_update.py?

quantize

  • bin/quantize <入力GGUFファイル> <出力GGUFファイル> Q4_K_M

参考