2023-03-29 13:38:30 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [[ -z "${HF_MODEL_ID}" ]]; then
|
|
|
|
echo "HF_MODEL_ID must be set"
|
|
|
|
exit 1
|
|
|
|
fi
|
2023-05-22 02:10:21 -06:00
|
|
|
export MODEL_ID="${HF_MODEL_ID}"
|
2023-03-29 13:38:30 -06:00
|
|
|
|
|
|
|
if [[ -n "${HF_MODEL_REVISION}" ]]; then
|
|
|
|
export REVISION="${HF_MODEL_REVISION}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -n "${SM_NUM_GPUS}" ]]; then
|
|
|
|
export NUM_SHARD="${SM_NUM_GPUS}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -n "${HF_MODEL_QUANTIZE}" ]]; then
|
|
|
|
export QUANTIZE="${HF_MODEL_QUANTIZE}"
|
|
|
|
fi
|
|
|
|
|
2023-06-02 01:51:06 -06:00
|
|
|
if [[ -n "${HF_MODEL_TRUST_REMOTE_CODE}" ]]; then
|
|
|
|
export TRUST_REMOTE_CODE="${HF_MODEL_TRUST_REMOTE_CODE}"
|
|
|
|
fi
|
|
|
|
|
2023-05-22 02:10:21 -06:00
|
|
|
text-generation-launcher --port 8080
|