trenify commited on
Commit
ef69c3e
·
0 Parent(s):

Jerzyk 1.0 release

Browse files
.gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
NOTICE ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Jerzyk — Polish decision model and jerzyk-bench
2
+ Copyright 2026 Fundacja Trenify
3
+
4
+ Licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ This project builds on the following third-party work:
7
+
8
+ - Laya multilingual (convaiinnovations/laya-multilingual) and the `laya` Python package — base model and
9
+ fine-tuning tool for Jerzyk. Apache License 2.0. https://huggingface.co/convaiinnovations/laya
10
+ - mmBERT-base (jhu-clsp/mmBERT-base) — multilingual encoder inside Laya multilingual. MIT License.
11
+ - Bielik 11B v3.0 Instruct (speakleash/Bielik-11B-v3.0-Instruct), SpeakLeash & ACK Cyfronet AGH — wrote the
12
+ generated court / administrative / accounting test documents and filtered the training data. Apache License 2.0.
13
+ - Qwen3 8B (Qwen/Qwen3-8B), Alibaba Cloud — wrote the generated training documents. Apache License 2.0.
14
+ - llama.cpp — local inference of Bielik and Qwen during data preparation. MIT License.
15
+
16
+ Data sources:
17
+
18
+ - SAOS — System Analizy Orzeczeń Sądowych (https://www.saos.org.pl): real, already anonymised Polish court
19
+ rulings. Court rulings are official documents and are not subject to copyright (art. 4 of the Polish
20
+ Copyright Act).
21
+ - samorzad.gov.pl — public notices of Polish municipal, county and state offices. Official documents
22
+ (art. 4 of the Polish Copyright Act); personal data of natural persons was replaced with [OSOBA] / [ADRES]
23
+ before publication.
24
+ - The customer e-mails in the jerzyk-bench test and dev splits were written with Claude (Anthropic) for
25
+ evaluation only. They were not used to train Jerzyk; the dev split was used only to fit the three
26
+ calibration temperatures (one number per question type).
27
+
28
+ Jerzyk is an independent project and is not affiliated with TypeSafe, Convai Innovations, SpeakLeash, Alibaba,
29
+ Anthropic or SAOS.
README.md ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - pl
5
+ base_model: convaiinnovations/laya-multilingual
6
+ pipeline_tag: text-classification
7
+ library_name: laya
8
+ tags:
9
+ - decision-model
10
+ - systemone
11
+ - jev
12
+ - polish
13
+ - legal
14
+ - document-classification
15
+ - calibrated
16
+ model-index:
17
+ - name: jerzyk-1.0
18
+ results:
19
+ - task:
20
+ type: text-classification
21
+ name: Decision questions on Polish correspondence
22
+ dataset:
23
+ name: jerzyk-bench (generated test set)
24
+ type: trenify/jerzyk-bench
25
+ split: test
26
+ metrics:
27
+ - type: accuracy
28
+ value: 86.4
29
+ name: Mean accuracy over domains, generated documents
30
+ - task:
31
+ type: text-classification
32
+ name: Decision questions on Polish correspondence
33
+ dataset:
34
+ name: jerzyk-bench (real documents)
35
+ type: trenify/jerzyk-bench
36
+ split: test
37
+ metrics:
38
+ - type: accuracy
39
+ value: 85.8
40
+ name: Mean accuracy over domains, real documents
41
+ ---
42
+
43
+ # Jerzyk 1.0
44
+
45
+ **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.
46
+
47
+ > 🇵🇱 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
48
+
49
+ ## Use
50
+
51
+ ```python
52
+ # pip install "jerzyk @ git+https://github.com/Trenify-Org/jerzyk" ; code: https://github.com/Trenify-Org/jerzyk (applies calibration.json)
53
+ from jerzyk import Jerzyk
54
+ j = Jerzyk("trenify/jerzyk-1.0") # downloads this repository on first use
55
+ j.ask("Sygn. akt I C 412/26 … w terminie 7 dni od doręczenia wezwania pod rygorem zwrotu pozwu.", domain="court")
56
+ # {'document_type': ('court_summons', 0.998), 'deadline': (True, 0.912), 'urgency': (3, 0.928)}
57
+ # labels="pl": {'rodzaj': ('wezwanie_sadu', 0.998), 'termin': (True, 0.912), 'pilnosc': (3, 0.928)}
58
+ ```
59
+
60
+ 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).
61
+
62
+ Ready-made questions (from `jerzyk/questions.py` in the repository):
63
+
64
+ | Domain | Questions (`ask()` names; Polish names with `labels="pl"`) |
65
+ |---|---|
66
+ | `court` (`sad`) | `document_type` (`rodzaj`): judgment, court_decision, payment_order, court_summons, hearing_notice, statement_of_claim, party_letter, other · `deadline` (`termin`) · `urgency` (`pilnosc`) |
67
+ | `admin` (`adm`) | `document_type`: decision, procedural_decision, request_to_complete, notice, objection_to_notification, agreement_or_opinion, project_correspondence, other · `deadline` · `urgency` |
68
+ | `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` |
69
+ | `email` (customer e-mail) | `department` (`dzial`): sales, orders_and_deliveries, complaints_and_returns, payments_and_invoices, technical_support, other · `cancellation` (`rezygnacja`) · `upset` (`zdenerwowany`) · `urgency` |
70
+
71
+ `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`.
72
+
73
+ 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.
74
+
75
+ ## Evaluation (jerzyk-bench)
76
+
77
+ **Generated test set (480 documents)** — accuracy (%)
78
+
79
+ | Question | **Jerzyk 1.0** (322M) | basal-2.0-mini (1.5B) | Qwen3 8B | Bielik 11B v3 |
80
+ |---|---|---|---|---|
81
+ | Administrative: urgency | 77.5 | 61.7 | 42.5 | 54.2 |
82
+ | Administrative: document_type | 90.0 | 92.5 | 90.8 | 95.0 |
83
+ | Administrative: deadline | 82.5 | 79.2 | 84.2 | 83.3 |
84
+ | Customer e-mail: department | 93.3 | 88.3 | 89.2 | 88.3 |
85
+ | Customer e-mail: urgency | 79.2 | 74.2 | 70.8 | 80.8 |
86
+ | Customer e-mail: cancellation | 99.2 | 100.0 | 97.5 | 96.7 |
87
+ | Customer e-mail: upset | 91.7 | 90.8 | 77.5 | 85.0 |
88
+ | Accounting: cost_category | 97.5 | 95.0 | 85.0 | 75.8 |
89
+ | Accounting: urgency | 64.2 | 35.8 | 48.3 | 63.3 |
90
+ | Accounting: document_type | 94.2 | 91.7 | 95.8 | 95.8 |
91
+ | Accounting: deadline | 85.8 | 95.8 | 94.2 | 77.5 |
92
+ | Court: urgency | 80.0 | 42.5 | 38.3 | 54.2 |
93
+ | Court: document_type | 84.2 | 96.7 | 94.2 | 92.5 |
94
+ | Court: deadline | 93.3 | 85.0 | 83.3 | 82.5 |
95
+ | **Mean over domains** | **86.4** | **80.1** | **77.3** | **79.9** |
96
+
97
+ **Real documents (89 court rulings + 56 administrative notices)** — accuracy (%), 95% confidence interval in brackets
98
+
99
+ | Question | **Jerzyk 1.0** (322M) | basal-2.0-mini (1.5B) | Qwen3 8B | Bielik 11B v3 |
100
+ |---|---|---|---|---|
101
+ | Admin. notices (real): urgency | 58.9 (46–71) | 37.5 (26–51) | 48.2 (36–61) | 32.1 (21–45) |
102
+ | Admin. notices (real): document_type | 85.7 (74–93) | 76.8 (64–86) | 83.9 (72–91) | 85.7 (74–93) |
103
+ | Admin. notices (real): deadline | 73.2 (60–83) | 76.8 (64–86) | 62.5 (49–74) | 82.1 (70–90) |
104
+ | Court rulings (real): document_type | 98.9 (94–100) | 93.3 (86–97) | 100.0 (96–100) | 100.0 (96–100) |
105
+ | **Mean over domains** | **85.8** | **78.5** | **82.4** | **83.3** |
106
+
107
+ | | **Jerzyk 1.0** (322M) | basal-2.0-mini (1.5B) | Qwen3 8B | Bielik 11B v3 |
108
+ |---|---|---|---|---|
109
+ | ECE, real documents (lower = better) | 0.104 | 0.127 | 0.197 | 0.142 |
110
+ | Median latency per document (all models on the same computer) | 0.05 s | 0.28 s | 1.75 s | 3.01 s |
111
+
112
+ Models compared: [Jerzyk 1.0](https://huggingface.co/trenify/jerzyk-1.0) (calibrated); [basal-2.0-mini](https://huggingface.co/Remek/basal-2.0-mini-MLX-8bit) (MLX 8-bit, native `/v1/systemone`); [Qwen3 8B](https://huggingface.co/Qwen/Qwen3-8B-GGUF) and [Bielik 11B v3.0 Instruct](https://huggingface.co/speakleash/Bielik-11B-v3.0-Instruct-GGUF) (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.
113
+
114
+ > **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.
115
+
116
+ Calibration: one temperature per question type, fitted on the dev split (`calibration.json`: choice 2.6, yes/no 1.75, score 3.5).
117
+
118
+ ## Training
119
+
120
+ - **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.
121
+ - **Data (2,340 documents, about 6,000 question–answer pairs):**
122
+ - **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.
123
+ - **Real court rulings:** 500 from SAOS (2024–2026), with document type from metadata.
124
+ - **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.
125
+ - **No data from closed-model APIs.** The generated test e-mails were written with Claude for evaluation only and were not used for training.
126
+ - **The training set is not published.** The benchmark ([trenify/jerzyk-bench](https://huggingface.co/datasets/trenify/jerzyk-bench)) is test and dev data only; its dev split was used for model selection and calibration.
127
+
128
+ ## Files
129
+
130
+ | File | Purpose |
131
+ |---|---|
132
+ | `model.safetensors` | weights (encoder + decision head, 322M parameters) |
133
+ | `calibration.json` | temperatures per question type, fitted on dev; applied by the `jerzyk` package |
134
+ | `rl_agent_config.json`, `encoder/`, `tokenizer/` | model configuration read by `laya.load` (internal names come from the laya library) |
135
+ | `questions.json` | the questions and answer options the model was trained with |
136
+ | `train_report.json` | training log from `laya-train` (its accuracy figures are in-sample, not test results) |
137
+
138
+ Weights are in `safetensors` only; there are no pickle files.
139
+
140
+ ## Limitations
141
+
142
+ - Polish only. Input is capped at 1024 tokens (about 3,000 characters).
143
+ - Deadlines in long real administrative notices are detected in about 73% of cases (Bielik 11B: 82%). Use the rule-based `jerzyk.deadlines` alongside the model and send low-confidence cases to a person.
144
+ - Urgency on real administrative notices is the weakest result: 58.9% (95% CI 46–71) on 56 documents.
145
+ - 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.
146
+ - Urgency follows the conventions in jerzyk-bench `SPEC.md` (7/14-day thresholds), which may differ from your organisation's.
147
+ - Not legal advice. Do not use it as the only safeguard for statutory deadlines.
148
+
149
+ ## Out-of-scope use
150
+
151
+ - Deciding on legal consequences, or missing a statutory deadline, without a person checking the document.
152
+ - Documents in languages other than Polish, scanned images without text, or very long files beyond the first ~3,000 characters.
153
+ - Questions very different from the ready-made ones: your own questions work (`predict`), but measure them on your own documents first.
154
+
155
+ ## About
156
+
157
+ Jerzyk and jerzyk-bench are published by **Fundacja Trenify** (Trenify Foundation), a Polish non-profit foundation. Issues and pull requests are welcome on [GitHub](https://github.com/Trenify-Org/jerzyk). Contact: [contact@trenify.org](mailto:contact@trenify.org) (also for security, personal-data and copyright reports).
158
+
159
+ ## Citation
160
+
161
+ ```bibtex
162
+ @misc{jerzyk2026,
163
+ title = {Jerzyk 1.0: a small Polish decision model for official correspondence},
164
+ author = {{Fundacja Trenify}},
165
+ year = {2026},
166
+ howpublished = {\url{https://huggingface.co/trenify/jerzyk-1.0}}
167
+ }
168
+ ```
169
+
170
+ ## License and attribution
171
+
172
+ 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`.
calibration.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "choice": 2.6,
3
+ "noul": 1.75,
4
+ "score": 3.5
5
+ }
encoder/config.json ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ModernBertForMaskedLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 2,
8
+ "classifier_activation": "gelu",
9
+ "classifier_bias": false,
10
+ "classifier_dropout": 0.0,
11
+ "classifier_pooling": "mean",
12
+ "cls_token_id": 1,
13
+ "decoder_bias": true,
14
+ "deterministic_flash_attn": false,
15
+ "dtype": "float32",
16
+ "embedding_dropout": 0.0,
17
+ "eos_token_id": 1,
18
+ "global_attn_every_n_layers": 3,
19
+ "gradient_checkpointing": false,
20
+ "hidden_activation": "gelu",
21
+ "hidden_size": 768,
22
+ "initializer_cutoff_factor": 2.0,
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 1152,
25
+ "layer_norm_eps": 1e-05,
26
+ "layer_types": [
27
+ "full_attention",
28
+ "sliding_attention",
29
+ "sliding_attention",
30
+ "full_attention",
31
+ "sliding_attention",
32
+ "sliding_attention",
33
+ "full_attention",
34
+ "sliding_attention",
35
+ "sliding_attention",
36
+ "full_attention",
37
+ "sliding_attention",
38
+ "sliding_attention",
39
+ "full_attention",
40
+ "sliding_attention",
41
+ "sliding_attention",
42
+ "full_attention",
43
+ "sliding_attention",
44
+ "sliding_attention",
45
+ "full_attention",
46
+ "sliding_attention",
47
+ "sliding_attention",
48
+ "full_attention"
49
+ ],
50
+ "local_attention": 128,
51
+ "mask_token_id": 4,
52
+ "max_position_embeddings": 8192,
53
+ "mlp_bias": false,
54
+ "mlp_dropout": 0.0,
55
+ "model_type": "modernbert",
56
+ "norm_bias": false,
57
+ "norm_eps": 1e-05,
58
+ "num_attention_heads": 12,
59
+ "num_hidden_layers": 22,
60
+ "pad_token_id": 0,
61
+ "position_embedding_type": "sans_pos",
62
+ "repad_logits_with_grad": false,
63
+ "rope_parameters": {
64
+ "full_attention": {
65
+ "rope_theta": 160000,
66
+ "rope_type": "default"
67
+ },
68
+ "sliding_attention": {
69
+ "rope_theta": 160000,
70
+ "rope_type": "default"
71
+ }
72
+ },
73
+ "sep_token_id": 1,
74
+ "sparse_pred_ignore_index": -100,
75
+ "sparse_prediction": false,
76
+ "tie_word_embeddings": true,
77
+ "transformers_version": "5.20.0",
78
+ "vocab_size": 256000
79
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6d8d49bbca340c2b56c9d10fa974dadd0f6912be25dfe34155020a211e184b59
3
+ size 643835524
questions.json ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "rodzaj": {
3
+ "type": "choice",
4
+ "instructions": "Jaki to rodzaj dokumentu?",
5
+ "criteria": {
6
+ "wyrok": "wyrok s\u0105du (ka\u017cdej instancji)",
7
+ "postanowienie": "postanowienie s\u0105du lub referendarza",
8
+ "nakaz_zaplaty": "nakaz zap\u0142aty (upominawczy, nakazowy, EPU)",
9
+ "wezwanie_sadu": "wezwanie, zobowi\u0105zanie lub zarz\u0105dzenie s\u0105du nak\u0142adaj\u0105ce obowi\u0105zek",
10
+ "zawiadomienie_o_terminie": "zawiadomienie lub wezwanie na rozpraw\u0119 albo posiedzenie",
11
+ "pismo_wszczynajace": "pozew, wniosek lub akt oskar\u017cenia z\u0142o\u017cony przez stron\u0119",
12
+ "pismo_strony": "odpowied\u017a na pozew, apelacja, za\u017calenie lub pismo przygotowawcze strony",
13
+ "inne": "korespondencja nies\u0105dowa"
14
+ }
15
+ },
16
+ "termin": {
17
+ "type": "noul",
18
+ "instructions": "Czy pismo wymaga od adresata podj\u0119cia czynno\u015bci w okre\u015blonym czasie albo otwiera mu taki termin (zap\u0142ata, uzupe\u0142nienie, odpowied\u017a, \u015brodek zaskar\u017cenia, stawiennictwo)?"
19
+ },
20
+ "pilnosc": {
21
+ "type": "score",
22
+ "instructions": "Jak pilne jest to pismo?",
23
+ "criteria": [
24
+ "niska \u2013 nic nie trzeba robi\u0107",
25
+ "\u015brednia \u2013 trzeba co\u015b zrobi\u0107, ale bez terminu albo termin d\u0142u\u017cszy ni\u017c 14 dni",
26
+ "wysoka \u2013 termin od 8 do 14 dni",
27
+ "krytyczna \u2013 termin do 7 dni, niezw\u0142ocznie albo ju\u017c min\u0105\u0142"
28
+ ]
29
+ },
30
+ "kategoria_kosztu": {
31
+ "type": "choice",
32
+ "instructions": "Do jakiej kategorii kosztu nale\u017cy dokument?",
33
+ "criteria": {
34
+ "towary_handlowe": "towary do dalszej odsprzeda\u017cy",
35
+ "materialy": "materia\u0142y i surowce",
36
+ "uslugi_obce": "us\u0142ugi obce (doradztwo, IT, sprz\u0105tanie, transport)",
37
+ "media_i_telekomunikacja": "energia, woda, telefon, internet",
38
+ "paliwo_i_samochod": "paliwo, serwis i eksploatacja samochodu",
39
+ "najem": "najem lub dzier\u017cawa",
40
+ "szkolenia": "szkolenia i konferencje",
41
+ "reprezentacja": "reprezentacja (catering, upominki dla kontrahent\u00f3w)",
42
+ "srodek_trwaly": "\u015brodek trwa\u0142y (sprz\u0119t, maszyny powy\u017cej progu)",
43
+ "nie_dotyczy": "dokument nie jest kosztem"
44
+ }
45
+ },
46
+ "dzial": {
47
+ "type": "choice",
48
+ "instructions": "Do kt\u00f3rego dzia\u0142u powinna trafi\u0107 wiadomo\u015b\u0107?",
49
+ "criteria": {
50
+ "sprzedaz": "pytania o ofert\u0119, ceny, dost\u0119pno\u015b\u0107",
51
+ "zamowienia_i_dostawy": "status zam\u00f3wienia, dostawa, zmiana zam\u00f3wienia",
52
+ "reklamacje_i_zwroty": "reklamacje, zwroty, wadliwy produkt",
53
+ "platnosci_i_faktury": "p\u0142atno\u015bci, faktury, rozliczenia",
54
+ "wsparcie_techniczne": "problemy z dzia\u0142aniem us\u0142ugi lub produktu",
55
+ "inne": "inne sprawy"
56
+ }
57
+ },
58
+ "rezygnacja": {
59
+ "type": "noul",
60
+ "instructions": "Czy klient chce zrezygnowa\u0107, wypowiedzie\u0107 umow\u0119 lub zamkn\u0105\u0107 konto?"
61
+ },
62
+ "zdenerwowany": {
63
+ "type": "noul",
64
+ "instructions": "Czy klient wyra\u017ca wyra\u017ane niezadowolenie lub z\u0142o\u015b\u0107?"
65
+ }
66
+ }
rl_agent_config.json ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "encoder": "jhu-clsp/mmBERT-base",
3
+ "head_layers": 2,
4
+ "max_len": 1024,
5
+ "head_max_len": 256,
6
+ "max_prefixes": 6,
7
+ "act_costs": {
8
+ "escalate": 0.5
9
+ },
10
+ "cost_wrong_act": 3.0,
11
+ "amp_dtype": "bf16",
12
+ "model_name": "rl-agent",
13
+ "temperature": [
14
+ 0.9999958276748657,
15
+ 1.8285092115402222,
16
+ 3.370203733444214
17
+ ],
18
+ "training": {
19
+ "updates": 15987,
20
+ "epochs_completed": 4,
21
+ "hours": 4.97,
22
+ "world_size": 1,
23
+ "fine_tuned_from_checkpoint": false,
24
+ "laya_train": {
25
+ "epochs": 4,
26
+ "micro_batch": 2,
27
+ "grad_accum": 8,
28
+ "encoder_lr": 2.5e-05,
29
+ "head_lr": 0.0001,
30
+ "min_lr": 1e-06,
31
+ "weight_decay": 0.01,
32
+ "grad_clip": 1.0,
33
+ "loss": "soft-ce",
34
+ "rl_samples": 4,
35
+ "sigma_start": 0.4,
36
+ "sigma_end": 0.1,
37
+ "w_sph": 0.75,
38
+ "w_rps": 1.0,
39
+ "shuffle_options": [
40
+ "choice"
41
+ ],
42
+ "option_layout": null,
43
+ "freeze_encoder": false,
44
+ "calib_max": 400,
45
+ "calib_frac": 0.1,
46
+ "calib_seed": 20260922,
47
+ "seed": 0,
48
+ "max_len": null,
49
+ "head_max_len": null,
50
+ "amp": null,
51
+ "gradient_checkpointing": null,
52
+ "log_every": 100,
53
+ "label_smoothing": 0.0,
54
+ "text_column": "text",
55
+ "label_column": "label",
56
+ "question_id": "label",
57
+ "instructions": null,
58
+ "eval_data": null,
59
+ "target_error": 0.1,
60
+ "min_abstain_n": 10
61
+ },
62
+ "laya_train_calibration": {
63
+ "choice": {
64
+ "items": 136,
65
+ "temperature": 0.9999958276748657,
66
+ "issues": [
67
+ "the fit came back unchanged at 1.0 (accuracy 1.00, mean confidence 1.000 on the calibration items), which usually means they gave it nothing to correct; this type's confidences are uncalibrated"
68
+ ],
69
+ "accuracy": 1.0,
70
+ "mean_confidence": 0.9999959610103946
71
+ },
72
+ "score": {
73
+ "items": 129,
74
+ "temperature": 1.8285092115402222,
75
+ "issues": [],
76
+ "accuracy": 0.9844961240310077,
77
+ "mean_confidence": 0.9849781946721331
78
+ },
79
+ "noul": {
80
+ "items": 135,
81
+ "temperature": 3.370203733444214,
82
+ "issues": [],
83
+ "accuracy": 0.9703703703703703,
84
+ "mean_confidence": 0.9671178420842376
85
+ }
86
+ },
87
+ "train_report": {
88
+ "eval_source": "calibration_slice",
89
+ "eval_mode": "in_sample_calibration",
90
+ "is_held_out": false,
91
+ "eval_items": 400,
92
+ "note": "Metrics reflect in-sample calibration fit, not independent held-out evaluation. Provide --eval for held-out validation.",
93
+ "before": {
94
+ "items": 400,
95
+ "loss": 1.5651,
96
+ "accuracy": 0.56,
97
+ "mean_confidence": 0.8108,
98
+ "ece": 0.2508,
99
+ "brier": 0.6589,
100
+ "brier_top1": 0.2824,
101
+ "by_type": {
102
+ "choice": {
103
+ "items": 136,
104
+ "loss": 1.2561,
105
+ "accuracy": 0.7868,
106
+ "mean_confidence": 0.898,
107
+ "ece": 0.1288,
108
+ "brier": 0.3576,
109
+ "brier_top1": 0.1483
110
+ },
111
+ "score": {
112
+ "items": 129,
113
+ "loss": 2.1186,
114
+ "accuracy": 0.3101,
115
+ "mean_confidence": 0.6873,
116
+ "ece": 0.3772,
117
+ "brier": 0.9646,
118
+ "brier_top1": 0.3685
119
+ },
120
+ "noul": {
121
+ "items": 135,
122
+ "loss": 1.3475,
123
+ "accuracy": 0.5704,
124
+ "mean_confidence": 0.8411,
125
+ "ece": 0.2768,
126
+ "brier": 0.6702,
127
+ "brier_top1": 0.3351
128
+ }
129
+ }
130
+ },
131
+ "after": {
132
+ "items": 400,
133
+ "loss": 0.0509,
134
+ "accuracy": 0.985,
135
+ "mean_confidence": 0.9841,
136
+ "ece": 0.0104,
137
+ "brier": 0.0242,
138
+ "brier_top1": 0.0119,
139
+ "by_type": {
140
+ "choice": {
141
+ "items": 136,
142
+ "loss": 0.0,
143
+ "accuracy": 1.0,
144
+ "mean_confidence": 1.0,
145
+ "ece": 0.0,
146
+ "brier": 0.0,
147
+ "brier_top1": 0.0
148
+ },
149
+ "score": {
150
+ "items": 129,
151
+ "loss": 0.0468,
152
+ "accuracy": 0.9845,
153
+ "mean_confidence": 0.985,
154
+ "ece": 0.0107,
155
+ "brier": 0.0247,
156
+ "brier_top1": 0.0119
157
+ },
158
+ "noul": {
159
+ "items": 135,
160
+ "loss": 0.1061,
161
+ "accuracy": 0.9704,
162
+ "mean_confidence": 0.9671,
163
+ "ece": 0.0218,
164
+ "brier": 0.048,
165
+ "brier_top1": 0.024
166
+ }
167
+ }
168
+ },
169
+ "comparison": {
170
+ "delta_accuracy": 0.425,
171
+ "delta_loss": -1.5142,
172
+ "delta_ece": -0.2404,
173
+ "delta_brier": -0.6347,
174
+ "delta_brier_top1": -0.2705,
175
+ "delta_mean_confidence": 0.1733
176
+ },
177
+ "calibration": {
178
+ "choice": {
179
+ "items": 136,
180
+ "temperature": 0.9999958276748657,
181
+ "issues": [
182
+ "the fit came back unchanged at 1.0 (accuracy 1.00, mean confidence 1.000 on the calibration items), which usually means they gave it nothing to correct; this type's confidences are uncalibrated"
183
+ ],
184
+ "accuracy": 1.0,
185
+ "mean_confidence": 0.9999959610103946
186
+ },
187
+ "score": {
188
+ "items": 129,
189
+ "temperature": 1.8285092115402222,
190
+ "issues": [],
191
+ "accuracy": 0.9844961240310077,
192
+ "mean_confidence": 0.9849781946721331
193
+ },
194
+ "noul": {
195
+ "items": 135,
196
+ "temperature": 3.370203733444214,
197
+ "issues": [],
198
+ "accuracy": 0.9703703703703703,
199
+ "mean_confidence": 0.9671178420842376
200
+ }
201
+ },
202
+ "abstention_thresholds": {
203
+ "choice:6-10": 0.9998,
204
+ "score:3-5": 0.5209,
205
+ "noul:2": 0.5493
206
+ },
207
+ "training": {
208
+ "epochs": 4,
209
+ "micro_batch": 2,
210
+ "grad_accum": 8,
211
+ "encoder_lr": 2.5e-05,
212
+ "head_lr": 0.0001,
213
+ "min_lr": 1e-06,
214
+ "weight_decay": 0.01,
215
+ "grad_clip": 1.0,
216
+ "loss": "soft-ce",
217
+ "rl_samples": 4,
218
+ "sigma_start": 0.4,
219
+ "sigma_end": 0.1,
220
+ "w_sph": 0.75,
221
+ "w_rps": 1.0,
222
+ "shuffle_options": [
223
+ "choice"
224
+ ],
225
+ "option_layout": null,
226
+ "freeze_encoder": false,
227
+ "calib_max": 400,
228
+ "calib_frac": 0.1,
229
+ "calib_seed": 20260922,
230
+ "seed": 0,
231
+ "max_len": null,
232
+ "head_max_len": null,
233
+ "amp": null,
234
+ "gradient_checkpointing": null,
235
+ "log_every": 100,
236
+ "label_smoothing": 0.0,
237
+ "text_column": "text",
238
+ "label_column": "label",
239
+ "question_id": "label",
240
+ "instructions": null,
241
+ "eval_data": null,
242
+ "target_error": 0.1,
243
+ "min_abstain_n": 10
244
+ }
245
+ },
246
+ "abstention_thresholds": {
247
+ "choice:6-10": 0.9998,
248
+ "score:3-5": 0.5209,
249
+ "noul:2": 0.5493
250
+ }
251
+ },
252
+ "fine_tuned": true
253
+ }
tokenizer/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dbba919c6e5e492bc22beb80abb64e6fcc7e8744dc696e8388b8c977767afa4b
3
+ size 34363285
tokenizer/tokenizer_config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<bos>",
3
+ "clean_up_tokenization_spaces": false,
4
+ "cls_token": "<bos>",
5
+ "eos_token": "<eos>",
6
+ "extra_0": "<start_of_turn>",
7
+ "extra_1": "<end_of_turn>",
8
+ "local_files_only": false,
9
+ "mask_token": "<mask>",
10
+ "model_input_names": [
11
+ "input_ids",
12
+ "attention_mask"
13
+ ],
14
+ "model_max_length": 8192,
15
+ "model_specific_special_tokens": {
16
+ "extra_0": "<start_of_turn>",
17
+ "extra_1": "<end_of_turn>"
18
+ },
19
+ "pad_token": "<pad>",
20
+ "padding_side": "right",
21
+ "sep_token": "<eos>",
22
+ "spaces_between_special_tokens": false,
23
+ "tokenizer_class": "PreTrainedTokenizerFast",
24
+ "unk_token": "<unk>"
25
+ }
train_report.json ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "eval_source": "calibration_slice",
3
+ "eval_mode": "in_sample_calibration",
4
+ "is_held_out": false,
5
+ "eval_items": 400,
6
+ "note": "Metrics reflect in-sample calibration fit, not independent held-out evaluation. Provide --eval for held-out validation.",
7
+ "before": {
8
+ "items": 400,
9
+ "loss": 1.5651,
10
+ "accuracy": 0.56,
11
+ "mean_confidence": 0.8108,
12
+ "ece": 0.2508,
13
+ "brier": 0.6589,
14
+ "brier_top1": 0.2824,
15
+ "by_type": {
16
+ "choice": {
17
+ "items": 136,
18
+ "loss": 1.2561,
19
+ "accuracy": 0.7868,
20
+ "mean_confidence": 0.898,
21
+ "ece": 0.1288,
22
+ "brier": 0.3576,
23
+ "brier_top1": 0.1483
24
+ },
25
+ "score": {
26
+ "items": 129,
27
+ "loss": 2.1186,
28
+ "accuracy": 0.3101,
29
+ "mean_confidence": 0.6873,
30
+ "ece": 0.3772,
31
+ "brier": 0.9646,
32
+ "brier_top1": 0.3685
33
+ },
34
+ "noul": {
35
+ "items": 135,
36
+ "loss": 1.3475,
37
+ "accuracy": 0.5704,
38
+ "mean_confidence": 0.8411,
39
+ "ece": 0.2768,
40
+ "brier": 0.6702,
41
+ "brier_top1": 0.3351
42
+ }
43
+ }
44
+ },
45
+ "after": {
46
+ "items": 400,
47
+ "loss": 0.0509,
48
+ "accuracy": 0.985,
49
+ "mean_confidence": 0.9841,
50
+ "ece": 0.0104,
51
+ "brier": 0.0242,
52
+ "brier_top1": 0.0119,
53
+ "by_type": {
54
+ "choice": {
55
+ "items": 136,
56
+ "loss": 0.0,
57
+ "accuracy": 1.0,
58
+ "mean_confidence": 1.0,
59
+ "ece": 0.0,
60
+ "brier": 0.0,
61
+ "brier_top1": 0.0
62
+ },
63
+ "score": {
64
+ "items": 129,
65
+ "loss": 0.0468,
66
+ "accuracy": 0.9845,
67
+ "mean_confidence": 0.985,
68
+ "ece": 0.0107,
69
+ "brier": 0.0247,
70
+ "brier_top1": 0.0119
71
+ },
72
+ "noul": {
73
+ "items": 135,
74
+ "loss": 0.1061,
75
+ "accuracy": 0.9704,
76
+ "mean_confidence": 0.9671,
77
+ "ece": 0.0218,
78
+ "brier": 0.048,
79
+ "brier_top1": 0.024
80
+ }
81
+ }
82
+ },
83
+ "comparison": {
84
+ "delta_accuracy": 0.425,
85
+ "delta_loss": -1.5142,
86
+ "delta_ece": -0.2404,
87
+ "delta_brier": -0.6347,
88
+ "delta_brier_top1": -0.2705,
89
+ "delta_mean_confidence": 0.1733
90
+ },
91
+ "calibration": {
92
+ "choice": {
93
+ "items": 136,
94
+ "temperature": 0.9999958276748657,
95
+ "issues": [
96
+ "the fit came back unchanged at 1.0 (accuracy 1.00, mean confidence 1.000 on the calibration items), which usually means they gave it nothing to correct; this type's confidences are uncalibrated"
97
+ ],
98
+ "accuracy": 1.0,
99
+ "mean_confidence": 0.9999959610103946
100
+ },
101
+ "score": {
102
+ "items": 129,
103
+ "temperature": 1.8285092115402222,
104
+ "issues": [],
105
+ "accuracy": 0.9844961240310077,
106
+ "mean_confidence": 0.9849781946721331
107
+ },
108
+ "noul": {
109
+ "items": 135,
110
+ "temperature": 3.370203733444214,
111
+ "issues": [],
112
+ "accuracy": 0.9703703703703703,
113
+ "mean_confidence": 0.9671178420842376
114
+ }
115
+ },
116
+ "abstention_thresholds": {
117
+ "choice:6-10": 0.9998,
118
+ "score:3-5": 0.5209,
119
+ "noul:2": 0.5493
120
+ },
121
+ "training": {
122
+ "epochs": 4,
123
+ "micro_batch": 2,
124
+ "grad_accum": 8,
125
+ "encoder_lr": 2.5e-05,
126
+ "head_lr": 0.0001,
127
+ "min_lr": 1e-06,
128
+ "weight_decay": 0.01,
129
+ "grad_clip": 1.0,
130
+ "loss": "soft-ce",
131
+ "rl_samples": 4,
132
+ "sigma_start": 0.4,
133
+ "sigma_end": 0.1,
134
+ "w_sph": 0.75,
135
+ "w_rps": 1.0,
136
+ "shuffle_options": [
137
+ "choice"
138
+ ],
139
+ "option_layout": null,
140
+ "freeze_encoder": false,
141
+ "calib_max": 400,
142
+ "calib_frac": 0.1,
143
+ "calib_seed": 20260922,
144
+ "seed": 0,
145
+ "max_len": null,
146
+ "head_max_len": null,
147
+ "amp": null,
148
+ "gradient_checkpointing": null,
149
+ "log_every": 100,
150
+ "label_smoothing": 0.0,
151
+ "text_column": "text",
152
+ "label_column": "label",
153
+ "question_id": "label",
154
+ "instructions": null,
155
+ "eval_data": null,
156
+ "target_error": 0.1,
157
+ "min_abstain_n": 10
158
+ }
159
+ }