Instructions to use NYSgpt/nsr-reranker with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use NYSgpt/nsr-reranker with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("NYSgpt/nsr-reranker") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Notebooks
- Google Colab
- Kaggle
NSR Reranker
Cross-encoder reranking over nuclear-physics literature (277,068 Nuclear Science References).
- β
More than doubles top-1 on expert queries: re-scoring stock
bge-m3's top-50, R@1 0.080 β 0.180 (2.25Γ), nDCG@10 +76%. - β Recovers 97% of what the pool contains: those 50 candidates hold the right paper 24.9% of the time; this model surfaces it into the top ten 24.2% of the time.
- β Better on every segment β all 8 segments, both query families, on R@10 and nDCG@10 (pre-registered gate, passed).
- β
Drop-in: standard
sentence-transformersCrossEncoder, 149M parameters, Apache-2.0.
A 149M cross-encoder fine-tuned from
Alibaba-NLP/gte-reranker-modernbert-base
on expert-written queryβpaper groups from the NSR corpus. Takes (query, document),
returns a relevance logit. Second stage over any dense or hybrid top-K.
Second stage of a two-stage stack β pair it with the NSR Encoder for best results.
Details
| Property | nsr-reranker |
|---|---|
| Type | Cross-encoder (pointwise reranker) |
| Total parameters | 149M |
| Backbone | Alibaba-NLP/gte-reranker-modernbert-base (ModernBERT) |
| Output | Single relevance logit per (query, document) pair |
| Context | 8,192 tokens native; trained and served at 256 |
| Training signal | 39.6k expert queryβpaper groups, 7 hard negatives each |
| Built for | Second-stage reranking of nuclear-physics search results |
| Pair with | NSR Encoder (first stage) |
| License | Apache-2.0 |
Performance
Expert keyword queries (KW, n = 4,998) β an NSR indexer's structured keyword
abstract as the query. Benchmark NSR Eval,
frozen before any training, split by paper; candidate pools retrieved against all
277,068 documents.
What the second stage buys β stock bge-m3's top-50, before and after this model:
| Metric | Pool alone | + this reranker | Ξ |
|---|---|---|---|
| R@1 | 0.080 | 0.180 | +125% |
| R@10 | 0.171 | 0.241 | +41% |
| nDCG@10 | 0.121 | 0.213 | +76% |
By segment β nDCG@10, the same top-50 before and after:
| Segment | n | Pool alone | + this reranker | Ξ |
|---|---|---|---|---|
| title-only documents | 4,141 | 0.085 | 0.167 | +96% |
| has-abstract documents | 857 | 0.296 | 0.436 | +47% |
| pre-1970 | 602 | 0.045 | 0.107 | +137% |
| 1970β1999 | 2,686 | 0.105 | 0.197 | +89% |
| 2000+ | 1,710 | 0.174 | 0.274 | +58% |
| journal articles | 4,250 | 0.129 | 0.221 | +71% |
| other reference types | 748 | 0.075 | 0.165 | +119% |
EXFOR queries (EX, n = 4,997) β on an already-saturated pool it still moves R@1
from 0.871 to 0.927 (nDCG@10 0.878 β 0.912) and is the strongest arm outright.
Ceiling. A reranker cannot retrieve what its candidate list does not contain. The pool measured here contains the answer 24.9% of the time; in production this model sits over RRF(FTS + NSR Encoder), whose top-50 contains it 65.6% of the time.
Training
| Objective | grouped cross-entropy β 1 positive vs 7 hard negatives per group |
| Groups | 39,600 β NSR keyword-abstract and EXFOR queries; positive = the annotated paper |
| Negatives | mined from the retrieval space itself (base-model kNN + a lexical arm), not sampled at random |
| Epochs / max length / lr | 2 / 256 / 2e-5 |
| Hardware / wall-clock | 1Γ NVIDIA L40S (g6e.xlarge) Β· 42.6 min |
| Run | 20260817-032126-train Β· 2026-08-17 |
Split by paper; every benchmark paper is excluded as a query source and positive.
How to run
from sentence_transformers import CrossEncoder
ce = CrossEncoder("NYSgpt/nsr-reranker", max_length=256)
ce.predict([("92Zr(n,Ξ³) cross section",
"Neutron capture cross sections of 92Zr and their astrophysical implications ...")])
Retrieve a top-50 with the NSR Encoder, re-score with this model, serve the reordered list.
π¬ Contact
Questions, results, or a use case to share? Open a discussion in the Community tab.
Citation
@misc{nsrreranker2026,
title = {NSR Reranker: a cross-encoder for the Nuclear Science References corpus},
author = {NYSgpt},
year = {2026},
url = {https://huggingface.co/NYSgpt/nsr-reranker}
}
- Downloads last month
- 14
Model tree for NYSgpt/nsr-reranker
Base model
answerdotai/ModernBERT-base