先週はnanocoderの環境構築の最中だったので情報が少ない。
次のようにHugging Faceからダウンロードして、llama.cppのconvert_hf_to_gguf.pyでGGUFに変換する。
cd models
git clone https://huggingface.co/XXXXXX/REPONAME
python convert_hf_to_gguf.py models/REPONAME --outtype f16
models/REPONAME/hogehoge.gguf GGUFファイルができるのでコピーする。
cp models/REPONAME/hogehoge.gguf ~/.ollama/models/
Modelfile_hogehoge.txt を作成する。
from /home/hidemi/.ollama/models/hogehoge.gguf
ollamaに登録する。
ollama create hogehoge -f /home/hidemi/.ollama/models/Modelfile_hogehoge.txt