Download scripts/r5_vlma/cpu_check.sbatch from treoa/turkic-ocr-code: direct link, hf CLI and curl.
- Browser
- Download file 2.45 kB
-
https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_vlma/cpu_check.sbatch
- Command line
-
hf download hf://treoa/turkic-ocr-code/scripts/r5_vlma/cpu_check.sbatch
-
curl -L -o cpu_check.sbatch https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_vlma/cpu_check.sbatch
2.45 kB
| #SBATCH --job-name=r5_vlma_cpucheck | |
| #SBATCH --partition=ZEN4 | |
| #SBATCH --qos=nu-zen4 | |
| #SBATCH --gres=none | |
| #SBATCH --cpus-per-task=16 | |
| #SBATCH --mem=96G | |
| #SBATCH --time=02:00:00 | |
| #SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out | |
| # R5 VLMA CPU check: smoke sequence (KOHTD train only), processor-level input check for all 13 arms, then a tiny CPU | |
| # train (2 steps with a save-and-resume, export) and a reload-and-generate check for the model given as $1. | |
| set -u | |
| CODE=/path/to/TURKIC_OCR_CODE | |
| DATA=/path/to/TURKIC_OCR_DATA | |
| export HF_HUB_OFFLINE=1 TOKENIZERS_PARALLELISM=false | |
| unset HF_TOKEN HUGGING_FACE_HUB_TOKEN || true | |
| S=$CODE/scripts/r5_vlma | |
| PY="$CODE/.venv_vlm/bin/python -I" | |
| V=$DATA/outputs/r5/vlma | |
| SEQ=$V/smoke_seq_kohtd_train.tsv | |
| mkdir -p $V/cpu_check $DATA/checkpoints/r5/cpu_check | |
| [ -f $SEQ ] || $PY $S/make_smoke_seq.py $DATA/data/processed/kohtd_split_v1/train.tsv \ | |
| $DATA/data/processed/kohtd_words_raw/KOHTD_dataset/HK_dataset/img $SEQ 2000 | |
| if [ "${2:-}" = "inputs" ]; then | |
| $PY $S/check_inputs.py $S/models_r5.tsv $DATA/hf_cache/j2_models $SEQ $V/cpu_check/inputs \ | |
| paddleocr_vl_1_6 qwen3_vl_2b lightonocr_3_1b glm_ocr minicpm_ocr_1_0 hunyuanocr ovisocr2 lightonocr_3_0_8b \ | |
| granite_docling_258m surya_ocr_2_5 mineru2_5_pro firered_ocr ovisocr3 2>&1 | grep -v -E "^\s*$" | |
| fi | |
| M=$1 | |
| if [ "$M" != "none" ]; then | |
| C="--short $M --arm cpu_$M --registry $S/models_r5.tsv --models-dir $DATA/hf_cache/j2_models --seq $SEQ \ | |
| --ckpt-root $DATA/checkpoints/r5/cpu_check --out-root $V/cpu_check/runs --phase smoke --n-samples 8 --eff-batch 4 \ | |
| --micro-batch 2 --device cpu --workers 2 --threads 14 --save-every-min 1000" | |
| rm -rf $DATA/checkpoints/r5/cpu_check/cpu_$M $V/cpu_check/runs/cpu_$M | |
| echo "=== $M part 1 (1 step, save, exit) $(date -u +%T)" | |
| $PY $S/train_vlm.py $C --stop-after-steps 1 2>&1 | grep -v -E "Loading weights|^\s*$" | tail -20 | |
| echo "=== $M part 2 (resume, step 2, save, export) $(date -u +%T)" | |
| $PY $S/train_vlm.py $C 2>&1 | grep -v -E "Loading weights|^\s*$" | tail -20 | |
| echo "=== $M reload + generate $(date -u +%T)" | |
| $PY $S/eval_vlm.py --short $M --arm cpu_$M --ckpt smoke --model-dir $DATA/checkpoints/r5/cpu_check/cpu_$M/smoke \ | |
| --registry $S/models_r5.tsv --device cpu --batch 2 --smoke-seq $SEQ --smoke-n 2 \ | |
| --smoke-out $V/cpu_check/runs/cpu_$M/smoke_generation.json 2>&1 | grep -v -E "Loading weights|^\s*$" | tail -8 | |
| fi | |
| echo "[r5_vlma_cpucheck] done $(date -u +%T)" | |