若环境中有多个python版本,pybind11因为triton多线程会找不到指定版本的python×××.so,需要在环境变量中导入python库路径。假设python安装目录是PYTHON_HOME,指令如下:
export LD_LIBRARY_PATH=$PYTHON_HOME/lib:$LD_LIBRARY_PATH
// 设置环境变量 cd ${working_dir}/Triton_MindIE-LLM_Backend/example source set_env.sh // 启动triton服务 bash launch.sh
当出现如下打印时,表示启动成功。
I0807 03:28:54.018305 1434372 grpc_server.cc:2519] Started GRPCInferenceService at 0.0.0.0:8111 I0807 03:28:54.018602 1434372 http_server.cc:4637] Started HTTPService at 0.0.0.0:8110 I0807 03:28:54.060484 1434372 http_server.cc:320] Started Metrics Service at 0.0.0.0:8112
python client_stream.py
python submit.py --name llama3_8b --model_path weights/llama3_8b --trace_dataset GSM8K.jsonl
必须配置的参数: