run_inference_server_hf.sh 433 Bytes
Newer Older
Rayyyyy's avatar
Rayyyyy committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

HF_PATH=<Specify path>   #本地地址,已下载模型存放地址
#HF_PATH="IEITYuan/Yuan2-2B-hf"  #从huggingface加载模型

ARGS="
    --do_sample false \
    --max_length 8192 \
    --max-position-embeddings 8192 \
    --num_beams 1 \
    --bf16 \
    --temperature 1 \
    --top_k 1
"

CUDA_VISIBLE_DEVICES=0 PORT=8000 python tools/run_text_generation_server_hf.py   \
       $GPT_ARGS \
       --load $HF_PATH