noahsantacruz commited on
Commit
7372f12
路
verified 路
1 Parent(s): fa5bb14

BeRTevot: model card for the public repo, training report of this run

Browse files
Files changed (2) hide show
  1. README.md +3 -3
  2. training_report.json +41 -41
README.md CHANGED
@@ -4,7 +4,7 @@ language: [he, arc]
4
  library_name: transformers
5
  tags: [hebrew, abbreviations, roshei-tevot, sefaria]
6
  ---
7
- # BEREL 3.0 roshei tevot expander (siamese), v5b (Nov 23, 2026)
8
 
9
  Picks the meaning of a Hebrew or Aramaic abbreviation (roshei tevot, e.g. 专"砖, or a truncated word, e.g. 讗讞专讬') in context, by ranking the **sense classes** the Sefaria roshei tevot lexicon lists for it.
10
 
@@ -23,7 +23,7 @@ Picks the meaning of a Hebrew or Aramaic abbreviation (roshei tevot, e.g. 专"砖,
23
  import sys
24
  from huggingface_hub import snapshot_download
25
 
26
- folder = snapshot_download("Sefaria/berel-roshei-tevot-siamese") # private repo: `hf auth login` first
27
  sys.path.insert(0, folder)
28
  from roshei_tevot.predict import RosheiTevot # needs torch, transformers, numpy
29
 
@@ -43,7 +43,7 @@ for t in rt.expand('讗诪专 专"砖 讘谉 诇拽讬砖 讘驻"讘 讚砖讘转, 讜讘住拽"讙 讻
43
 
44
  ## Training and data
45
  - Base `dicta-il/BEREL_3.0`; one epoch of 600,000 rows sampled from 1,065,097 (weight 1/count(key)^0.5, synthetic rows 0.5, sense balancing 尾 0.5); spot A100, Nov 23, 2026. Run `rt-numbers-v5b-siamese-2026-11-23`. Code: `train-roshei-tevot` in Sefaria/ML-Workflows; this release is assembled by `app/roshei_tevot/publish_hf.py` there.
46
- - Data: `Sefaria/berel-roshei-tevot` (private), v5b. Built by Sefaria/translation-engine `experiments/expand_roshei_tevot` (`NUMBERS.md` has the rounds v3, v4, v5b; `rebuild_v5.sh` rebuilds it).
47
  - v5b = v4 plus: 92 lexicon readings the Dicta comparison found missing; 231 label fixes confirmed by two independent LLM readers (the 137 that only swap 专讘 and 专讘讬 are left out); 67 lexicon keys that were a prefix + another key (`讜专'`) are stripped again.
48
 
49
  ## Evaluation (v5b splits; top-1 over rows with 2+ candidates and the label among them)
 
4
  library_name: transformers
5
  tags: [hebrew, abbreviations, roshei-tevot, sefaria]
6
  ---
7
+ # BeRTevot: expanding Hebrew and Aramaic abbreviations in context (BEREL 3.0, siamese), v5b (Nov 23, 2026)
8
 
9
  Picks the meaning of a Hebrew or Aramaic abbreviation (roshei tevot, e.g. 专"砖, or a truncated word, e.g. 讗讞专讬') in context, by ranking the **sense classes** the Sefaria roshei tevot lexicon lists for it.
10
 
 
23
  import sys
24
  from huggingface_hub import snapshot_download
25
 
26
+ folder = snapshot_download("Sefaria/BeRTevot")
27
  sys.path.insert(0, folder)
28
  from roshei_tevot.predict import RosheiTevot # needs torch, transformers, numpy
29
 
 
43
 
44
  ## Training and data
45
  - Base `dicta-il/BEREL_3.0`; one epoch of 600,000 rows sampled from 1,065,097 (weight 1/count(key)^0.5, synthetic rows 0.5, sense balancing 尾 0.5); spot A100, Nov 23, 2026. Run `rt-numbers-v5b-siamese-2026-11-23`. Code: `train-roshei-tevot` in Sefaria/ML-Workflows; this release is assembled by `app/roshei_tevot/publish_hf.py` there.
46
+ - Data: Sefaria's roshei tevot dataset (v5b, not public; the lexicon, sense classes and counts it produced are in this repo). Built by Sefaria/translation-engine `experiments/expand_roshei_tevot` (`NUMBERS.md` has the rounds v3, v4, v5b; `rebuild_v5.sh` rebuilds it).
47
  - v5b = v4 plus: 92 lexicon readings the Dicta comparison found missing; 231 label fixes confirmed by two independent LLM readers (the 137 that only swap 专讘 and 专讘讬 are left out); 67 lexicon keys that were a prefix + another key (`讜专'`) are stripped again.
48
 
49
  ## Evaluation (v5b splits; top-1 over rows with 2+ candidates and the label among them)
training_report.json CHANGED
@@ -1,11 +1,11 @@
1
  {
2
  "status": "success",
3
- "run_name": "rt-numbers-v4-siamese-2026-11-23",
4
- "started_at": "2026-11-23T03:42:13.383646+00:00",
5
- "finished_at": "2026-11-23T04:22:27.151625+00:00",
6
  "model_repo_id": "dicta-il/BEREL_3.0",
7
  "revision": null,
8
- "dataset_repo": "gs://sefaria-ml-models/roshei-tevot/data/berel-roshei-tevot-numbers-v4",
9
  "synthetic_weight": 0.5,
10
  "sense_beta": 0.5,
11
  "sense_max_boost": 10.0,
@@ -31,59 +31,59 @@
31
  "resumed_from_checkpoint": null,
32
  "candidates": {
33
  "train": {
34
- "rows_in": 1063570,
35
- "rows_kept": 595179,
36
- "dropped_below_min_candidates": 468391,
37
- "gold_not_in_lexicon_lookup": 20219,
38
  "candidate_source": "dataset",
39
- "target_is_sense_class": 558767,
40
- "dropped_and_right_by_default": 458603
41
  },
42
  "val": {
43
- "rows_in": 6871,
44
- "rows_kept": 3410,
45
- "dropped_below_min_candidates": 3461,
46
- "gold_not_in_lexicon_lookup": 396,
47
  "candidate_source": "dataset",
48
- "target_is_sense_class": 3106,
49
- "dropped_and_right_by_default": 3286
50
  },
51
  "ranking": {
52
- "rows_in": 6871,
53
- "rows_kept": 3315,
54
- "dropped_below_min_candidates": 3556,
55
- "gold_not_in_lexicon_lookup": 396,
56
  "candidate_source": "dataset",
57
- "target_is_sense_class": 3106,
58
- "dropped_and_right_by_default": 3286
59
  }
60
  },
61
  "train_metrics": {
62
- "train_runtime": 2245.6583,
63
- "train_samples_per_second": 267.154,
64
- "train_steps_per_second": 2.087,
65
- "train_loss": 0.6692442751551376,
66
  "epoch": 0.9997866894197952
67
  },
68
  "final_eval": {
69
- "eval_loss": 0.43112969398498535,
70
- "eval_runtime": 4.2402,
71
- "eval_samples_per_second": 804.207,
72
- "eval_steps_per_second": 6.368,
73
  "epoch": 0.9997866894197952,
74
- "eval_top1": 0.9363436814048292,
75
- "eval_frequency_top1": 0.8196926936343681,
76
- "eval_mrr": 0.9645003658409114
77
  },
78
  "best_validation_top1": {
79
- "step": 4000,
80
- "top1": 0.9369708372530574,
81
- "frequency_top1": 0.8196926936343681,
82
- "mrr": 0.9645160447371172
83
  },
84
- "mean_tokens_per_second": 148686.4411490891,
85
- "final_model_dir": "/tmp/roshei-tevot-pt3o6_m9/output/final",
86
- "cuda_peak_memory_bytes": 31946108416
87
  },
88
- "model_uri": "gs://sefaria-ml-models/roshei-tevot/runs/rt-numbers-v4-siamese-2026-11-23/final"
89
  }
 
1
  {
2
  "status": "success",
3
+ "run_name": "rt-numbers-v5b-siamese-2026-11-23",
4
+ "started_at": "2026-11-23T07:46:35.264716+00:00",
5
+ "finished_at": "2026-11-23T08:26:17.902318+00:00",
6
  "model_repo_id": "dicta-il/BEREL_3.0",
7
  "revision": null,
8
+ "dataset_repo": "gs://sefaria-ml-models/roshei-tevot/data/berel-roshei-tevot-numbers-v5b",
9
  "synthetic_weight": 0.5,
10
  "sense_beta": 0.5,
11
  "sense_max_boost": 10.0,
 
31
  "resumed_from_checkpoint": null,
32
  "candidates": {
33
  "train": {
34
+ "rows_in": 1065097,
35
+ "rows_kept": 597063,
36
+ "dropped_below_min_candidates": 468034,
37
+ "gold_not_in_lexicon_lookup": 21028,
38
  "candidate_source": "dataset",
39
+ "target_is_sense_class": 559336,
40
+ "dropped_and_right_by_default": 457627
41
  },
42
  "val": {
43
+ "rows_in": 6907,
44
+ "rows_kept": 3444,
45
+ "dropped_below_min_candidates": 3463,
46
+ "gold_not_in_lexicon_lookup": 398,
47
  "candidate_source": "dataset",
48
+ "target_is_sense_class": 3123,
49
+ "dropped_and_right_by_default": 3289
50
  },
51
  "ranking": {
52
+ "rows_in": 6907,
53
+ "rows_kept": 3348,
54
+ "dropped_below_min_candidates": 3559,
55
+ "gold_not_in_lexicon_lookup": 398,
56
  "candidate_source": "dataset",
57
+ "target_is_sense_class": 3123,
58
+ "dropped_and_right_by_default": 3289
59
  }
60
  },
61
  "train_metrics": {
62
+ "train_runtime": 2218.0541,
63
+ "train_samples_per_second": 270.479,
64
+ "train_steps_per_second": 2.113,
65
+ "train_loss": 0.6675827976277268,
66
  "epoch": 0.9997866894197952
67
  },
68
  "final_eval": {
69
+ "eval_loss": 0.40786421298980713,
70
+ "eval_runtime": 4.27,
71
+ "eval_samples_per_second": 806.549,
72
+ "eval_steps_per_second": 6.323,
73
  "epoch": 0.9997866894197952,
74
+ "eval_top1": 0.9434782608695652,
75
+ "eval_frequency_top1": 0.8192546583850931,
76
+ "eval_mrr": 0.9685791925465838
77
  },
78
  "best_validation_top1": {
79
+ "step": 4687,
80
+ "top1": 0.9434782608695652,
81
+ "frequency_top1": 0.8192546583850931,
82
+ "mrr": 0.9685791925465838
83
  },
84
+ "mean_tokens_per_second": 151003.4963129549,
85
+ "final_model_dir": "/tmp/roshei-tevot-3qxs_s0p/output/final",
86
+ "cuda_peak_memory_bytes": 31909793280
87
  },
88
+ "model_uri": "gs://sefaria-ml-models/roshei-tevot/runs/rt-numbers-v5b-siamese-2026-11-23/final"
89
  }