File size: 1,463 Bytes
52dc2fd 7621dca b21681a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
---
{}
---
# chiliground-base-modernbert-v1
A sentence classification model for extracting relevant spans from documents based on a question.
## Model Details
- Base model: answerdotai/ModernBERT-base
- Hidden dimension: 768
- Number of labels: 2
- Best validation F1: 0.7038
- Saved on: 2025-03-29 19:17:14
## Usage
```python
from transformers import AutoTokenizer
from verbatim_rag.extractor_models.model import QAModel
from verbatim_rag.extractors import ModelSpanExtractor
from verbatim_rag.document import Document
# Initialize the extractor
extractor = ModelSpanExtractor(
model_path="chiliground-base-modernbert-v1",
threshold=0.5
)
# Create documents
documents = [
Document(
content="Climate change is a significant issue. Rising sea levels threaten coastal areas.",
metadata={"source": "example"}
)
]
# Extract relevant spans
question = "What are the effects of climate change?"
results = extractor.extract_spans(question, documents)
# Print the results
for doc_content, spans in results.items():
for span in spans:
print(f"- {span}")
```
## Training Data
This model was trained on a QA dataset to classify sentences as relevant or not relevant to a given question.
## Limitations
- The model works at the sentence level and may miss relevant spans that cross sentence boundaries
- Performance depends on the quality and relevance of the training data
- The model is designed for English text only
|