LoveJesus commited on
Commit
6d9982e
·
verified ·
1 Parent(s): d8fccba

Add model card

Browse files
Files changed (1) hide show
  1. README.md +80 -0
README.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: mit
4
+ tags:
5
+ - text-classification
6
+ - bible
7
+ - cross-reference
8
+ - intertextuality
9
+ - roberta
10
+ pipeline_tag: text-classification
11
+ library_name: transformers
12
+ base_model: roberta-base
13
+ datasets:
14
+ - LoveJesus/intertextual-dataset-chirho
15
+ ---
16
+
17
+ # Intertextual Classifier (RoBERTa-base) - chirho
18
+
19
+ *For God so loved the world that he gave his only begotten Son, that whoever believes in him should not perish but have eternal life. - John 3:16*
20
+
21
+ ## Description
22
+
23
+ A RoBERTa-base model fine-tuned for **classifying the type of connection** between pairs of Bible verses. Given two verses (as a sentence pair), it predicts one of 7 connection types.
24
+
25
+ ## Connection Types
26
+
27
+ | Label | Description | Example |
28
+ |-------|-------------|---------|
29
+ | `direct_quote` | NT directly quotes OT | Mt 1:23 quotes Is 7:14 |
30
+ | `allusion` | Clear reference without direct quotation | Rev 5:5 alludes to Gen 49:9 |
31
+ | `thematic_parallel` | Shared theme or motif | Ps 23 parallels Jn 10 |
32
+ | `typological` | OT type foreshadows NT antitype | Isaac sacrifice prefigures Christ |
33
+ | `prophecy_fulfillment` | OT prophecy fulfilled in NT | Is 53 in Passion narratives |
34
+ | `parallel_narrative` | Same event in parallel accounts | Synoptic parallels |
35
+ | `contrast` | Deliberate theological contrast | Adam vs Christ (Rom 5) |
36
+
37
+ ## Training
38
+
39
+ - **Base model**: roberta-base
40
+ - **Task**: Single-label classification (7 classes)
41
+ - **Data**: 28,612 Grok-labeled cross-reference pairs (class-weighted loss for imbalance)
42
+ - **Epochs**: 8 (early stopping patience=3)
43
+ - **Batch size**: 16
44
+ - **Device**: Apple MPS (M4 Pro)
45
+
46
+ ## Evaluation (Test Set)
47
+
48
+ - **F1 macro**: 0.42 | **Accuracy**: 70% | **Weighted F1**: 0.72
49
+
50
+ | Class | Precision | Recall | F1 |
51
+ |-------|-----------|--------|-----|
52
+ | thematic_parallel | 0.91 | 0.76 | **0.83** |
53
+ | direct_quote | 0.48 | 0.66 | **0.56** |
54
+ | typological | 0.28 | 0.52 | **0.37** |
55
+ | parallel_narrative | 0.26 | 0.55 | **0.36** |
56
+ | prophecy_fulfillment | 0.30 | 0.44 | **0.35** |
57
+ | allusion | 0.28 | 0.27 | **0.28** |
58
+ | contrast | 0.13 | 0.24 | **0.17** |
59
+
60
+ *Note: Class imbalance (75.9% thematic_parallel) limits macro F1. Weighted F1 of 0.72 better reflects practical performance.*
61
+
62
+ ## Usage
63
+
64
+ ```python
65
+ from transformers import pipeline
66
+
67
+ classifier = pipeline("text-classification", model="LoveJesus/intertextual-classifier-chirho")
68
+
69
+ result = classifier({
70
+ "text": "Therefore the Lord himself shall give you a sign; Behold, a virgin shall conceive",
71
+ "text_pair": "Now all this was done, that it might be fulfilled which was spoken of the Lord by the prophet"
72
+ })
73
+ # → prophecy_fulfillment
74
+ ```
75
+
76
+ ## Part of models-chirho
77
+
78
+ Paired with [LoveJesus/intertextual-embedder-chirho](https://huggingface.co/LoveJesus/intertextual-embedder-chirho) for full cross-reference discovery.
79
+
80
+ Built with love for Jesus by [loveJesus](https://huggingface.co/LoveJesus).