Instructions to use SinhalaMMLU-SharedTask/team-sinbotics with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use SinhalaMMLU-SharedTask/team-sinbotics with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -33,12 +33,6 @@ tags:
|
|
| 33 |
|
| 34 |
## Datasets
|
| 35 |
|
| 36 |
-
### Shared-task data (provided by the organisers)
|
| 37 |
-
| Set | Questions | How we used it |
|
| 38 |
-
|---|---|---|
|
| 39 |
-
| Public training set (`SinhalaMMLU-SharedTask`, Easy level only, grades 6–8, 14 subjects, 4 options, with answers) | 1,851 | **Development and evaluation only**, never for training. 18 questions with a near-duplicate in the test set (character 5-gram Jaccard ≥ 0.5) were removed. The rest was split (seed 42) into a **screening set** of 280 (20 per subject) for comparing prompts and methods, a **few-shot pool** of 70 (5 per subject, the only source of in-context examples), and a **confirmation set** of 1,483 for confirming the screening winners. |
|
| 40 |
-
| Test set (Easy / Medium / Hard, no answers) | 2,238 (642 / 1,111 / 485) | Only to produce the submission with `inference.py`. Never used for training. |
|
| 41 |
-
|
| 42 |
### Extra training data (for the LoRA adapter)
|
| 43 |
| Dataset | Source and licence | Size | Preparation |
|
| 44 |
|---|---|---|---|
|
|
@@ -89,7 +83,7 @@ Validation accuracy (2,745 held-out questions, digit prompt) during training:
|
|
| 89 |
| Accuracy (%) | 44.4 | 47.4 | 49.9 | 51.7 | 51.7 | 52.8 | 53.2 | 54.5 | 54.8 |
|
| 90 |
|
| 91 |
### How we got here
|
| 92 |
-
- **Baseline and prompts.** We first evaluated Gemma-3-4B-it with the prompts of the SinhalaMMLU paper and many variants on
|
| 93 |
- **Ideas that did not help enough.** Machine translation of the questions into English (NLLB, MADLAD, self-translation) often lost negations ("which is NOT …"). Few-shot examples, calibration, option-order averaging, self-consistency, a negation-check chain and prompt ensembles each changed accuracy by less than our +2-point threshold.
|
| 94 |
- **Fine-tuning.** LoRA adapters on Global-MMLU Sinhala and on sinmulu_si improved Gemma-3-4B-it. In all our runs, validation accuracy peaked after one epoch.
|
| 95 |
- **Final system.** We then moved to Qwen3.5-4B, a newer ≤ 8B open model, trained one LoRA epoch on the combined data, and switched on its thinking mode for the reasoning step.
|
|
@@ -98,14 +92,13 @@ Validation accuracy (2,745 held-out questions, digit prompt) during training:
|
|
| 98 |
## Results of our experiments
|
| 99 |
|
| 100 |
All numbers are accuracy (%) on our own development data, never on the shared-task test set:
|
| 101 |
-
- **Screening
|
| 102 |
-
- **Confirmation set:** 1,483 different public training questions.
|
| 103 |
- **Validation sets:** held out from our fine-tuning data.
|
| 104 |
|
| 105 |
A condition was adopted only if it beat the baseline by at least 1–2 points with an exact McNemar test (Holm-corrected) on the confirmation set.
|
| 106 |
|
| 107 |
### 1. Prompting Gemma-3-4B-it (no fine-tuning)
|
| 108 |
-
| Prompt / condition | Screening
|
| 109 |
|---|---|---|
|
| 110 |
| Paper prompt, Sinhala, no subject (baseline A0) | 37.5 | 38.2 |
|
| 111 |
| Paper prompt + subject (Sinhala) | 42.1 | – |
|
|
@@ -164,7 +157,7 @@ python inference.py
|
|
| 164 |
- Our run also had `causal-conv1d==1.7.0` installed. It can't be installed from `requirements.txt` (it needs torch at build time). For identical kernels, run `pip install causal-conv1d==1.7.0 --no-build-isolation` after the requirements; without it, transformers uses its torch implementation.
|
| 165 |
- Decoding is greedy and fully deterministic on a given GPU. Different GPUs, or different batch compositions, can change a small number of answers through bf16 rounding.
|
| 166 |
- The final file was produced by our package (`training/sinmmlu`, `python -m sinmmlu.evaluate --model configs/models/qwen35_4b_lora_combined.yaml --data test --prompt cot_en_role_think --chat on --max-new-tokens 4096`). `inference.py` is a self-contained copy of that code path. We checked that it builds the same prompt for all 2,238 test questions and processes the reasoning texts the same way.
|
| 167 |
-
- On our side,
|
| 168 |
|
| 169 |
## Final run
|
| 170 |
| | |
|
|
|
|
| 33 |
|
| 34 |
## Datasets
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
### Extra training data (for the LoRA adapter)
|
| 37 |
| Dataset | Source and licence | Size | Preparation |
|
| 38 |
|---|---|---|---|
|
|
|
|
| 83 |
| Accuracy (%) | 44.4 | 47.4 | 49.9 | 51.7 | 51.7 | 52.8 | 53.2 | 54.5 | 54.8 |
|
| 84 |
|
| 85 |
### How we got here
|
| 86 |
+
- **Baseline and prompts.** We first evaluated Gemma-3-4B-it with the prompts of the SinhalaMMLU paper and many variants on development data held out from the public training questions (a screening split and a separate confirmation split). English step-by-step reasoning in the role of a Sri Lankan teacher was the clear winner: 45.6% vs 38.2% for the paper's prompt on the confirmation set.
|
| 87 |
- **Ideas that did not help enough.** Machine translation of the questions into English (NLLB, MADLAD, self-translation) often lost negations ("which is NOT …"). Few-shot examples, calibration, option-order averaging, self-consistency, a negation-check chain and prompt ensembles each changed accuracy by less than our +2-point threshold.
|
| 88 |
- **Fine-tuning.** LoRA adapters on Global-MMLU Sinhala and on sinmulu_si improved Gemma-3-4B-it. In all our runs, validation accuracy peaked after one epoch.
|
| 89 |
- **Final system.** We then moved to Qwen3.5-4B, a newer ≤ 8B open model, trained one LoRA epoch on the combined data, and switched on its thinking mode for the reasoning step.
|
|
|
|
| 92 |
## Results of our experiments
|
| 93 |
|
| 94 |
All numbers are accuracy (%) on our own development data, never on the shared-task test set:
|
| 95 |
+
- **Screening / confirmation:** two separate splits of the public training questions; methods were compared on the screening split and the best ones re-tested on the larger confirmation split.
|
|
|
|
| 96 |
- **Validation sets:** held out from our fine-tuning data.
|
| 97 |
|
| 98 |
A condition was adopted only if it beat the baseline by at least 1–2 points with an exact McNemar test (Holm-corrected) on the confirmation set.
|
| 99 |
|
| 100 |
### 1. Prompting Gemma-3-4B-it (no fine-tuning)
|
| 101 |
+
| Prompt / condition | Screening | Confirmation |
|
| 102 |
|---|---|---|
|
| 103 |
| Paper prompt, Sinhala, no subject (baseline A0) | 37.5 | 38.2 |
|
| 104 |
| Paper prompt + subject (Sinhala) | 42.1 | – |
|
|
|
|
| 157 |
- Our run also had `causal-conv1d==1.7.0` installed. It can't be installed from `requirements.txt` (it needs torch at build time). For identical kernels, run `pip install causal-conv1d==1.7.0 --no-build-isolation` after the requirements; without it, transformers uses its torch implementation.
|
| 158 |
- Decoding is greedy and fully deterministic on a given GPU. Different GPUs, or different batch compositions, can change a small number of answers through bf16 rounding.
|
| 159 |
- The final file was produced by our package (`training/sinmmlu`, `python -m sinmmlu.evaluate --model configs/models/qwen35_4b_lora_combined.yaml --data test --prompt cot_en_role_think --chat on --max-new-tokens 4096`). `inference.py` is a self-contained copy of that code path. We checked that it builds the same prompt for all 2,238 test questions and processes the reasoning texts the same way.
|
| 160 |
+
- On our side, part of the questions was generated in a separate run and reused, so batches were composed differently. A from-scratch run can therefore differ from `predictions.jsonl` in a few answers.
|
| 161 |
|
| 162 |
## Final run
|
| 163 |
| | |
|