mirror of
https://git.freebsd.org/ports.git
synced 2025-05-07 19:30:46 -04:00
15 lines
349 B
Bash
Executable file
15 lines
349 B
Bash
Executable file
#!/bin/sh
|
|
|
|
MODEL=$1
|
|
NUM_GPU=$2
|
|
|
|
if [ -z "$MODEL" ] || [ -z "$NUM_GPU" ]; then
|
|
echo "Usage: $0 <model> <num_gpu>"
|
|
exit 1
|
|
fi
|
|
|
|
ollama show --modelfile $MODEL > Modelfile &&
|
|
echo "PARAMETER num_gpu $NUM_GPU" >> Modelfile &&
|
|
ollama create "$MODEL-num_gpu$NUM_GPU" -f Modelfile &&
|
|
rm Modelfile &&
|
|
echo "model variant $MODEL-num_gpu$NUM_GPU was created"
|