Text Classification
sentence-transformers
Safetensors
English
multilingual
bert
cross-encoder
reranker
ror
affiliation-matching
text-embeddings-inference
Run this model with HF Jobs
Run cometadata/ms-marco-ror-reranker on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/cometadata/ms-marco-ror-reranker. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/cometadata/ms-marco-ror-reranker on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use cometadata/ms-marco-ror-reranker with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use cometadata/ms-marco-ror-reranker with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("cometadata/ms-marco-ror-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
Upload folder using huggingface_hub
Browse filesFiles changed (8)
- README.mdAdded+65
- config.jsonAdded+35
- eval/CrossEncoderClassificationEvaluator_val_results.csvAdded+6
- model.safetensorsAdded+3
- special_tokens_map.jsonAdded+37
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+58
- vocab.txtAdded
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465---language:- en- multilinguallicense: apache-2.0tags:- cross-encoder- reranker- sentence-transformers- ror- affiliation-matchingbase_model: cross-encoder/ms-marco-MiniLM-L-12-v2datasets:- cometadata/ror-pipeline-tracespipeline_tag: text-classification---
# MS-MARCO MiniLM Reranker for ROR Affiliation Matching
A cross-encoder reranker fine-tuned for Research Organization Registry (ROR) affiliation matching.
## Model Description
This model is fine-tuned from `cross-encoder/ms-marco-MiniLM-L-12-v2` on ROR affiliation matching data.It reranks candidate ROR organizations given an affiliation string query.
## Training
- **Base model**: cross-encoder/ms-marco-MiniLM-L-12-v2- **Training examples**: 127,011- **Training traces**: 2,004- **Negative sampling**: Hard negatives from retrieval candidates- **Epochs**: 5- **Batch size**: 16- **Learning rate**: 2e-05- **Max sequence length**: 256
## Usage
```pythonfrom sentence_transformers import CrossEncoder
model = CrossEncoder("cometadata/ms-marco-ror-reranker")
# Score affiliation-candidate pairspairs = [ ["University of California, Berkeley", "University of California, Berkeley"], ["University of California, Berkeley", "University of California, Los Angeles"],]scores = model.predict(pairs)print(scores) # Higher score = better match```
## Intended Use
This model is designed for reranking ROR organization candidates in affiliation matching pipelines.It should be used after an initial retrieval step (e.g., dense retrieval with Snowflake Arctic).
## Training Data
Trained on traces from `cometadata/ror-pipeline-traces` (affrodb_s2aff_traces config).
## Timestamp
2026-01-07T02:10:33.651817+00:001234567891011121314151617181920212223242526272829303132333435{ "architectures": [ "BertForSequenceClassification" ], "attention_probs_dropout_prob": 0.1, "classifier_dropout": null, "dtype": "float32", "gradient_checkpointing": false, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 384, "id2label": { "0": "LABEL_0" }, "initializer_range": 0.02, "intermediate_size": 1536, "label2id": { "LABEL_0": 0 }, "layer_norm_eps": 1e-12, "max_position_embeddings": 512, "model_type": "bert", "num_attention_heads": 12, "num_hidden_layers": 12, "pad_token_id": 0, "position_embedding_type": "absolute", "sentence_transformers": { "activation_fn": "torch.nn.modules.linear.Identity", "version": "5.2.0" }, "transformers_version": "4.57.3", "type_vocab_size": 2, "use_cache": true, "vocab_size": 30522}123456epoch,steps,Accuracy,Accuracy_Threshold,F1,F1_Threshold,Precision,Recall,Average_Precision
1.0,7145,0.9849618140303913,3.103402,0.8828939301042306,1.4461942,0.9314359637774903,0.8391608391608392,0.9246121033789791
2.0,14290,0.9900795212975356,1.1970022,0.9252669039145908,1.1970022,0.9420289855072463,0.9090909090909091,0.968790857063443
3.0,21435,0.9933076135737343,0.2688725,0.9496743635287153,0.2688725,0.9651022864019254,0.9347319347319347,0.981994141242729
4.0,28580,0.9943311550271632,0.829528,0.9576968272620446,-1.8397098,0.9656398104265402,0.9498834498834499,0.9849315596449888
5.0,35725,0.9947248248169436,3.630054,0.9598562013181545,3.630054,0.9876695437731196,0.9335664335664335,0.9873970721484285123version https://git-lfs.github.com/spec/v1oid sha256:11073e87658df34d5ec27729a30ff9ed62e88154bd43285c34486344f0b185fbsize 13346483612345678910111213141516171819202122232425262728293031323334353637{ "cls_token": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "mask_token": { "content": "[MASK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "[PAD]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "sep_token": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "[UNK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758{ "added_tokens_decoder": { "0": { "content": "[PAD]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100": { "content": "[UNK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "101": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "102": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "103": { "content": "[MASK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "clean_up_tokenization_spaces": true, "cls_token": "[CLS]", "do_basic_tokenize": true, "do_lower_case": true, "extra_special_tokens": {}, "mask_token": "[MASK]", "model_max_length": 256, "never_split": null, "pad_token": "[PAD]", "sep_token": "[SEP]", "strip_accents": null, "tokenize_chinese_chars": true, "tokenizer_class": "BertTokenizer", "unk_token": "[UNK]"}README.mdAdded+65
config.jsonAdded+35
eval/CrossEncoderClassificationEvaluator_val_results.csvAdded+6
model.safetensorsAdded+3
special_tokens_map.jsonAdded+37
tokenizer.jsonAdded
tokenizer_config.jsonAdded+58
vocab.txtAdded