File size: 1,848 Bytes
b51903a
 
 
 
 
 
682bee1
 
 
 
 
b51903a
 
 
 
682bee1
b51903a
 
682bee1
 
 
 
 
 
 
b51903a
 
 
 
682bee1
b51903a
 
682bee1
 
 
 
 
 
b51903a
 
 
 
 
 
 
682bee1
 
 
 
b51903a
 
 
682bee1
 
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "# SinhalaMMLU — team-riswan, submission #138\n",
        "This notebook runs the reconstructed Ollama pipeline from this repository. Read README.md and REPRODUCIBILITY.md first. Fresh model reproduction is unverified; Pass 3 retains historical sampling. The exact submitted predictions stay untouched.\n",
        "Provision the original Ollama model/runtime before running the last cell. The model setup currently differs from the organisers' Hugging-Face-only template; approval is outstanding.\n"
      ],
      "id": "team-riswan-0"
    },
    {
      "cell_type": "code",
      "metadata": {},
      "execution_count": null,
      "outputs": [],
      "source": [
        "%pip install huggingface_hub==2.3.0\n",
        "from huggingface_hub import snapshot_download\n",
        "from pathlib import Path\n",
        "import subprocess, sys\n",
        "repo = Path(snapshot_download('SinhalaMMLU-SharedTask/team-riswan', allow_patterns=['*.py', '*.md', '*.txt', 'training/src/*', 'training/ensemble_v9.py']))\n"
      ],
      "id": "team-riswan-1"
    },
    {
      "cell_type": "code",
      "metadata": {},
      "execution_count": null,
      "outputs": [],
      "source": [
        "# Full model run: expensive. No archived predictions are used.\n",
        "run_dir = Path.cwd() / 'rerun'\n",
        "run_dir.mkdir(exist_ok=True)\n",
        "subprocess.run([sys.executable, str(repo / 'inference.py')], cwd=run_dir, check=True)\n"
      ],
      "id": "team-riswan-2"
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 5
}