Spaces:
Running
Running
Download src/miniwebagent/scripts/cluster/opencua/make_tokenizer.sh from sparklabuofu/MiniWeb-demo: direct link, hf CLI and curl.
- Browser
- Download file 589 Bytes
-
https://huggingface.co/spaces/sparklabuofu/MiniWeb-demo/resolve/main/src/miniwebagent/scripts/cluster/opencua/make_tokenizer.sh
- Command line
-
hf download hf://spaces/sparklabuofu/MiniWeb-demo/src/miniwebagent/scripts/cluster/opencua/make_tokenizer.sh
-
curl -L -o make_tokenizer.sh https://huggingface.co/spaces/sparklabuofu/MiniWeb-demo/resolve/main/src/miniwebagent/scripts/cluster/opencua/make_tokenizer.sh
589 Bytes
| # Build $WEBMIX_ROOT/opencua_tokenizer (see NOTE.txt): the HF snapshot's tokenizer files with this folder's | |
| # tokenizer_config.json (no unk_token / pad_token). Needs the xlangai/OpenCUA-7B snapshot in $WEBMIX_ROOT/hf. | |
| set -e | |
| B=${WEBMIX_ROOT:?set WEBMIX_ROOT} | |
| SNAP=$(ls -d $B/hf/hub/models--xlangai--OpenCUA-7B/snapshots/*/ | head -1) | |
| mkdir -p $B/opencua_tokenizer | |
| cp $SNAP/tokenization_opencua.py $SNAP/tiktoken.model $B/opencua_tokenizer/ | |
| cp "$(dirname "$0")/tokenizer_config.json" "$(dirname "$0")/NOTE.txt" $B/opencua_tokenizer/ | |
| echo "built $B/opencua_tokenizer from $SNAP" | |