|
|
--- |
|
|
library_name: sentence-transformers |
|
|
pipeline_tag: sentence-similarity |
|
|
tags: |
|
|
- sentence-transformers |
|
|
- biblical-search |
|
|
- semantic-search |
|
|
- embeddinggemma |
|
|
- fine-tuned |
|
|
license: apache-2.0 |
|
|
datasets: |
|
|
- biblical-text-pairs |
|
|
metrics: |
|
|
- accuracy@1: 12.00% |
|
|
- accuracy@3: 15.00% |
|
|
- accuracy@10: 31.00% |
|
|
language: |
|
|
- en |
|
|
--- |
|
|
|
|
|
# EmbeddingGemma-300M Fine-tuned for Biblical Text Search |
|
|
|
|
|
This model is a fine-tuned version of [google/embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m) specialized for biblical text search and retrieval. |
|
|
|
|
|
## Model Performance |
|
|
|
|
|
- **Accuracy@1**: 12.00% (13x improvement over base model) |
|
|
- **Accuracy@3**: 15.00% |
|
|
- **Accuracy@10**: 31.00% |
|
|
- **Training Steps**: 25 (optimal stopping point) |
|
|
- **Base Model Accuracy@1**: 0.91% |
|
|
|
|
|
## Usage |
|
|
|
|
|
```python |
|
|
from sentence_transformers import SentenceTransformer |
|
|
|
|
|
# Load the model |
|
|
model = SentenceTransformer('dpshade22/embeddinggemma-scripture-v1') |
|
|
|
|
|
# Encode queries (use search_query: prefix) |
|
|
query = "search_query: What is love?" |
|
|
query_embedding = model.encode([query]) |
|
|
|
|
|
# Encode documents (use search_document: prefix) |
|
|
document = "search_document: Love is patient and kind" |
|
|
doc_embedding = model.encode([document]) |
|
|
``` |
|
|
|
|
|
## Prefixes |
|
|
|
|
|
For optimal performance, use these prefixes: |
|
|
|
|
|
- **Queries**: `"search_query: your question here"` |
|
|
- **Documents**: `"search_document: scripture text here"` |
|
|
|
|
|
## Training Details |
|
|
|
|
|
- **Training Data**: 26,276 biblical text pairs |
|
|
- **Learning Rate**: 2.0e-04 |
|
|
- **Batch Size**: 8 |
|
|
- **Training Strategy**: Early stopping at 25 steps to prevent overfitting |
|
|
- **Output Dimensions**: 768D (supports Matryoshka 384D, 128D) |
|
|
|
|
|
## Intended Use |
|
|
|
|
|
This model is designed for: |
|
|
- Biblical text search and retrieval |
|
|
- Finding relevant scripture passages |
|
|
- Semantic similarity of religious texts |
|
|
- Question answering on biblical topics |
|
|
|