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
index built from the corrected lexicon (בשתי under ב', פקי"א and a dh leak under עכו"ם removed; same model); model card updated
Browse files- README.md +1 -2
- index/embeddings.npy +2 -2
- index/lexicon.json +0 -0
README.md
CHANGED
|
@@ -49,7 +49,7 @@ for t in rt.expand('אמר ר"ש בן לקיש בפ"ב דשבת, ובסק"ג כ
|
|
| 49 |
## Training and data
|
| 50 |
- Base `dicta-il/BEREL_3.0`; one epoch of 600,000 rows sampled from 1,062,365 (weight 1/count(key)^0.5, synthetic rows 0.5, sense balancing β 0.5); spot A100, Nov 25, 2026. Run `rt-numbers-v6-siamese-2026-11-25`. Code: `train-roshei-tevot` in Sefaria/ML-Workflows; this release is assembled by `app/roshei_tevot/publish_hf.py` there.
|
| 51 |
- Data: Sefaria's roshei tevot dataset (v6, 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_v6.sh` rebuilds it).
|
| 52 |
-
- v6 = v5b plus: 108 lexicon readings from two rounds of gap sweeps over the library; `בשני`
|
| 53 |
- `senses.json` also holds 405 readings that were added to the lexicon after the dataset's sense classes were built, merged into the class of their spelling variants (or into a new class of their own) after two rounds of independent model readers agreed; the other candidate merges (inflected forms and the like) were left separate.
|
| 54 |
|
| 55 |
## Evaluation (v6 splits; top-1 over rows with 2+ candidates and the label among them; prior weight 0.5)
|
|
@@ -63,7 +63,6 @@ Both models were scored on the same rows with the same code, v5b's index and v6'
|
|
| 63 |
Not measured on this revision: the comparison with Dicta (v4: 91.0% target accuracy on 500 held-out passages against Dicta's 58.0%).
|
| 64 |
|
| 65 |
## Known issues
|
| 66 |
-
- The lexicon still holds `פקי"א` = `פרק קי"א` (a citation pattern whose removal the build re-adds) and `בשתי` as a reading of `ב'`.
|
| 67 |
- Whether a token is an abbreviation at all is decided by `detect`, not the model; common words with a geresh can be offered readings.
|
| 68 |
- Candidates are the lexicon's: a reading it lacks cannot be chosen, and `test_unseen_keys` (abbreviations never seen in training) is the weak spot (89.6%).
|
| 69 |
- Rabbi names written as the same abbreviation (`ר"י`) remain the largest source of errors; a book table or the author's other works help only where the book's habit is stable.
|
|
|
|
| 49 |
## Training and data
|
| 50 |
- Base `dicta-il/BEREL_3.0`; one epoch of 600,000 rows sampled from 1,062,365 (weight 1/count(key)^0.5, synthetic rows 0.5, sense balancing β 0.5); spot A100, Nov 25, 2026. Run `rt-numbers-v6-siamese-2026-11-25`. Code: `train-roshei-tevot` in Sefaria/ML-Workflows; this release is assembled by `app/roshei_tevot/publish_hf.py` there.
|
| 51 |
- Data: Sefaria's roshei tevot dataset (v6, 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_v6.sh` rebuilds it).
|
| 52 |
+
- v6 = v5b plus: 108 lexicon readings from two rounds of gap sweeps over the library; `בשני`, `בשנים` and `בשתי` removed from the readings of `ב'` (they came from first-letter alignment: the key is the number two, and the prefixed forms are not readings of it), and `פקי"א` = `פרק קי"א` (a citation pattern) removed. The model was trained on the dataset built before these last removals took effect (a later build step had put three readings back); the `index/` here is built from the corrected lexicon with the same model. The hyperparameters and the training procedure are the same as v5b.
|
| 53 |
- `senses.json` also holds 405 readings that were added to the lexicon after the dataset's sense classes were built, merged into the class of their spelling variants (or into a new class of their own) after two rounds of independent model readers agreed; the other candidate merges (inflected forms and the like) were left separate.
|
| 54 |
|
| 55 |
## Evaluation (v6 splits; top-1 over rows with 2+ candidates and the label among them; prior weight 0.5)
|
|
|
|
| 63 |
Not measured on this revision: the comparison with Dicta (v4: 91.0% target accuracy on 500 held-out passages against Dicta's 58.0%).
|
| 64 |
|
| 65 |
## Known issues
|
|
|
|
| 66 |
- Whether a token is an abbreviation at all is decided by `detect`, not the model; common words with a geresh can be offered readings.
|
| 67 |
- Candidates are the lexicon's: a reading it lacks cannot be chosen, and `test_unseen_keys` (abbreviations never seen in training) is the weak spot (89.6%).
|
| 68 |
- Rabbi names written as the same abbreviation (`ר"י`) remain the largest source of errors; a book table or the author's other works help only where the book's habit is stable.
|
index/embeddings.npy
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a644f4960aa21f625f9d710db57eeca87f2d3b050da32b9d8d0ffd7752235a01
|
| 3 |
+
size 135086720
|
index/lexicon.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|