File: get-winogrande.sh

package info (click to toggle)
llama.cpp 8461%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 74,500 kB
  • sloc: cpp: 378,787; ansic: 55,447; python: 31,100; lisp: 12,885; sh: 6,459; objc: 1,398; javascript: 925; xml: 384; makefile: 240
file content (38 lines) | stat: -rwxr-xr-x 684 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# vim: set ts=4 sw=4 et:

FILE="winogrande-debiased-eval.csv"
URL="https://huggingface.co/datasets/ikawrakow/winogrande-eval-for-llama.cpp/raw/main/$FILE"

die() {
    printf "%s\n" "$@" >&2
    exit 1
}

have_cmd() {
    for cmd; do
        command -v "$cmd" >/dev/null || return
    done
}

dl() {
    [ -f "$2" ] && return
    if have_cmd wget; then
        wget "$1" -O "$2"
    elif have_cmd curl; then
        curl -L "$1" -o "$2"
    else
        die "Please install wget or curl"
    fi
}

if [ ! -f "$FILE" ]; then
    dl "$URL" "$FILE" || exit
fi

cat <<EOF
Usage:

  llama-perplexity -m model.gguf -f $FILE --winogrande [--winogrande-tasks N] [other params]

EOF