Feature Extraction
Transformers
Safetensors
Hebrew
Official Aramaic (700-300 BCE)
bert
hebrew
abbreviations
roshei-tevot
sefaria
text-embeddings-inference
Instructions to use Sefaria/BeRTevot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sefaria/BeRTevot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Sefaria/BeRTevot")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Sefaria/BeRTevot") model = AutoModel.from_pretrained("Sefaria/BeRTevot", device_map="auto") - Notebooks
- Google Colab
- Kaggle
BeRTevot: model card for the public repo, training report of this run
Browse files- README.md +3 -3
- 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 |
-
#
|
| 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/
|
| 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:
|
| 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-
|
| 4 |
-
"started_at": "2026-11-
|
| 5 |
-
"finished_at": "2026-11-
|
| 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-
|
| 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":
|
| 35 |
-
"rows_kept":
|
| 36 |
-
"dropped_below_min_candidates":
|
| 37 |
-
"gold_not_in_lexicon_lookup":
|
| 38 |
"candidate_source": "dataset",
|
| 39 |
-
"target_is_sense_class":
|
| 40 |
-
"dropped_and_right_by_default":
|
| 41 |
},
|
| 42 |
"val": {
|
| 43 |
-
"rows_in":
|
| 44 |
-
"rows_kept":
|
| 45 |
-
"dropped_below_min_candidates":
|
| 46 |
-
"gold_not_in_lexicon_lookup":
|
| 47 |
"candidate_source": "dataset",
|
| 48 |
-
"target_is_sense_class":
|
| 49 |
-
"dropped_and_right_by_default":
|
| 50 |
},
|
| 51 |
"ranking": {
|
| 52 |
-
"rows_in":
|
| 53 |
-
"rows_kept":
|
| 54 |
-
"dropped_below_min_candidates":
|
| 55 |
-
"gold_not_in_lexicon_lookup":
|
| 56 |
"candidate_source": "dataset",
|
| 57 |
-
"target_is_sense_class":
|
| 58 |
-
"dropped_and_right_by_default":
|
| 59 |
}
|
| 60 |
},
|
| 61 |
"train_metrics": {
|
| 62 |
-
"train_runtime":
|
| 63 |
-
"train_samples_per_second":
|
| 64 |
-
"train_steps_per_second": 2.
|
| 65 |
-
"train_loss": 0.
|
| 66 |
"epoch": 0.9997866894197952
|
| 67 |
},
|
| 68 |
"final_eval": {
|
| 69 |
-
"eval_loss": 0.
|
| 70 |
-
"eval_runtime": 4.
|
| 71 |
-
"eval_samples_per_second":
|
| 72 |
-
"eval_steps_per_second": 6.
|
| 73 |
"epoch": 0.9997866894197952,
|
| 74 |
-
"eval_top1": 0.
|
| 75 |
-
"eval_frequency_top1": 0.
|
| 76 |
-
"eval_mrr": 0.
|
| 77 |
},
|
| 78 |
"best_validation_top1": {
|
| 79 |
-
"step":
|
| 80 |
-
"top1": 0.
|
| 81 |
-
"frequency_top1": 0.
|
| 82 |
-
"mrr": 0.
|
| 83 |
},
|
| 84 |
-
"mean_tokens_per_second":
|
| 85 |
-
"final_model_dir": "/tmp/roshei-tevot-
|
| 86 |
-
"cuda_peak_memory_bytes":
|
| 87 |
},
|
| 88 |
-
"model_uri": "gs://sefaria-ml-models/roshei-tevot/runs/rt-numbers-
|
| 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 |
}
|