char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
a14b960bc
char/aliceai-t5-moe
1#!/usr/bin/env bash 2 3set -e 4 5QUANTIZED_MODEL =" ${ 1 :- " $ QUANTIZED_MODEL " } " 6BUILD_DIR =" ${ 2 :- " $ BUILD_DIR " } " 7 8if [ -z" $ QUANTIZED_MODEL " ];then 9echo "Error: Model path must be provided either as:" >&2 10echo " 1. Command line argument" >&2 11echo " 2. QUANTIZED_MODEL environment variable" >&2 12exit 1 13fi 14 15# Check if data/wikitext-2-raw directory exists 16if [ ! -d"ppl/wikitext-2-raw" ];then 17echo "ppl/wikitext-2-raw directory does not exist. Downloading..." >&2 18mkdir -p ppl 19pushd ppl 20./../../../scripts/get-wikitext-2.sh 21popd 22fi 23 24if [ -z" $ BUILD_DIR " ];then 25BUILD_DIR ="../../build" 26fi 27 28cmake --build $ BUILD_DIR --target llama-perplexity-j8 29 30${ BUILD_DIR } /bin/llama-perplexity -m $ QUANTIZED_MODEL -f ppl/wikitext-2-raw/wiki.test.raw 31 32