Created
January 7, 2024 22:48
-
-
Save ThatOneCalculator/2c4d3ebbf8907c87888944776363e06f to your computer and use it in GitHub Desktop.
A dead simple batch gguf importing script. Just place/run it in the same directory as your ggufs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for gguf_file in ./*.gguf; do | |
base_name=$(basename "$gguf_file" .gguf) | |
echo "Making modelfile for $base_name" | |
model_file="./Modelfile_$base_name" | |
echo "FROM ./$gguf_file" > "$model_file" | |
ollama create "$base_name" -f "$model_file" | |
rm "$gguf_file" | |
rm "$model_file" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment