mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-19 12:10:28 +08:00
28 lines
598 B
Bash
Executable File
28 lines
598 B
Bash
Executable File
#!/bin/bash
|
|
|
|
cd model
|
|
# Cython is needed to compile fastBPE
|
|
pip install Cython
|
|
|
|
# Patch the TensorFlow estimator package
|
|
export FILE="/usr/local/lib/python2.7/dist-packages/tensorflow_estimator/python/estimator/keras.py"
|
|
patch -b "$FILE" estimator.patch
|
|
|
|
# Install fastBPE
|
|
git clone https://github.com/glample/fastBPE.git
|
|
cd fastBPE
|
|
python setup.py install
|
|
cd ../..
|
|
|
|
# Download the 512-length model if specified, 256-length otherwise
|
|
#if [ "$1" = "512" ]
|
|
#then
|
|
# URL="gs://sf-ctrl/seqlen512_v1.ckpt/"
|
|
#else
|
|
# URL="gs://sf-ctrl/seqlen256_v1.ckpt/"
|
|
#fi
|
|
|
|
# Copy model
|
|
#gsutil -m cp -r "$URL" .
|
|
|