Download scripts/r5_linedet/lm_extra.sbatch from treoa/turkic-ocr-code: direct link, hf CLI and curl.
- Browser
- Download file 938 Bytes
-
https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_linedet/lm_extra.sbatch
- Command line
-
hf download hf://treoa/turkic-ocr-code/scripts/r5_linedet/lm_extra.sbatch
-
curl -L -o lm_extra.sbatch https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_linedet/lm_extra.sbatch
938 Bytes
| #SBATCH --job-name=r5_ld_lmextra | |
| #SBATCH --partition=ZEN4 | |
| #SBATCH --qos=nu-zen4 | |
| #SBATCH --gres=none | |
| #SBATCH --cpus-per-task=16 | |
| #SBATCH --mem=48G | |
| #SBATCH --time=04:00:00 | |
| #SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out | |
| # After the line block: character-LM decoding (and, through the hook in lm_decode, the gated copy of clarification H9) for the seed-2 runs and A4b. | |
| CODE=/path/to/TURKIC_OCR_CODE | |
| DATA=/path/to/TURKIC_OCR_DATA | |
| unset HF_TOKEN HUGGING_FACE_HUB_TOKEN | |
| PY=$CODE/.venv_kraken/bin/python | |
| PRED=$DATA/outputs/r5/preds | |
| export OMP_NUM_THREADS=1 | |
| for LAB in A1_s2 A2_s2 A4b; do | |
| for CK in short long partial; do | |
| if [ -f $PRED/$LAB/$CK/meta.json ] && [ ! -f $PRED/$LAB/${CK}_lm/meta.json ]; then | |
| echo "=== lm_decode $LAB $CK $(date)" | |
| $PY -I -m linedet.lm_decode --arm $LAB --ckpt $CK --tune_set V1lm --workers 14 --max_lines 4000 | |
| fi | |
| done | |
| done | |
| $PY -I -m linedet.lm_gate | |
| echo "=== done $(date)" | |