char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Adrien Gallouëtscripts : improve get-wikitext-2.sh (#19952)ec88c3cee

char/aliceai-t5-moe
745 B43 linesraw
1#!/bin/sh
2# vim: set ts=4 sw=4 et:
3
4ZIP="wikitext-2-raw-v1.zip"
5FILE="wikitext-2-raw/wiki.test.raw"
6URL="https://huggingface.co/datasets/ggml-org/ci/resolve/main/$ZIP"
7
8die() {
9    printf "%s\n" "$@" >&2
10    exit 1
11}
12
13have_cmd() {
14    for cmd; do
15        command -v "$cmd" >/dev/null || return
16    done
17}
18
19dl() {
20    [ -f "$2" ] && return
21    if have_cmd wget; then
22        wget "$1" -O "$2"
23    elif have_cmd curl; then
24        curl -L "$1" -o "$2"
25    else
26        die "Please install wget or curl"
27    fi
28}
29
30have_cmd unzip || die "Please install unzip"
31
32if [ ! -f "$FILE" ]; then
33    dl "$URL" "$ZIP" || exit
34    unzip -o "$ZIP"  || exit
35    rm -f -- "$ZIP"
36fi
37
38cat <<EOF
39Usage:
40
41  llama-perplexity -m model.gguf -f $FILE [other params]
42
43EOF