Numbers
- Extraction: recall 0.866, precision 0.929, F1 0.896, macro over 6 holdout strategies the weights never saw (a private 834-row gold set from 9 real strategies, 7 Hungarian and 2 English). These are the project's own numbers for the full extractor, which is this model plus the receipt check, filters and dedupe
- Hungarian towns it hadn't seen: on 55 hand-labelled pages from 3 more towns it found all 9 pages that hold a commitment, and 9 of the 15 pages it flagged were real (precision 0.60). With so few pages the intervals are wide: recall 0.70 to 1.00, precision 0.36 to 0.80
- National documents: weak. On 900 passages from Climate Policy Radar's national-climate-targets it scored F1 0.59, and a plain "year plus a number" rule scored 0.76. It often returns nothing for a plain national pledge
- Speed: 4.7 seconds per page on an 8 GB RTX 4060 laptop (vLLM, one page per request, four in flight), plus 115 seconds to parse a 175-page PDF
Caveats (pooled gold, a holdout that doubled as a development set, page-level checks, one labeller who isn't a domain expert) are on the Models page, which also lists how each check was run.
Use it
Any OpenAI-compatible server that reads compressed-tensors checkpoints (vLLM, SGLang) can serve it:
vllm serve jismailov/paper-trail-extract-4b --max-model-len 12288
Paper Trail calls it with these settings:
- Temperature 0,
max_tokens 2048, and a strict JSON schema (response_format) with a length limit on every field
- Thinking off: pass
chat_template_kwargs: {"enable_thinking": false}. Otherwise the model spends its whole budget reasoning and never answers
- Context 12288, which leaves about 6k tokens of KV cache on 8 GB, enough for 3 to 4 pages at once
- A prompt that says what not to report: background analysis, vision statements, SWOT lists, residents' feedback, and other bodies' funding programmes
How it was made
- Quantization: llm-compressor AWQ, scheme
W4A16_ASYM, lm_head kept in bf16 (see recipe.yaml)
- Calibration: 256 samples of 512 tokens, drawn from 512 long passages of one Budapest district's official sources and climate strategy. Text that looks like what the model will read keeps the important weights in the right place (512 samples of 1024 tokens ran out of memory on a 24 GB A10G)
- Scripts:
scripts/ml/quantize/
Limits
- Check its output: it sometimes paraphrases or invents section codes, and Paper Trail strips those
- Municipal text first: it was calibrated on Hungarian municipal strategies. It works in English, but it was tuned for neither language, and it misses most national-level targets
- Expect false alarms: page-level precision on documents it hasn't seen is around 0.6 to 0.7, which is why a person confirms everything in Paper Trail
- License: Apache-2.0, the same as the base model