Team Ai
Apppublic

KBaba7/llama.cpp

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes
run-all-ppl.sh31 linesDownload Raw Back to scripts
1#!/bin/bash2 3qnt=(f16 q8_0 q6_k q5_k q5_1 q5_0 q4_k q4_1 q4_0 q3_k q2_k)4args="-ngl 999 -t 8"5 6if [ -z "$1" ]; then7    echo "usage: $0 <model> [qnt] [args]"8    echo "default: $0 <model> \"${qnt[@]}\" \"${args}\""9    exit 110fi11 12if [ ! -z "$2" ]; then13    qnt=($2)14fi15 16if [ ! -z "$3" ]; then17    args="$3"18fi19 20set -o pipefail21set -e22 23model="$1"24out="../tmp/results-${model}"25 26mkdir -p ${out}27 28for q in ${qnt[@]}; do29    time ./bin/llama-perplexity -m ../models/${model}/ggml-model-f16.gguf -f ./wiki.test.raw ${args} 2>&1 | tee ${out}/ppl-${q}.txt30done31