Downloads · 30 days
13
27% of all-time downloads
BYU-Idaho/ZaraRerank
ZaraRerank is a text ranking model from BYU-Idaho. Use it for the text ranking task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
A cross-encoder reranker for the Standard Works of The Church of Jesus Christ of Latter-day Saints. Paired with ZaraEmbed, it puts the right verse first for 243 of 289 held-out Restoration-scripture questions, where O…
Downloads · 30 days
13
27% of all-time downloads
All-time downloads
48
Public
Parameters
357M
1.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.4 GB · 100%
From the Hugging Face model README
A cross-encoder reranker for the Standard Works of The Church of Jesus Christ of Latter-day Saints. Paired with ZaraEmbed, it puts the right verse first for 243 of 289 held-out Restoration-scripture questions, where OpenAI's embedder manages 126. ZaraRerank reads the question and a candidate verse together and scores how well the verse answers it. It is ZaraBERTa fine-tuned as a reranker for ZaraEmbed's top 100 candidates.
Trained by Brigham Young University-Idaho on public-domain text. Chapter headings, footnotes and Church study aids were not used.
Part of ZaraAI, BYU-Idaho's scripture-native model collection:
| Model | Role |
|---|---|
| BYU-Idaho/ZaraBERTa | Cased, scripture-native language model (the base for both below) |
| BYU-Idaho/ZaraEmbed | Verse embedder: question to verse retrieval |
| BYU-Idaho/ZaraRerank | Cross-encoder reranker for ZaraEmbed's top 100 (this model) |
These models are released for research on scripture and on domain-specific language models. They are also released as aids for personal scripture study. They are offered in the hope that they help readers find and understand the Book of Mormon, and come unto Christ.
The held-out tests use 289 verses from 37 Book of Mormon, D&C and Pearl of Great Price chapters that no training pair touched. A separate language model, not one used for the training questions, wrote one question per verse in two styles, and the same 289 verses appear in both tests:
Right verse first (top-1). The comparison is the full ZaraEmbed + ZaraRerank pipeline against OpenAI text-embedding-3-large alone, on bare verse text:
| Test | ZaraEmbed alone | ZaraEmbed + ZaraRerank | OpenAI text-embedding-3-large |
|---|---|---|---|
| no-names (289) | 191 | 243 (84%) | 126 (44%) |
| story (289) | 175 | 222 (77%) | 143 (49%) |
On no-names, the pipeline's lead over OpenAI is significant at McNemar p = 2e-26.
Reranking lifts ZaraEmbed's own top-1 by 52 questions on no-names and 47 on story.
The 152-question benchmark holds human-written study questions across all five volumes. On its Book of Mormon, D&C and Pearl of Great Price questions, the pipeline moves ahead of OpenAI; across all five volumes, OpenAI still leads:
| Benchmark | ZaraEmbed + ZaraRerank | OpenAI, bare verses | OpenAI, with chapter context |
|---|---|---|---|
| Book of Mormon, D&C, Pearl of Great Price (63) | 47 | 38 | 41 |
| All five volumes (152) | 98 | 108 | 120 |
On the 63 Restoration questions, reranking lifts ZaraEmbed from 36 to 47; the lead over OpenAI with chapter context (47 vs 41) is not significant (p = 0.21).
Scoring 100 candidates takes about 0.23 s per question on an NVIDIA GB10 GPU.
AutoModelForSequenceClassification with a single logit; a higher logit means a more relevant verse.
Prefix both the question and the verse with a single space, and truncate only the verse, at 128 tokens
total.
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tok = AutoTokenizer.from_pretrained("BYU-Idaho/ZaraRerank")
model = AutoModelForSequenceClassification.from_pretrained("BYU-Idaho/ZaraRerank").eval()
question = "Why does helping other people count as serving God?"
candidates = [
"And behold, I tell you these things that ye may learn wisdom; that ye may learn that when ye are in the service of your fellow beings ye are only in the service of your God.", # Mosiah 2:17
"Behold, ye have called me your king; and if I, whom ye call your king, do labor to serve you, then ought not ye to labor to serve one another?", # Mosiah 2:18
]
batch = tok([" " + question] * len(candidates), [" " + v for v in candidates],
truncation="only_second", max_length=128, padding=True, return_tensors="pt")
with torch.no_grad():
scores = model(**batch).logits.squeeze(-1)
print(scores.tolist())
# [10.163, -1.638] -> Mosiah 2:17 ranks above its same-chapter neighbour 2:18 (observed on CPU)
In a search pipeline, retrieve the top 100 verses with ZaraEmbed, score each with ZaraRerank, and sort by logit.
reranker.json records the training settings.Base model roberta-large by Meta AI, MIT license, through ZaraBERTa; that notice applies to any
redistribution of these weights. Training text: public-domain editions of the Old Testament, New
Testament, Book of Mormon, Doctrine and Covenants and Pearl of Great Price. Training questions were
generated by language models over that text. Chapter headings, footnotes and Church study aids were not
used. Trained and evaluated by Brigham Young University-Idaho, 2026. Released as open weights under the MIT
license.
All pipeline numbers are for ZaraEmbed + ZaraRerank compared with OpenAI's embedder alone.
@misc{zararerank2026,
title = {ZaraRerank: a scripture-native cross-encoder reranker for the Standard Works},
author = {Vallejo, Ron and Brigham Young University-Idaho},
year = {2026},
url = {https://huggingface.co/BYU-Idaho/ZaraRerank}
}