File size: 1,114 Bytes
e55c8a4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/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)"