Download training/run_inference.sh from SinhalaMMLU-SharedTask/team-qbits: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/SinhalaMMLU-SharedTask/team-qbits/resolve/main/training/run_inference.sh
- Command line
-
hf download hf://SinhalaMMLU-SharedTask/team-qbits/training/run_inference.sh
-
curl -L -o run_inference.sh https://huggingface.co/SinhalaMMLU-SharedTask/team-qbits/resolve/main/training/run_inference.sh
1.11 kB
| # Reproduces the submitted predictions end-to-end. No human in the loop. | |
| # | |
| # bash run_inference.sh /path/to/test_root [output_dir] | |
| # | |
| # test_root is the directory holding easy/ medium/ hard/ (or any folder of the test .json files). | |
| # Writes predictions.jsonl and predictions.zip into output_dir (default: ./out). | |
| # | |
| # Deterministic: no sampling, no generation, fixed seed, argmax over summed log-softmax scores. | |
| # Total inference pipeline = one 7,996,156,448-parameter model (<= 8B). | |
| set -euo pipefail | |
| TEST_ROOT="${1:?usage: bash run_inference.sh <test_root> [out_dir]}" | |
| OUT_DIR="${2:-./out}" | |
| MODEL="QBitsLK/gemma4-e4b-sinhala-mcq-cpt-v3" | |
| VARIANTS="si_intro si_nointro en_intro si_rot1 si_rot2" | |
| mkdir -p "$OUT_DIR" | |
| echo "== model : $MODEL" | |
| echo "== variants : $VARIANTS" | |
| echo "== test root: $TEST_ROOT" | |
| python make_predictions.py \ | |
| --data "$TEST_ROOT" \ | |
| --model "$MODEL" \ | |
| --ensemble $VARIANTS \ | |
| --seed 3407 \ | |
| --out "$OUT_DIR/predictions.jsonl" \ | |
| --zip "$OUT_DIR/predictions.zip" | |
| echo | |
| echo "== wrote $OUT_DIR/predictions.zip (contains predictions.jsonl at the archive root)" | |