team-qbits / training /run_inference.sh
ovinduG's picture
Upload folder using huggingface_hub
e55c8a4 verified
Raw History Blame Contribute Delete
1.11 kB
#!/usr/bin/env bash
# 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)"