char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
0177dcc73
char/aliceai-t5-moe
1#!/usr/bin/env bash 2 3# MIT license 4# Copyright (C) 2024 Intel Corporation 5# SPDX-License-Identifier: MIT 6export ONEAPI_DEVICE_SELECTOR ="level_zero:0" 7source /opt/intel/oneapi/setvars.sh 8 9#export GGML_SYCL_DEBUG=1 10 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.gguf 15NGL =99 16CONTEXT =4096 17 18#support malloc device memory more than 4GB. 19export UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS =1 20 21LOAD_MODE ='--load-mode auto' 22if [$ # -gt 0 ];then 23GGML_SYCL_DEVICE =$ 1 24echo "use $ GGML_SYCL_DEVICE as main GPU" 25#use signle GPU only 26ZES_ENABLE_SYSMAN =1./build/bin/llama-completion -m ${ MODEL_FILE } -no-cnv -p " ${ INPUT_PROMPT } " -n 200-e -ngl ${ NGL } -s 0-c ${ CONTEXT } -mg $ GGML_SYCL_DEVICE -sm none${ LOAD_MODE } 27 28else 29#use multiple GPUs with same max compute units 30ZES_ENABLE_SYSMAN =1./build/bin/llama-completion -m ${ MODEL_FILE } -no-cnv -p " ${ INPUT_PROMPT } " -n 200-e -ngl ${ NGL } -s 0-c ${ CONTEXT } ${ LOAD_MODE } 31fi