Skip to content

Instantly share code, notes, and snippets.

@ThatOneCalculator
Created January 7, 2024 22:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThatOneCalculator/2c4d3ebbf8907c87888944776363e06f to your computer and use it in GitHub Desktop.
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.
#!/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