Team Ai
Apppublic

KBaba7/llama.cpp

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes
run-llama2.sh28 linesDownload Raw Back to sycl
1#!/bin/bash2 3#  MIT license4#  Copyright (C) 2024 Intel Corporation5#  SPDX-License-Identifier: MIT6 7source /opt/intel/oneapi/setvars.sh8 9#export GGML_SYCL_DEBUG=110 11#ZES_ENABLE_SYSMAN=1, Support to get free memory of GPU by sycl::aspect::ext_intel_free_memory. Recommended to use when --split-mode = layer.12 13INPUT_PROMPT="Building a website can be done in 10 simple steps:\nStep 1:"14MODEL_FILE=models/llama-2-7b.Q4_0.gguf15NGL=3316CONEXT=819217 18if [ $# -gt 0 ]; then19    GGML_SYCL_DEVICE=$120    echo "use $GGML_SYCL_DEVICE as main GPU"21    #use signle GPU only22    ZES_ENABLE_SYSMAN=1 ./build/bin/llama-cli -m ${MODEL_FILE} -p "${INPUT_PROMPT}" -n 400 -e -ngl ${NGL} -s 0 -c ${CONEXT} -mg $GGML_SYCL_DEVICE -sm none23 24else25    #use multiple GPUs with same max compute units26    ZES_ENABLE_SYSMAN=1 ./build/bin/llama-cli -m ${MODEL_FILE} -p "${INPUT_PROMPT}" -n 400 -e -ngl ${NGL} -s 0 -c ${CONEXT}27fi28