Gemma-2b / performance.sh
mardakani's picture
Update performance.sh
2d1c653 verified
raw
history blame contribute delete
815 Bytes
#!/bin/bash
# Directory containing the .gguf files
directory="./"
# Loop over each .gguf file in the directory
for file in "$directory"/*.gguf; do
if [ -f "$file" ]; then # Check if it is a file
# Extract the file name without the extension
filename=$(basename "$file" .gguf)
# Create the Modelfile with the required content
# echo "From $file" > Modelfile
# Run the sequence of commands
# ollama create "$filename" -f Modelfile
# ollama serve
# python /home/icas/llm-benchmark/benchmark.py --prompt "Explain quantum physics" > "/home/icas/Downloads/$filename.txt"
# ollama rm "$filename"
/home/icas/llama.cpp/llama-cli -m $file -p "Explain quantum physics" -n 128 > "/home/icas/Downloads/$filename.txt"
fi
done