baberu-ocr-webgpu / run-export.sh
ameraino11's picture
Add optimized unified Gather WebGPU models
8020c75 verified
Raw
History Blame Contribute Delete
561 Bytes
#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
cd "$root"
if [ ! -x .venv/bin/python ]; then
printf '%s\n' 'Missing .venv. Run ./bootstrap.sh first.' >&2
exit 1
fi
export HF_HOME="$root/.cache/huggingface"
export PYTHONHASHSEED=0
export TOKENIZERS_PARALLELISM=false
.venv/bin/python download_model.py
export HF_HUB_OFFLINE=1
.venv/bin/python export_encoder_fp32.py
.venv/bin/python export_decoder_fp32.py
.venv/bin/python export_decoder_qdq_int8.py
.venv/bin/python export_decoder_unified.py
.venv/bin/python export_decoder_gather.py