CoolFace
Modelpublic

LoveJesus/topical-passage-classifier-chirho

sourceHugging Facemitupdated 7mo agoView on Hugging Face
0likes90downloads
Model Card

Biblical Topical Search - Chirho

Semantic search model for finding biblical passages by topic. Fine-tuned on Nave's Topical Bible (30,000+ entries) and Treasury of Scripture Knowledge cross-references to retrieve relevant KJV verses for any theological query.

Model Details

  • Base Model: sentence-transformers/all-MiniLM-L12-v2 (33M params, 384-dim)
  • Training Data: 136,000 query-passage pairs from Nave's Topical Bible + TSK
  • Loss: MultipleNegativesRankingLoss
  • Training: 5 epochs, batch 16, lr 2e-5, cosine scheduler
  • Hardware: Apple M4 Pro (MPS), ~2 hours

Metrics (v2 - MiniLM-L12-v2 upgrade)

Metricv1 (L6-v2)v2 (L12-v2)Change
NDCG@100.16760.1831+9.3%
Accuracy@100.28820.3188+10.6%
MRR@100.13050.1415+8.4%
MAP@100.13050.1415+8.4%

Training Trajectory (v2)

EpochNDCG@10Accuracy@10
10.15140.257
20.16540.286
30.17490.302
40.17950.313
50.18310.319

Usage

python
from sentence_transformers import SentenceTransformer
import numpy as np

model = SentenceTransformer("LoveJesus/biblical-topical-search-chirho")

query = "What does the Bible say about forgiveness?"
verses = [
    "For if ye forgive men their trespasses, your heavenly Father will also forgive you. - Matthew 6:14",
    "In the beginning God created the heaven and the earth. - Genesis 1:1",
    "As far as the east is from the west, so far hath he removed our transgressions from us. - Psalm 103:12",
]

query_emb = model.encode([query])
verse_embs = model.encode(verses)

scores = np.dot(verse_embs, query_emb.T).flatten()
ranked = sorted(zip(scores, verses), reverse=True)
for score, verse in ranked:
    print(f"  {score:.3f}: {verse}")

Part of Bible.Systems

This model is part of the Bible.Systems AI models project — open-source machine learning for biblical scholarship.