char-fork/llama.cpp

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

Daniel Beveniusmodel-conversion : use BUILD_DIR variable in all scripts (#19015)a14b960bc

char/aliceai-t5-moe
646 B27 linesraw
1#!/usr/bin/env bash
2
3set -e
4#
5# First try command line argument, then environment variable, then file
6CONVERTED_MODEL="${1:-"$CONVERTED_MODEL"}"
7BUILD_DIR="${2:-"$BUILD_DIR"}"
8
9# Final check if we have a model path
10if [ -z "$CONVERTED_MODEL" ]; then
11    echo "Error: Model path must be provided either as:" >&2
12    echo "  1. Command line argument" >&2
13    echo "  2. CONVERTED_MODEL environment variable" >&2
14    exit 1
15fi
16
17if [ -z "$BUILD_DIR" ]; then
18    BUILD_DIR="../../build"
19fi
20
21echo $CONVERTED_MODEL
22
23cmake --build $BUILD_DIR --target llama-server
24
25${BUILD_DIR}/bin/llama-server -m $CONVERTED_MODEL \
26    --embedding \
27    --pooling none