Downloads · 30 days
3
6% of all-time downloads
alexgoldberg/hallelubert-multi-entity-ner-hebrew-manuscripts
hallelubert-multi-entity-ner-hebrew-manuscripts is a machine learning model from alexgoldberg. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Model: alexgoldberg/hallelubert-multi-entity-ner-hebrew-manuscripts
Downloads · 30 days
3
6% of all-time downloads
All-time downloads
52
Public
Parameters
356M
4.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt2.8 GB · 67%
From the Hugging Face model README
Model: alexgoldberg/hallelubert-multi-entity-ner-hebrew-manuscripts
State-of-the-art Named Entity Recognition model for extracting person names from Hebrew manuscript catalogs. Handles 1-10 person entities per text.
Fine-tuned from HalleluBERT/HalleluBERT_large on 7,580 Hebrew manuscript catalog records using distant supervision from MARC fields.
Key Features:
Architecture: RoBERTa-large (355M parameters)
Test Set: 765 samples (87 multi-person, 678 single-person)
| Metric | Score |
|---|---|
| F1 | 88.71% ⭐ |
| Precision | 87.77% |
| Recall | 89.68% |
Comparison to Baselines:
Multi-Entity Performance (115 test persons):
from transformers import AutoTokenizer, AutoModelForTokenClassification
import torch
# Load model and tokenizer
model_name = "alexgoldberg/hallelubert-multi-entity-ner-hebrew-manuscripts"
tokenizer = AutoTokenizer.from_pretrained("HalleluBERT/HalleluBERT_large", add_prefix_space=True)
model = AutoModelForTokenClassification.from_pretrained(model_name)
# Example text (may contain multiple persons)
text = "נכתב על ידי משה בן יעקב והעתיק דוד בן שמואל"
tokens = text.split()
# Tokenize
inputs = tokenizer(
tokens,
is_split_into_words=True,
return_tensors="pt",
padding=True,
truncation=True
)
# Predict
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.argmax(outputs.logits, dim=2)[0]
# Extract persons
word_ids = inputs.word_ids()
persons = []
current_person = []
for i, word_id in enumerate(word_ids):
if word_id is not None and word_id < len(tokens):
label = model.config.id2label[predictions[i].item()]
if label == 'B-PERSON':
if current_person:
persons.append(' '.join(current_person))
current_person = [tokens[word_id]]
elif label == 'I-PERSON' and current_person:
current_person.append(tokens[word_id])
elif label == 'O' and current_person:
persons.append(' '.join(current_person))
current_person = []
if current_person:
persons.append(' '.join(current_person))
print(f"Found {len(persons)} person(s):")
for person in persons:
print(f" - {person}")
# Output:
# Found 2 person(s):
# - משה בן יעקב
# - דוד בן שמואל
Source: 123,621 MARC records from Hebrew manuscript catalogs
Method: Distant Supervision
Dataset Composition:
Data Optimization:
Hyperparameters:
Hardware: Apple M1 Mac with MPS acceleration (36GB memory)
Training time: ~30 minutes
Optimization techniques:
Test set composition:
Overall results:
Single-person performance (estimated):
Multi-person performance (estimated):
Primary use cases:
Supported scenarios:
Input requirements:
Domain specificity: Optimized for manuscript catalog notes. May underperform on:
Name types: Trained primarily on person names. Not optimized for:
Sequence length: Best performance on sequences <100 tokens. Longer sequences may:
Multi-entity limitations:
Language mixing: While handles Hebrew-Latin mixing, performance may vary on:
Historical bias: Training data reflects historical manuscript collections, which may:
Name bias: Model may perform better on:
Language bias: Best performance on Hebrew text. Latin names (censors) perform well but other languages less tested.
Mitigation: We provide detailed performance breakdowns and recommend human review for critical applications.
If you use this model, please cite:
@article{goldberg2025multientity,
title={Multi-Entity Named Entity Recognition and Role Classification for Hebrew Manuscripts Using Distant Supervision},
author={Goldberg, Alexander},
journal={arXiv preprint arXiv:XXXX.XXXXX},
year={2025},
url={https://huggingface.co/alexgoldberg/hallelubert-multi-entity-ner-hebrew-manuscripts}
}
And the base model:
@misc{hallelubert2024,
title={HalleluBERT: Let every token that has meaning bear its weight},
author={Scheible-Schmitt, Raphael},
year={2024}
}
For questions, issues, or collaboration:
v1.0 (November 2025):