Multilingual funding extraction with Inkling 2 Mini
This model extracts funders, award IDs, funding schemes and award titles from scholarly funding statements. It accepts a standalone statement or a passage with surrounding text and returns the awards associated with each funder.
The trained LoRA is also available as a separate adapter for the original Inkling 2 Mini base. PEFT adapter
Example
The multilingual funding extractor processed the following held-out arXiv statement. The award ID stays a string, preserving its leading zero.
RLK, TD and JG were partially supported by NSF 0856285.
[
{
"funder_name": "NSF",
"awards": [
{
"award_ids": [
"0856285"
],
"funding_scheme": [],
"award_title": []
}
]
}
]
Each award belongs to a funder and can have more than one identifier, scheme or title. Empty arrays indicate missing values. The schema permits a null funder name when the source gives an award without attributing it to an organization.
Run with vLLM
This standalone checkpoint includes the tokenizer, chat template and merged funding-extraction weights. The release was tested on one NVIDIA RTX PRO 6000 with vLLM 0.34.1rc1.dev353+g94e09ea83. Start the OpenAI-compatible server with the tested image.
docker run --rm --gpus all --ipc=host -p 127.0.0.1:8000:8000 \
-v "$HOME/.cache/huggingface:/root/.cache/huggingface" \
vllm/vllm-openai@sha256:3f80650e404965216b36042caca709598d4163342366d86c4247a06541eca81d \
cometadata/funding-extraction-inkling-2-mini-artifact-data-mix-grpo-mixed-reward-multiformat-multilingual \
--served-model-name funding --reasoning-parser inkling --max-model-len 8192 \
--max-num-seqs 24 --enforce-eager --language-model-only
Use greedy decoding and set thinking effort to zero. Pass the exact award identifier through as a string.
import json
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="local")
system = 'You are an expert at extracting structured funding metadata from academic papers. Given a funding statement, extract all funders and their associated awards. Return a JSON array of funder objects. Each funder has:\n- "funder_name": string or null\n- "awards": array of objects with "award_ids" (array of strings), "funding_scheme" (array of strings), and "award_title" (array of strings)\nReturn ONLY the JSON array, no other text.'
statement = "RLK, TD and JG were partially supported by NSF 0856285."
messages = [
{"role": "system", "content": system},
{"role": "user", "content": "Extract funding information from the following statement:\n\n" + statement},
]
response = client.chat.completions.create(
model="funding",
messages=messages,
temperature=0,
max_tokens=2048,
extra_body={"chat_template_kwargs": {"reasoning_effort": "none"}},
)
print(json.loads(response.choices[0].message.content))
The export merges all 217 LoRA updates from Tinker into the public Inkling 2 Mini base. Attention and output weights use BF16. Routed expert weights use MXFP8 so the updates do not have to be rounded back to four bits. Base checkpoint · Original Tinker adapter
For comparisons with a Tinker run, install tml-renderers==0.4.2 in your vLLM Python environment. This example reuses the messages above and passes native token IDs to vLLM.
from tml_renderers.chat import OpenAIMessage, Text
from tml_renderers.renderers import Inkling2
from vllm import LLM, SamplingParams
spans, parser = Inkling2(effort=0.0).render_for_completion(
OpenAIMessage.from_openai_chat_dicts(messages)
)
prompt_ids = [token for span in spans for token in span.span.tokens]
llm = LLM(model="cometadata/funding-extraction-inkling-2-mini-artifact-data-mix-grpo-mixed-reward-multiformat-multilingual", language_model_only=True,
enforce_eager=True, max_model_len=8192, max_num_seqs=24)
params = SamplingParams(temperature=0, seed=42, max_tokens=2048, stop_token_ids=[200006])
sample = llm.generate([{"prompt_token_ids": prompt_ids}], params)[0].outputs[0]
if sample.finish_reason != "stop":
raise ValueError("Incomplete funding extraction")
ids = list(sample.token_ids)
if ids[-1:] != [200006]:
ids.append(200006)
answer = next(m.content.text for m in parser.parse_tokens(ids) if isinstance(m.content, Text))
print(json.loads(answer))
Training
The training set combined degraded funding statements, passages with context, synthetic examples in three formats and examples of award-to-funder assignments. Removing 6,870 duplicate input-and-target pairs left 21,152 training and validation examples. Source IDs, DOIs, OpenAlex work IDs and normalized passage text kept related examples in the same partition. No training group overlapped a test group in the pinned revision. The model saw training examples in 19 languages. Dataset snapshot
| Stage | Training examples | Validation examples | Updates |
|---|---|---|---|
| Supervised fine-tuning, two epochs | 13,366 | 1,448 | 210 |
| GRPO, one epoch | 4,239 | 2,099 | 265 |
GRPO started from the supervised adapter and used it as the KL reference. It sampled eight answers per training prompt with a 12,288-token output limit. The multilingual checkpoint was selected by validation reward (0.9277). The training service ID was thinkingmachines/Inkling-2-Mini:peft:65536:free. The native adapter configuration records rank 64, alpha 32 and zero dropout. Both stages reported zero training-token charges on the free tier.
Held-out evaluation
The tables compare the published multilingual model running in vLLM with the original funding extractor running on Tinker. Both used the same 4,543 test rows, extraction instructions, zero thinking effort, greedy decoding and 12,288-token output limit. Each cell shows the multilingual model’s micro-F1 (%) and its change from the original extractor in percentage points. Original funding extractor
The three main test suites share 762 held-out works. The arXiv suite contains 300 passages from 239 DOI groups. Pooled scores include each presentation of a shared work.
Balanced scoring
Balanced matching accounts for acronym expansions and differences in name length.
| Test split | Rows | Funder | Award ID | Scheme | Award title |
|---|---|---|---|---|---|
| degraded/test | 2050 | 92.18 (+1.11) | 88.01 (+3.21) | 72.01 (+6.76) | 61.80 (+28.74) |
| with_context/test | 1084 | 91.49 (+3.17) | 89.87 (+6.61) | 76.49 (+13.68) | 72.20 (+34.67) |
| bare/test | 1109 | 91.27 (+2.45) | 87.47 (+5.04) | 69.91 (+14.52) | 49.19 (+23.56) |
| bare/arxiv_test | 300 | 93.38 (+0.79) | 92.92 (+1.56) | 73.15 (+2.77) | 65.26 (+22.02) |
Permissive scoring
Permissive matching accepts partial-name and token-set matches.
| Test split | Rows | Funder | Award ID | Scheme | Award title |
|---|---|---|---|---|---|
| degraded/test | 2050 | 92.92 (+1.11) | 87.57 (+2.61) | 75.78 (+5.10) | 63.67 (+27.56) |
| with_context/test | 1084 | 92.23 (+2.76) | 89.56 (+5.84) | 80.14 (+10.77) | 73.36 (+31.88) |
| bare/test | 1109 | 92.21 (+2.01) | 87.32 (+4.38) | 72.69 (+11.52) | 49.84 (+22.11) |
| bare/arxiv_test | 300 | 94.32 (+0.45) | 91.15 (+0.96) | 73.93 (+0.97) | 67.37 (+24.13) |
Strict scoring
Strict matching uses token-sort similarity.
| Test split | Rows | Funder | Award ID | Scheme | Award title |
|---|---|---|---|---|---|
| degraded/test | 2050 | 89.18 (+1.85) | 86.04 (+3.55) | 64.77 (+8.01) | 58.25 (+27.69) |
| with_context/test | 1084 | 89.19 (+4.21) | 88.37 (+7.18) | 71.20 (+15.30) | 67.95 (+34.37) |
| bare/test | 1109 | 88.41 (+3.86) | 85.14 (+5.85) | 66.06 (+16.56) | 47.23 (+25.80) |
| bare/arxiv_test | 300 | 89.19 (+1.36) | 89.68 (+2.12) | 66.93 (+4.27) | 61.05 (+20.51) |
Comparison with the multilingual Tinker checkpoint
The Tinker checkpoint used to make this release and the published weights agreed on all normalized fields on 3,774 of 4,543 rows. The vLLM run returned schema-valid JSON on 4,541 rows. One generation reached the output limit. The table pools the four suites and shows vLLM micro-F1 (%) with its change from Tinker in percentage points.
| Matching | Funder | Award ID | Scheme | Award title |
|---|---|---|---|---|
| Balanced | 91.86 (+0.26) | 88.50 (+0.13) | 72.65 (+1.08) | 60.87 (+1.00) |
| Permissive | 92.65 (+0.21) | 88.10 (+0.19) | 76.07 (+0.92) | 62.24 (-0.41) |
| Strict | 89.00 (+0.34) | 86.50 (+0.32) | 66.71 (+0.72) | 57.57 (+1.04) |
The published tokenizer and Tinker produced different input token sequences on 70 rows. Replaying those inputs with native tokens in the same vLLM job changed normalized fields on 11 rows. The requests occupied different positions in the batch. The aggregate report includes both runs, field counts and paired 95% intervals by work. vLLM evaluation
The original Tinker evaluations include results by language and source. Balanced scores · Permissive scores · Strict scores
Limitations
When several funders appear in one passage, the extractor can miss a co-funder or assign an award to the wrong organization. Performance varies by language, and some languages have few test examples. Validate the JSON and check award ownership against the source before assigning funding credit.