Run this model with HF Jobs
Run adambuttrick/funder-set-point-set-model-mmbert-base 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/adambuttrick/funder-set-point-set-model-mmbert-base. 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/adambuttrick/funder-set-point-set-model-mmbert-base 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 adambuttrick/funder-set-point-set-model-mmbert-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adambuttrick/funder-set-point-set-model-mmbert-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="adambuttrick/funder-set-point-set-model-mmbert-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("adambuttrick/funder-set-point-set-model-mmbert-base") model = AutoModel.from_pretrained("adambuttrick/funder-set-point-set-model-mmbert-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
funder-set-point-set-model-mmbert-base
This model is the Stage 2 packed set cross-encoder for funder-to-ROR set point matching. It reads a serialized funder query together with its candidate ROR v2.16 cards in one sequence and outputs a calibrated probability for each candidate.
Architecture and training
The model processes Modes 1 to 5 in one unified format with [TARGET], [SIBLINGS], [WORK], and [STATEMENT] sections:
- Mode 1
funder_string: focal funder name only. - Mode 2
funder_and_award: focal name plus funding scheme, award IDs, and award title. - Mode 3
assertion_set: Mode 2 plus sibling funder assertions on the same work. - Mode 4
work_metadata: Mode 3 plus work countries, author affiliations, and work title. - Mode 5
statement_and_assertions: Mode 4 plus the raw funding acknowledgment statement.
Each batch packs [CLS] query [SEP] card_1 [SEP] card_2 [SEP] ... up to 3,840 tokens total, with up to 384 tokens for the query and up to 64 tokens per card. An fp32 linear head scores the mean hidden state of each candidate's tokens, and Platt scaling with a = 0.651537 and b = -0.20716 maps raw logits to calibrated probabilities. Candidates with p >= 0.5 form the predicted ROR set, and an empty set indicates abstention.
Training runs in two stages on jhu-clsp/mmBERT-base:
- Stage 2A pretrains for 1 epoch on 148,210 rows combining 113,246 synthetic non-Latin funder queries and 34,964 calibrated StartLux-Decision-v1.1-27B-Instant teacher rows, with 75% card-ID dropout, mention masking, and 157 bare Mode 1 homonym collision packs labeled as full-set abstentions.
- Stage 2B runs 3-epoch 5-fold cross-validation across work clusters on 188,143 mode-exploded rows from 50,449 Layer-3-cleaned focal assertions to fit sample-weighted Platt calibration, then trains the final model for 3 epochs at
lr = 1.2e-5with mention masking and 75% card-ID dropout.
How to use
set_model.py runs standalone with torch, transformers, safetensors, and huggingface_hub. When record_texts is omitted, SetMatcher.from_pretrained automatically downloads and loads ror_v2_16/ror_cards.jsonl.gz.
import importlib.util
from huggingface_hub import hf_hub_download
path = hf_hub_download("adambuttrick/funder-set-point-set-model-mmbert-base", "set_model.py")
spec = importlib.util.spec_from_file_location("set_model", path)
set_model = importlib.util.module_from_spec(spec)
spec.loader.exec_module(set_model)
matcher = set_model.SetMatcher.from_pretrained("adambuttrick/funder-set-point-set-model-mmbert-base")
# Mode 1: funder name only
q1 = set_model.format_query("National Science Foundation")
# Mode 4: funder name with award, siblings, and work context
q4 = set_model.format_query(
name="NSFC",
award_ids=["62176001"],
siblings=["Ministry of Science and Technology of the People's Republic of China"],
work_countries=["CN"],
work_affiliations=["Tsinghua University"],
)
preds = matcher.predict([
(q1, ["https://ror.org/021nxhr62", "https://ror.org/01h0zpd94"]),
(q4, ["https://ror.org/01h0zpd94", "https://ror.org/021nxhr62"]),
])
print(preds)
Evaluation
All metrics come from evaluation/final_evaluation_scorecard.json using the frozen Stage 1 retriever pool and p >= 0.5. Values are percentages.
Main splits
| Split | Queries | Exact match | Precision | Recall | F1 | NIL FPR |
|---|---|---|---|---|---|---|
val |
4,209 | 96.82 | 97.97 | 97.73 | 97.85 | 7.67 |
test |
4,222 | 97.13 | 98.28 | 98.02 | 98.15 | 9.09 |
unseen_organizations overall |
7,934 | 95.10 | 96.39 | 95.95 | 96.17 | 9.09 |
unseen_organizations strict 2,886 unseen RORs |
6,812 | 95.79 | 97.84 | 95.95 | 96.89 | n/a |
benchmark_v2_16_aligned occurrence-weighted |
3,505 | 98.32 | 99.28 | 98.30 | 98.78 | 0.86 |
benchmark_v2_16_aligned unweighted |
3,505 | 88.90 | 86.93 | 92.36 | 89.56 | 12.00 |
Compared with v1_supervised in evaluation/comparison_v1_vs_v2_1_generalized.json, v2.1 raises exact match by 0.57 points on val, 0.45 points on test, and 0.68 points on unseen_organizations.
Modes 1 to 5
| Split | Mode | Queries | Exact match | Precision | Recall | F1 | NIL FPR |
|---|---|---|---|---|---|---|---|
val |
funder_string |
4,163 | 96.35 | 97.85 | 97.32 | 97.58 | 7.79 |
val |
funder_and_award |
4,202 | 95.69 | 98.02 | 96.42 | 97.21 | 7.29 |
val |
assertion_set |
3,247 | 96.67 | 97.98 | 97.45 | 97.72 | 6.31 |
val |
work_metadata |
3,763 | 97.32 | 98.32 | 98.05 | 98.18 | 6.01 |
val |
statement_and_assertions |
423 | 92.43 | 93.33 | 94.19 | 93.76 | 9.76 |
test |
funder_string |
4,180 | 96.84 | 97.90 | 98.11 | 98.01 | 9.00 |
test |
funder_and_award |
4,220 | 95.78 | 98.53 | 96.45 | 97.48 | 7.26 |
test |
assertion_set |
3,280 | 96.80 | 98.19 | 97.79 | 97.99 | 9.71 |
test |
work_metadata |
3,737 | 97.65 | 98.72 | 98.26 | 98.49 | 7.66 |
test |
statement_and_assertions |
436 | 93.35 | 95.45 | 95.17 | 95.31 | 8.80 |
unseen_organizations |
funder_string |
7,899 | 94.95 | 96.55 | 95.82 | 96.18 | 9.77 |
unseen_organizations |
funder_and_award |
7,923 | 94.84 | 96.80 | 95.23 | 96.01 | 7.11 |
unseen_organizations |
assertion_set |
6,294 | 94.58 | 95.61 | 95.67 | 95.64 | 9.27 |
unseen_organizations |
work_metadata |
7,683 | 95.30 | 96.40 | 96.15 | 96.28 | 9.26 |
unseen_organizations |
statement_and_assertions |
381 | 83.46 | 84.47 | 82.22 | 83.33 | 13.40 |
Stress slices
| Slice | Queries | Exact match | Precision | Recall | F1 | NIL FPR |
|---|---|---|---|---|---|---|
Non-Latin script val |
119 | 93.28 | 96.06 | 94.57 | 95.31 | 10.00 |
Non-Latin script test |
133 | 91.73 | 96.49 | 93.22 | 94.83 | 15.00 |
Non-Latin script unseen_organizations richest mode |
272 | 90.81 | 92.16 | 91.71 | 91.93 | 10.67 |
Non-Latin script unseen_organizations all modes |
491 | 89.41 | 90.96 | 89.66 | 90.30 | 10.00 |
Zhejiang NSF 04aqat463 val + test + unseen |
6 | 100.00 | 100.00 | 100.00 | 100.00 | n/a |
Zhejiang NSF 04aqat463 benchmark |
2 | 100.00 | 100.00 | 100.00 | 100.00 | n/a |
| 30 mainland provincial and municipal NILs val + test + unseen | 114 | 100.00 | 100.00 | 100.00 | 100.00 | 0.00 |
| 30 mainland provincial and municipal NILs benchmark unweighted | 75 | 100.00 | 100.00 | 100.00 | 100.00 | 0.00 |
Zero-implied-inference val |
39 | 100.00 | 100.00 | 100.00 | 100.00 | n/a |
Zero-implied-inference test |
43 | 97.67 | 97.67 | 97.67 | 97.67 | n/a |
Zero-implied-inference val + test |
82 | 98.78 | 98.78 | 98.78 | 98.78 | n/a |
Bare funding scheme NIL val + test |
373 | 95.44 | 0.00 | 100.00 | 0.00 | 4.56 |
| Bare funding scheme NIL benchmark occurrence-weighted | 935 | 99.59 | 0.00 | 100.00 | 0.00 | 0.41 |
Across all 114 val + test + unseen and 75 benchmark Chinese provincial and municipal NIL queries, NSFC 01h0zpd94 conflation weight is 0.
Files
| Path | Content |
|---|---|
config.json, model.safetensors, tokenizer files |
ModernBERT encoder weights and tokenizer |
head.safetensors |
fp32 linear scoring head |
set_model_config.json |
Token limits, Platt calibration parameters, and threshold |
set_model.py |
Standalone inference loader and format_query helper |
ror_v2_16/ror_cards.jsonl.gz |
Compact ROR v2.16 cards with 61 conflated FundRef IDs stripped |
logs/ |
train_stage2a_log.txt, stage2a_summary.json, and train_final_log.txt |
evaluation/ |
platt_params.json, final_evaluation_scorecard.json, and comparison_v1_vs_v2_1_generalized.json |
License and credits
Model weights derive from jhu-clsp/mmBERT-base under the MIT license. ROR v2.16 metadata is CC0. Teacher judgments come from StartLux-Decision-v1.1-27B-Instant by StartLux Labs.
- Downloads last month
- -
Model tree for adambuttrick/funder-set-point-set-model-mmbert-base
Base model
jhu-clsp/mmBERT-base