Views
No views yet
answerdotai/ModernBERT-base and adds a linear head that scores each document
token for relevance to a paired query. Token scores are pooled over document
units such as sentences, tables, and code blocks to decide which context to
keep.(query, document) pair with a maximum sequence length of 8192
tokens. The production runtime handles unit segmentation, long-document
windowing, score pooling, and thresholding.| Metric | Value |
|---|---|
| Token ranking AUC | 0.9408 |
| Recall at k | 0.6889 |
Unit F1 (token_threshold=0.3, sentence_threshold=0.5) | 0.5874 |
| Unit precision | 0.5940 |
| Unit recall | 0.5809 |
| Unit keep rate | 0.0534 |
model.pt. Use the included loader after downloading the repository:1import torch
2from huggingface_hub import snapshot_download
3
4model_dir = snapshot_download("gziz/snippet-extraction")
5
6import sys
7sys.path.insert(0, model_dir)
8from load_model import load_model
9
10model, tokenizer = load_model(model_dir)
11inputs = tokenizer(
12 "What is retrieval-augmented generation?",
13 "Retrieval-augmented generation gives an LLM external context.",
14 return_tensors="pt",
15)
16with torch.no_grad():
17 token_logits = model(**inputs)
18 token_probabilities = token_logits.sigmoid()snippets_runtime from the source
repository with this downloaded checkpoint directory.answerdotai/ModernBERT-base