Instructions to use trenify/jerzyk-1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Laya
How to use trenify/jerzyk-1.0 with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download README.md from trenify/jerzyk-1.0: direct link, hf CLI and curl.
- Browser
- Download file 11 kB
-
https://huggingface.co/trenify/jerzyk-1.0/resolve/main/README.md
- Command line
-
hf download hf://trenify/jerzyk-1.0/README.md
-
curl -L -o README.md https://huggingface.co/trenify/jerzyk-1.0/resolve/main/README.md
license: apache-2.0
language:
- pl
base_model: convaiinnovations/laya-multilingual
pipeline_tag: text-classification
library_name: laya
tags:
- decision-model
- systemone
- jev
- polish
- legal
- document-classification
- calibrated
model-index:
- name: jerzyk-1.0
results:
- task:
type: text-classification
name: Decision questions on Polish correspondence
dataset:
name: jerzyk-bench (generated test set)
type: trenify/jerzyk-bench
split: test
metrics:
- type: accuracy
value: 86.4
name: Mean accuracy over domains, generated documents
- task:
type: text-classification
name: Decision questions on Polish correspondence
dataset:
name: jerzyk-bench (real documents)
type: trenify/jerzyk-bench
split: test
metrics:
- type: accuracy
value: 85.8
name: Mean accuracy over domains, real documents
Jerzyk 1.0
A small Polish decision model (322M) for incoming correspondence: court letters, administrative notices, accounting documents and customer e-mails. It answers typed questions (choice, yes/no noul, score) with calibrated probabilities and never answers outside the option list.
🇵🇱 Jerzyk czyta polskie pismo i odpowiada na pytania z listą odpowiedzi (rodzaj pisma, czy biegnie termin, pilność, dział), podając prawdopodobieństwo. Działa lokalnie, także bez karty graficznej. Kod, demo i biblioteka terminów: https://github.com/Trenify-Org/jerzyk
Use
# pip install "jerzyk @ git+https://github.com/Trenify-Org/jerzyk" ; code: https://github.com/Trenify-Org/jerzyk (applies calibration.json)
from jerzyk import Jerzyk
j = Jerzyk("trenify/jerzyk-1.0") # downloads this repository on first use
j.ask("Sygn. akt I C 412/26 … w terminie 7 dni od doręczenia wezwania pod rygorem zwrotu pozwu.", domain="court")
# {'document_type': ('court_summons', 0.998), 'deadline': (True, 0.912), 'urgency': (3, 0.928)}
# labels="pl": {'rodzaj': ('wezwanie_sadu', 0.998), 'termin': (True, 0.912), 'pilnosc': (3, 0.928)}
Raw model without the helper: laya.load("jerzyk-1.0").predict(text, questions) (format of TypeSafe Jev /v1/systemone). Then apply the per-type temperatures from calibration.json: p_i ∝ p_i^(1/T).
Ready-made questions (from jerzyk/questions.py in the repository):
| Domain | Questions (ask() names; Polish names with labels="pl") |
|---|---|
court (sad) |
document_type (rodzaj): judgment, court_decision, payment_order, court_summons, hearing_notice, statement_of_claim, party_letter, other · deadline (termin) · urgency (pilnosc) |
admin (adm) |
document_type: decision, procedural_decision, request_to_complete, notice, objection_to_notification, agreement_or_opinion, project_correspondence, other · deadline · urgency |
accounting (ksieg) |
document_type: invoice, corrective_invoice, receipt, accounting_note, bank_statement, contract, tax_office_letter, social_insurance_letter, payment_demand, other · cost_category (kategoria_kosztu): goods_for_resale, materials, external_services, utilities_and_telecom, fuel_and_car, rent, training, entertainment, fixed_asset, not_applicable · deadline · urgency |
email (customer e-mail) |
department (dzial): sales, orders_and_deliveries, complaints_and_returns, payments_and_invoices, technical_support, other · cancellation (rezygnacja) · upset (zdenerwowany) · urgency |
deadline = does the letter set or open a deadline for the recipient (yes/no). urgency 0–3: nothing to do / no deadline or > 14 days / 8–14 days / ≤ 7 days or immediately. Full rules: SPEC.md.
The model itself reads Polish questions and answer options (it was trained on them, see jerzyk/questions.py); ask() translates the result to English afterwards (jerzyk/labels.py), which does not change any prediction. jerzyk-bench uses the Polish names.
Evaluation (jerzyk-bench)
Generated test set (480 documents) — accuracy (%)
| Question | Jerzyk 1.0 (322M) | basal-2.0-mini (1.5B) | Qwen3 8B | Bielik 11B v3 |
|---|---|---|---|---|
| Administrative: urgency | 77.5 | 61.7 | 42.5 | 54.2 |
| Administrative: document_type | 90.0 | 92.5 | 90.8 | 95.0 |
| Administrative: deadline | 82.5 | 79.2 | 84.2 | 83.3 |
| Customer e-mail: department | 93.3 | 88.3 | 89.2 | 88.3 |
| Customer e-mail: urgency | 79.2 | 74.2 | 70.8 | 80.8 |
| Customer e-mail: cancellation | 99.2 | 100.0 | 97.5 | 96.7 |
| Customer e-mail: upset | 91.7 | 90.8 | 77.5 | 85.0 |
| Accounting: cost_category | 97.5 | 95.0 | 85.0 | 75.8 |
| Accounting: urgency | 64.2 | 35.8 | 48.3 | 63.3 |
| Accounting: document_type | 94.2 | 91.7 | 95.8 | 95.8 |
| Accounting: deadline | 85.8 | 95.8 | 94.2 | 77.5 |
| Court: urgency | 80.0 | 42.5 | 38.3 | 54.2 |
| Court: document_type | 84.2 | 96.7 | 94.2 | 92.5 |
| Court: deadline | 93.3 | 85.0 | 83.3 | 82.5 |
| Mean over domains | 86.4 | 80.1 | 77.3 | 79.9 |
Real documents (89 court rulings + 56 administrative notices) — accuracy (%), 95% confidence interval in brackets
| Question | Jerzyk 1.0 (322M) | basal-2.0-mini (1.5B) | Qwen3 8B | Bielik 11B v3 |
|---|---|---|---|---|
| Admin. notices (real): urgency | 58.9 (46–71) | 37.5 (26–51) | 48.2 (36–61) | 32.1 (21–45) |
| Admin. notices (real): document_type | 85.7 (74–93) | 76.8 (64–86) | 83.9 (72–91) | 85.7 (74–93) |
| Admin. notices (real): deadline | 73.2 (60–83) | 76.8 (64–86) | 62.5 (49–74) | 82.1 (70–90) |
| Court rulings (real): document_type | 98.9 (94–100) | 93.3 (86–97) | 100.0 (96–100) | 100.0 (96–100) |
| Mean over domains | 85.8 | 78.5 | 82.4 | 83.3 |
| Jerzyk 1.0 (322M) | basal-2.0-mini (1.5B) | Qwen3 8B | Bielik 11B v3 | |
|---|---|---|---|---|
| ECE, real documents (lower = better) | 0.104 | 0.127 | 0.197 | 0.142 |
| Median latency per document (all models on the same computer) | 0.05 s | 0.28 s | 1.75 s | 3.01 s |
Models compared: Jerzyk 1.0 (calibrated); basal-2.0-mini (MLX 8-bit, native /v1/systemone); Qwen3 8B and Bielik 11B v3.0 Instruct (GGUF Q4_K_M in llama.cpp, zero-shot, answer chosen from option log-probabilities). Mean over domains averages the questions of each domain first, then the domains, so every domain counts equally.
Note. These results were measured on the benchmark text before anonymisation of the real documents (names of judges, officials and private persons replaced with placeholders such as
[SĘDZIA]and[OSOBA]). On the published, anonymised text Jerzyk 1.0 scores 85.5% instead of 85.8% on real documents. The other models will be re-measured on the published text in a later update.
Calibration: one temperature per question type, fitted on the dev split (calibration.json: choice 2.6, yes/no 1.75, score 3.5).
Training
- Base: Laya multilingual (mmBERT-base encoder plus a typed decision head), fine-tuned with
laya-train: 4 epochs, soft cross-entropy, shuffled options, effective batch 16. - Data (2,340 documents, about 6,000 question–answer pairs):
- Generated documents: written by Qwen3 8B from label recipes (court, administrative, accounting, e-mail). Bielik 11B v3 filtered out documents whose type it read differently from the recipe. E-mails also had to pass rule checks for urgency.
- Real court rulings: 500 from SAOS (2024–2026), with document type from metadata.
- Real administrative notices: 84 public notices from 16 offices (samorzad.gov.pl), with deadline and urgency from rules and offices disjoint from the test set. Each was added twice.
- No data from closed-model APIs. The generated test e-mails were written with Claude for evaluation only and were not used for training.
- The training set is not published. The benchmark (trenify/jerzyk-bench) is test and dev data only; its dev split was used for model selection and calibration.
Files
| File | Purpose |
|---|---|
model.safetensors |
weights (encoder + decision head, 322M parameters) |
calibration.json |
temperatures per question type, fitted on dev; applied by the jerzyk package |
rl_agent_config.json, encoder/, tokenizer/ |
model configuration read by laya.load (internal names come from the laya library) |
questions.json |
the questions and answer options the model was trained with |
train_report.json |
training log from laya-train (its accuracy figures are in-sample, not test results) |
Weights are in safetensors only; there are no pickle files.
Limitations
- Polish only. Input is capped at 1024 tokens (about 3,000 characters).
- Deadlines in long real administrative notices are detected in about 73% of cases (Bielik 11B: 82%). Use the rule-based
jerzyk.deadlinesalongside the model and send low-confidence cases to a person. - Urgency on real administrative notices is the weakest result: 58.9% (95% CI 46–71) on 56 documents.
- How to read the evaluation: jerzyk-bench was built by the authors of Jerzyk. The generated court, administrative and accounting test documents were written by Bielik 11B v3, which is also one of the compared models. The labels of the 56 real notices were made by Claude and checked by two blind re-labellings, not by a human annotator.
- Urgency follows the conventions in jerzyk-bench
SPEC.md(7/14-day thresholds), which may differ from your organisation's. - Not legal advice. Do not use it as the only safeguard for statutory deadlines.
Out-of-scope use
- Deciding on legal consequences, or missing a statutory deadline, without a person checking the document.
- Documents in languages other than Polish, scanned images without text, or very long files beyond the first ~3,000 characters.
- Questions very different from the ready-made ones: your own questions work (
predict), but measure them on your own documents first.
About
Jerzyk and jerzyk-bench are published by Fundacja Trenify (Trenify Foundation), a Polish non-profit foundation. Issues and pull requests are welcome on GitHub. Contact: contact@trenify.org (also for security, personal-data and copyright reports).
Citation
@misc{jerzyk2026,
title = {Jerzyk 1.0: a small Polish decision model for official correspondence},
author = {{Fundacja Trenify}},
year = {2026},
howpublished = {\url{https://huggingface.co/trenify/jerzyk-1.0}}
}
License and attribution
Apache 2.0. Built on Laya multilingual (Apache 2.0) and mmBERT (MIT). Training documents come from Qwen3 8B and Bielik 11B v3 (Apache 2.0), SAOS and samorzad.gov.pl (official documents, art. 4 of the Polish Copyright Act). See NOTICE.