pere commited on
Commit
350cf9d
·
verified ·
1 Parent(s): 69ebedb

Release validated Nynorsk two-task NormForm model

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* 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
 
 
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.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - nn
4
+ tags:
5
+ - norwegian
6
+ - nynorsk
7
+ - normform
8
+ library_name: transformers
9
+ private: true
10
+ ---
11
+
12
+ # Nynorsk NormForm two-task model
13
+
14
+ This model handles both `create_morphological_alternatives:` and `skriv_i_samme_morfologiske_stil:` prompts. Use the NormForm harness to validate source-preserving bracket alternatives and to constrain style choices to the supplied brackets. Raw style generation alone did not pass every structural gate on validation.
15
+
16
+ Selected checkpoint: `checkpoint-19052` from the pinned two-task training run. The source training manifest SHA-256 is `bda1108ce308f19811dc040f44c8ad8f127a673c74524c1103c8151059b2282b`. The selected checkpoint was compared with every retained checkpoint on full validation, then tested on the sealed test split.
17
+
18
+ Constrained validation score: `0.967486`. Constrained sealed-test score: `0.963089`. Exact data, checkpoint, evaluation, and harness checksums are in `normform_provenance.json`.
config.json ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "T5Gemma2ForConditionalGeneration"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 2,
7
+ "classifier_dropout_rate": 0.0,
8
+ "decoder": {
9
+ "_sliding_window_pattern": 6,
10
+ "attention_bias": false,
11
+ "attention_dropout": 0.0,
12
+ "attn_logit_softcapping": null,
13
+ "bos_token_id": 2,
14
+ "dropout_rate": 0.0,
15
+ "dtype": "float32",
16
+ "eos_token_id": 1,
17
+ "final_logit_softcapping": null,
18
+ "head_dim": 256,
19
+ "hidden_activation": "gelu_pytorch_tanh",
20
+ "hidden_size": 1152,
21
+ "initializer_range": 0.02,
22
+ "intermediate_size": 6912,
23
+ "layer_types": [
24
+ "sliding_attention",
25
+ "sliding_attention",
26
+ "sliding_attention",
27
+ "sliding_attention",
28
+ "sliding_attention",
29
+ "full_attention",
30
+ "sliding_attention",
31
+ "sliding_attention",
32
+ "sliding_attention",
33
+ "sliding_attention",
34
+ "sliding_attention",
35
+ "full_attention",
36
+ "sliding_attention",
37
+ "sliding_attention",
38
+ "sliding_attention",
39
+ "sliding_attention",
40
+ "sliding_attention",
41
+ "full_attention",
42
+ "sliding_attention",
43
+ "sliding_attention",
44
+ "sliding_attention",
45
+ "sliding_attention",
46
+ "sliding_attention",
47
+ "full_attention",
48
+ "sliding_attention",
49
+ "sliding_attention"
50
+ ],
51
+ "max_position_embeddings": 32768,
52
+ "model_type": "t5gemma2_decoder",
53
+ "num_attention_heads": 4,
54
+ "num_hidden_layers": 26,
55
+ "num_key_value_heads": 1,
56
+ "pad_token_id": 0,
57
+ "query_pre_attn_scalar": 256,
58
+ "rms_norm_eps": 1e-06,
59
+ "rope_parameters": {
60
+ "full_attention": {
61
+ "factor": 8.0,
62
+ "rope_theta": 1000000,
63
+ "rope_type": "linear"
64
+ },
65
+ "sliding_attention": {
66
+ "rope_theta": 10000,
67
+ "rope_type": "default"
68
+ }
69
+ },
70
+ "sliding_window": 512,
71
+ "tie_word_embeddings": true,
72
+ "use_bidirectional_attention": false,
73
+ "use_cache": false,
74
+ "vocab_size": 262144
75
+ },
76
+ "dropout_rate": 0.0,
77
+ "dtype": "bfloat16",
78
+ "encoder": {
79
+ "attention_dropout": 0.0,
80
+ "boi_token_index": 255999,
81
+ "dropout_rate": 0.0,
82
+ "dtype": "float32",
83
+ "eoi_token_index": 256000,
84
+ "image_token_index": 256001,
85
+ "initializer_range": 0.02,
86
+ "mm_tokens_per_image": 256,
87
+ "model_type": "t5gemma2_encoder",
88
+ "text_config": {
89
+ "_name_or_path": "",
90
+ "_sliding_window_pattern": 6,
91
+ "add_cross_attention": false,
92
+ "architectures": null,
93
+ "attention_bias": false,
94
+ "attention_dropout": 0.0,
95
+ "attn_logit_softcapping": null,
96
+ "bos_token_id": 2,
97
+ "chunk_size_feed_forward": 0,
98
+ "cross_attention_hidden_size": null,
99
+ "decoder_start_token_id": null,
100
+ "dropout_rate": 0.0,
101
+ "dtype": "bfloat16",
102
+ "eos_token_id": 1,
103
+ "final_logit_softcapping": null,
104
+ "finetuning_task": null,
105
+ "head_dim": 256,
106
+ "hidden_activation": "gelu_pytorch_tanh",
107
+ "hidden_size": 1152,
108
+ "id2label": {
109
+ "0": "LABEL_0",
110
+ "1": "LABEL_1"
111
+ },
112
+ "initializer_range": 0.02,
113
+ "intermediate_size": 6912,
114
+ "is_decoder": false,
115
+ "is_encoder_decoder": false,
116
+ "label2id": {
117
+ "LABEL_0": 0,
118
+ "LABEL_1": 1
119
+ },
120
+ "layer_types": [
121
+ "sliding_attention",
122
+ "sliding_attention",
123
+ "sliding_attention",
124
+ "sliding_attention",
125
+ "sliding_attention",
126
+ "full_attention",
127
+ "sliding_attention",
128
+ "sliding_attention",
129
+ "sliding_attention",
130
+ "sliding_attention",
131
+ "sliding_attention",
132
+ "full_attention",
133
+ "sliding_attention",
134
+ "sliding_attention",
135
+ "sliding_attention",
136
+ "sliding_attention",
137
+ "sliding_attention",
138
+ "full_attention",
139
+ "sliding_attention",
140
+ "sliding_attention",
141
+ "sliding_attention",
142
+ "sliding_attention",
143
+ "sliding_attention",
144
+ "full_attention",
145
+ "sliding_attention",
146
+ "sliding_attention"
147
+ ],
148
+ "max_position_embeddings": 32768,
149
+ "model_type": "t5gemma2_text",
150
+ "num_attention_heads": 4,
151
+ "num_hidden_layers": 26,
152
+ "num_key_value_heads": 1,
153
+ "output_attentions": false,
154
+ "output_hidden_states": false,
155
+ "pad_token_id": 0,
156
+ "prefix": null,
157
+ "problem_type": null,
158
+ "query_pre_attn_scalar": 256,
159
+ "return_dict": true,
160
+ "rms_norm_eps": 1e-06,
161
+ "rope_parameters": {
162
+ "full_attention": {
163
+ "factor": 8.0,
164
+ "rope_theta": 1000000,
165
+ "rope_type": "linear"
166
+ },
167
+ "sliding_attention": {
168
+ "rope_theta": 10000,
169
+ "rope_type": "default"
170
+ }
171
+ },
172
+ "sep_token_id": null,
173
+ "sliding_window": 512,
174
+ "task_specific_params": null,
175
+ "tie_encoder_decoder": false,
176
+ "tie_word_embeddings": true,
177
+ "tokenizer_class": null,
178
+ "use_bidirectional_attention": false,
179
+ "use_cache": true,
180
+ "vocab_size": 262144
181
+ },
182
+ "tie_word_embeddings": true,
183
+ "vision_config": {
184
+ "_name_or_path": "",
185
+ "add_cross_attention": false,
186
+ "architectures": null,
187
+ "attention_dropout": 0.0,
188
+ "bos_token_id": null,
189
+ "chunk_size_feed_forward": 0,
190
+ "cross_attention_hidden_size": null,
191
+ "decoder_start_token_id": null,
192
+ "dropout_rate": 0.0,
193
+ "dtype": "bfloat16",
194
+ "eos_token_id": null,
195
+ "finetuning_task": null,
196
+ "hidden_act": "gelu_pytorch_tanh",
197
+ "hidden_size": 1152,
198
+ "id2label": {
199
+ "0": "LABEL_0",
200
+ "1": "LABEL_1"
201
+ },
202
+ "image_size": 896,
203
+ "intermediate_size": 4304,
204
+ "is_decoder": false,
205
+ "is_encoder_decoder": false,
206
+ "label2id": {
207
+ "LABEL_0": 0,
208
+ "LABEL_1": 1
209
+ },
210
+ "layer_norm_eps": 1e-06,
211
+ "model_type": "siglip_vision_model",
212
+ "num_attention_heads": 16,
213
+ "num_channels": 3,
214
+ "num_hidden_layers": 27,
215
+ "output_attentions": false,
216
+ "output_hidden_states": false,
217
+ "pad_token_id": null,
218
+ "patch_size": 14,
219
+ "prefix": null,
220
+ "problem_type": null,
221
+ "return_dict": true,
222
+ "sep_token_id": null,
223
+ "task_specific_params": null,
224
+ "tie_encoder_decoder": false,
225
+ "tie_word_embeddings": true,
226
+ "tokenizer_class": null,
227
+ "vision_use_head": false,
228
+ "vocab_size": 262144
229
+ },
230
+ "vocab_size": 262144
231
+ },
232
+ "eoi_token_index": 256000,
233
+ "eos_token_id": 1,
234
+ "image_token_index": 256001,
235
+ "initializer_range": 0.02,
236
+ "is_encoder_decoder": true,
237
+ "model_type": "t5gemma2",
238
+ "pad_token_id": 0,
239
+ "tie_word_embeddings": true,
240
+ "transformers_version": "5.16.1",
241
+ "use_cache": false,
242
+ "vocab_size": 262144
243
+ }
generation_config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "assistant_confidence_threshold": 0.4,
3
+ "assistant_lookbehind": 10,
4
+ "bos_token_id": 2,
5
+ "cache_implementation": "hybrid",
6
+ "diversity_penalty": 0.0,
7
+ "do_sample": true,
8
+ "early_stopping": false,
9
+ "encoder_no_repeat_ngram_size": 0,
10
+ "encoder_repetition_penalty": 1.0,
11
+ "eos_token_id": [
12
+ 1
13
+ ],
14
+ "epsilon_cutoff": 0.0,
15
+ "eta_cutoff": 0.0,
16
+ "length_penalty": 1.0,
17
+ "max_length": 20,
18
+ "min_length": 0,
19
+ "no_repeat_ngram_size": 0,
20
+ "num_assistant_tokens": 20,
21
+ "num_assistant_tokens_schedule": "constant",
22
+ "num_beam_groups": 1,
23
+ "num_beams": 1,
24
+ "num_return_sequences": 1,
25
+ "output_scores": false,
26
+ "pad_token_id": 0,
27
+ "remove_invalid_values": false,
28
+ "repetition_penalty": 1.0,
29
+ "return_dict_in_generate": false,
30
+ "target_lookbehind": 10,
31
+ "temperature": 1.0,
32
+ "top_k": 64,
33
+ "top_p": 0.95,
34
+ "transformers_version": "5.16.1",
35
+ "typical_p": 1.0,
36
+ "use_cache": true
37
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78cd6f98848edccd8409901205d7f5e7c74ba6ab3d55fbe0ede666247292f895
3
+ size 5630554536
normform_provenance.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema_version": 1,
3
+ "model": "NbAiLab/normform-nynorsk-multitask",
4
+ "tasks": [
5
+ "create_morphological_alternatives",
6
+ "skriv_i_samme_morfologiske_stil"
7
+ ],
8
+ "language": "nno",
9
+ "selected_checkpoint": "/nfs/datastore0/perk/output/altmorph-llm-training/runs/normform-nno-1b-multitask-production-20260928/checkpoints/checkpoint-19052",
10
+ "selected_checkpoint_sha256": "21c5cf77e6f6afc78ab27f4153fc874b35eedd20999a89482477d9b7fc01b7d5",
11
+ "dataset_manifest_sha256": "bda1108ce308f19811dc040f44c8ad8f127a673c74524c1103c8151059b2282b",
12
+ "selection_certificate_sha256": "66739ca201671cdb1efd38e38db7325c2ca0be88a8ca8f8d7136249a6d668e1a",
13
+ "validation_report_sha256": "75801f972b251b2dbd1334d6fef496251399c4be508eccf5fc483c8405ed358b",
14
+ "sealed_test_report_sha256": "bcdf0ac7762af98d4edd633372e55d291f6695e3e728636b99589474af2ae500",
15
+ "harness_check_sha256": "7f3add0bd0c913c500abf8be1f5ab5613464ecb502042329b80c1b9113703808",
16
+ "direct_normalization_replay_sha256": "561d77bd34a10724b45968b8d1ce17646f824bacbdf595a94d93708a6fe1ddb0",
17
+ "constrained_validation_score": 0.9674856687572051,
18
+ "constrained_test_score": 0.9630894102957713,
19
+ "raw_validation_structurally_eligible": false,
20
+ "raw_test_structurally_eligible": false,
21
+ "files": {
22
+ "config.json": "c5bac78bca42e7fca72c4764f9197f825c32950609018974e8b6a6553d51436a",
23
+ "generation_config.json": "4a57c0d93f44541cdb0920294f822b94ce096d81ce12c8bfaa789cb17c78a0a0",
24
+ "model.safetensors": "78cd6f98848edccd8409901205d7f5e7c74ba6ab3d55fbe0ede666247292f895",
25
+ "tokenizer.json": "f5b325224482ec441ec5fbe2a5ac08c3758e0f9605f6e54368e31f736fcfb01d",
26
+ "tokenizer_config.json": "1007769ea58b3c60a23a2ec21d99625f3433a18913492b9a7ea525759e312713"
27
+ }
28
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5b325224482ec441ec5fbe2a5ac08c3758e0f9605f6e54368e31f736fcfb01d
3
+ size 33384387
tokenizer_config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "boi_token": "<start_of_image>",
4
+ "bos_token": "<bos>",
5
+ "clean_up_tokenization_spaces": false,
6
+ "eoi_token": "<end_of_image>",
7
+ "eos_token": "<eos>",
8
+ "extra_special_tokens": [],
9
+ "image_token": "<image_soft_token>",
10
+ "is_local": false,
11
+ "local_files_only": false,
12
+ "mask_token": "<mask>",
13
+ "model_max_length": 1000000000000000019884624838656,
14
+ "model_specific_special_tokens": {
15
+ "boi_token": "<start_of_image>",
16
+ "eoi_token": "<end_of_image>",
17
+ "image_token": "<image_soft_token>"
18
+ },
19
+ "pad_token": "<pad>",
20
+ "padding_side": "right",
21
+ "processor_class": "Gemma3Processor",
22
+ "sp_model_kwargs": null,
23
+ "spaces_between_special_tokens": false,
24
+ "tokenizer_class": "GemmaTokenizer",
25
+ "unk_token": "<unk>",
26
+ "use_default_system_prompt": false
27
+ }