alexwengg commited on
Commit
37e70ee
·
verified ·
1 Parent(s): d00480b

Add pinned source architecture config and provenance

Browse files
Files changed (2) hide show
  1. CONFIG_PROVENANCE.md +7 -0
  2. config.json +441 -0
CONFIG_PROVENANCE.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Root config provenance
2
+
3
+ The root `config.json` is an unmodified copy of the architecture component config from [`knowledgator/gliformer-large-v1`](https://huggingface.co/knowledgator/gliformer-large-v1/tree/d0a4e53d09cebe6bc963dd9be319d4279084bb2d) at `d0a4e53d09cebe6bc963dd9be319d4279084bb2d`, path `gliner_config.json`.
4
+
5
+ SHA-256: `80aec1c8824bd58d6733f27d78a8271420f2c7008e4b0c81313d8da09624eea4`.
6
+
7
+ This file describes the source architecture. It does not make the Core ML package a standalone Transformers AutoModel checkpoint. Use the repository's Core ML runtime and its included tokenizer, decision heads, and calibration where applicable.
config.json ADDED
@@ -0,0 +1,441 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "adjacency_loss_coef": 1.0,
3
+ "anchor_num_heads": 4,
4
+ "anchor_num_layers": 2,
5
+ "backbone_type": "deberta_2d",
6
+ "bos_token_id": 1,
7
+ "cat_loss_coef": 1.0,
8
+ "cat_parent_token": "[SCHEMA]",
9
+ "cat_token": "[CLASS]",
10
+ "cat_token_index": 128003,
11
+ "child_token": "[FIELD]",
12
+ "child_token_index": 128005,
13
+ "class_token_index": 128001,
14
+ "classification_config": {
15
+ "anchor_context_gate_init": 0.1,
16
+ "anchor_context_gate_trainable": true,
17
+ "anchor_cross_attention_bias": null,
18
+ "anchor_layer": null,
19
+ "anchor_memory_position": null,
20
+ "anchor_memory_position_usage": null,
21
+ "anchor_mode": "parent",
22
+ "anchor_modeling": "linear",
23
+ "anchor_normalization": "none",
24
+ "anchor_query_position": null,
25
+ "anchor_refine_heads": 8,
26
+ "anchor_refine_layer_scale_init": null,
27
+ "anchor_refine_layers": 0,
28
+ "anchor_refine_norm": "post_norm",
29
+ "anchor_refinement": null,
30
+ "anchor_self_attention_bias": null,
31
+ "cat_token_index": 128003,
32
+ "embed_cat_token": true,
33
+ "embed_parent_token": true,
34
+ "feature_anchor_mlp": false,
35
+ "feature_anchor_mlp_hidden_multiplier": 1,
36
+ "focal_loss_alpha": 0.8,
37
+ "focal_loss_gamma": -1.0,
38
+ "focal_loss_prob_margin": 0.0,
39
+ "loss_coef": 1.0,
40
+ "parent_token_index": 128002,
41
+ "pooling_type": "cls",
42
+ "scorer_type": "dot"
43
+ },
44
+ "classifier_layer": null,
45
+ "count_config": null,
46
+ "count_layer": null,
47
+ "count_loss_coef": 1.0,
48
+ "count_mode": "regression",
49
+ "dropout": 0.25,
50
+ "embed_cat_token": true,
51
+ "embed_child_token": true,
52
+ "embed_ent_token": true,
53
+ "embed_parent_token": true,
54
+ "embed_rel_token": true,
55
+ "embedding_config": {
56
+ "encoder_dropout": 0.0,
57
+ "loss_coef": 1.0,
58
+ "loss_fn": "mse",
59
+ "margin": 0.0,
60
+ "pooling_type": "cls",
61
+ "projection_dim": 1024,
62
+ "projection_dropout": 0.0,
63
+ "similarity_fn": "cosine"
64
+ },
65
+ "embedding_loss_coef": 1.0,
66
+ "encoder_config": {
67
+ "_name_or_path": "knowledgator/DeBERTa-large-joint-3000",
68
+ "architectures": [
69
+ "FlashDebertaV2ForContextPredictionTraining"
70
+ ],
71
+ "attention_probs_dropout_prob": 0.0,
72
+ "attn_kernel": "flash",
73
+ "bos_token_id": null,
74
+ "chunk_size_feed_forward": 0,
75
+ "coordinate_size": 128,
76
+ "dtype": "bfloat16",
77
+ "eos_token_id": null,
78
+ "hidden_act": "gelu",
79
+ "hidden_dropout_prob": 0.0,
80
+ "hidden_size": 1024,
81
+ "id2label": {
82
+ "0": "LABEL_0",
83
+ "1": "LABEL_1"
84
+ },
85
+ "initializer_range": 0.02,
86
+ "intermediate_size": 4096,
87
+ "is_encoder_decoder": false,
88
+ "label2id": {
89
+ "LABEL_0": 0,
90
+ "LABEL_1": 1
91
+ },
92
+ "layer_norm_eps": 1e-07,
93
+ "layout_bias_propagation": "all_layers",
94
+ "layout_embedding_type": "absolute",
95
+ "layout_max_relative_positions": 1024,
96
+ "layout_position_buckets": 32,
97
+ "layout_relative_attention": false,
98
+ "legacy": true,
99
+ "max_2d_position_embeddings": 1024,
100
+ "max_page_embeddings": 1024,
101
+ "max_position_embeddings": 512,
102
+ "max_relative_positions": -1,
103
+ "model_type": "layout-deberta",
104
+ "norm_rel_ebd": "layer_norm",
105
+ "num_attention_heads": 16,
106
+ "num_hidden_layers": 24,
107
+ "output_attentions": false,
108
+ "output_hidden_states": false,
109
+ "pad_token_id": 0,
110
+ "pooler_dropout": 0.0,
111
+ "pooler_hidden_act": "gelu",
112
+ "pooler_hidden_size": 1024,
113
+ "pos_att_type": [
114
+ "p2c",
115
+ "c2p"
116
+ ],
117
+ "position_biased_input": false,
118
+ "position_buckets": 256,
119
+ "problem_type": null,
120
+ "relative_attention": true,
121
+ "return_dict": true,
122
+ "shape_size": 64,
123
+ "share_att_key": true,
124
+ "spatial_embedding_type": "absolute",
125
+ "tie_word_embeddings": true,
126
+ "type_vocab_size": 0,
127
+ "vocab_size": 128008
128
+ },
129
+ "ent_token": "[ENTITY]",
130
+ "eos_token_id": 2,
131
+ "fine_tune": true,
132
+ "fuse_layers": false,
133
+ "groups_layer": "fixed",
134
+ "groups_loss_coef": 1.0,
135
+ "hidden_size": 1024,
136
+ "image_size": 224,
137
+ "joint_relex_config": {
138
+ "adjacency_loss_coef": 1.0,
139
+ "anchor_context_gate_init": 0.1,
140
+ "anchor_context_gate_trainable": true,
141
+ "anchor_cross_attention_bias": null,
142
+ "anchor_layer": null,
143
+ "anchor_memory_position": null,
144
+ "anchor_memory_position_usage": null,
145
+ "anchor_mode": "fixed",
146
+ "anchor_modeling": "linear",
147
+ "anchor_normalization": "none",
148
+ "anchor_num_heads": 4,
149
+ "anchor_num_layers": 2,
150
+ "anchor_query_position": null,
151
+ "anchor_refine_heads": 8,
152
+ "anchor_refine_layer_scale_init": null,
153
+ "anchor_refine_layers": 0,
154
+ "anchor_refine_norm": "post_norm",
155
+ "anchor_refinement": null,
156
+ "anchor_self_attention_bias": null,
157
+ "embed_parent_token": true,
158
+ "embed_rel_token": true,
159
+ "feature_anchor_mlp": false,
160
+ "feature_anchor_mlp_hidden_multiplier": 1,
161
+ "focal_loss_alpha": 0.8,
162
+ "focal_loss_gamma": -1.0,
163
+ "focal_loss_prob_margin": 0.0,
164
+ "loss_coef": 1.0,
165
+ "max_count": 20,
166
+ "max_relation_entities": null,
167
+ "max_relation_span_width": null,
168
+ "neg_spans_ratio": 1.0,
169
+ "num_fixed_slots": 10,
170
+ "parent_token_index": -1,
171
+ "rel_token_index": 128004,
172
+ "relation_focal_loss_alpha": 0.8,
173
+ "relation_focal_loss_gamma": 2,
174
+ "relation_focal_loss_prob_margin": 0.0,
175
+ "relation_loss_coef": 1.0,
176
+ "relation_loss_reduction": "mean",
177
+ "relation_neighbor_chunk_size": 512,
178
+ "relation_span_nms": false,
179
+ "relation_top_k_neighbors": null,
180
+ "relations_layer": null,
181
+ "represent_spans": false,
182
+ "span_loss_coef": 1.0,
183
+ "span_loss_reduction": "mean",
184
+ "triples_layer": null
185
+ },
186
+ "labels_encoder": null,
187
+ "labels_encoder_config": null,
188
+ "layout_image_tokens": true,
189
+ "max_count": 20,
190
+ "max_len": 16384,
191
+ "max_neg_type_ratio": 1,
192
+ "max_page_embeddings": 1024,
193
+ "max_types": 128,
194
+ "max_width": 12,
195
+ "media_parent_embedding_source": "fixed",
196
+ "model_name": "knowledgator/DeBERTa-large-joint-3000",
197
+ "model_type": "gliformer-layout",
198
+ "model_variant": "layout",
199
+ "multimodal_fusion": "uni-encoder",
200
+ "name": "gliformer",
201
+ "neg_spans_ratio": 1.0,
202
+ "ner_config": {
203
+ "anchor_context_gate_init": 0.1,
204
+ "anchor_context_gate_trainable": true,
205
+ "anchor_cross_attention_bias": null,
206
+ "anchor_layer": null,
207
+ "anchor_memory_position": null,
208
+ "anchor_memory_position_usage": null,
209
+ "anchor_mode": "parent",
210
+ "anchor_modeling": "linear",
211
+ "anchor_normalization": "none",
212
+ "anchor_query_position": null,
213
+ "anchor_refine_heads": 8,
214
+ "anchor_refine_layer_scale_init": null,
215
+ "anchor_refine_layers": 0,
216
+ "anchor_refine_norm": "post_norm",
217
+ "anchor_refinement": null,
218
+ "anchor_self_attention_bias": null,
219
+ "embed_parent_token": true,
220
+ "feature_anchor_mlp": false,
221
+ "feature_anchor_mlp_hidden_multiplier": 1,
222
+ "focal_loss_alpha": 0.8,
223
+ "focal_loss_gamma": -1,
224
+ "focal_loss_prob_margin": 0.0,
225
+ "loss_coef": 1.0,
226
+ "neg_spans_ratio": 1.0,
227
+ "parent_token_index": 128002,
228
+ "represent_spans": false,
229
+ "span_loss_coef": 1.0,
230
+ "span_loss_reduction": "mean"
231
+ },
232
+ "ner_loss_coef": 1.0,
233
+ "ner_parent_token": "[SCHEMA]",
234
+ "num_post_fusion_layers": 1,
235
+ "num_rnn_layers": 1,
236
+ "obj_token": "[OBJECT]",
237
+ "open_rel_parent_token": "[SCHEMA]",
238
+ "open_relex_config": null,
239
+ "pad_token_id": 0,
240
+ "parent_token": "[SCHEMA]",
241
+ "parent_token_index": 128002,
242
+ "per_task_parents": false,
243
+ "post_fusion_schema": "",
244
+ "projector_hidden_act": "gelu",
245
+ "rel_mode": "adjacency",
246
+ "rel_token": "[RELATION]",
247
+ "rel_token_index": 128004,
248
+ "relation_loss_coef": 1.0,
249
+ "relations_config": {
250
+ "adjacency_loss_coef": 1.0,
251
+ "anchor_context_gate_init": 0.1,
252
+ "anchor_context_gate_trainable": true,
253
+ "anchor_cross_attention_bias": null,
254
+ "anchor_layer": null,
255
+ "anchor_memory_position": null,
256
+ "anchor_memory_position_usage": null,
257
+ "anchor_mode": "fixed",
258
+ "anchor_modeling": "linear",
259
+ "anchor_normalization": "none",
260
+ "anchor_num_heads": 4,
261
+ "anchor_num_layers": 2,
262
+ "anchor_query_position": null,
263
+ "anchor_refine_heads": 8,
264
+ "anchor_refine_layer_scale_init": null,
265
+ "anchor_refine_layers": 0,
266
+ "anchor_refine_norm": "post_norm",
267
+ "anchor_refinement": null,
268
+ "anchor_self_attention_bias": null,
269
+ "embed_parent_token": true,
270
+ "embed_rel_token": true,
271
+ "feature_anchor_mlp": false,
272
+ "feature_anchor_mlp_hidden_multiplier": 1,
273
+ "focal_loss_alpha": 0.8,
274
+ "focal_loss_gamma": -1.0,
275
+ "focal_loss_prob_margin": 0.0,
276
+ "loss_coef": 1.0,
277
+ "max_count": 20,
278
+ "max_relation_entities": null,
279
+ "max_relation_span_width": null,
280
+ "neg_spans_ratio": 1.0,
281
+ "num_fixed_slots": 10,
282
+ "parent_token_index": -1,
283
+ "rel_token_index": 128004,
284
+ "relation_focal_loss_alpha": 0.8,
285
+ "relation_focal_loss_gamma": 2,
286
+ "relation_focal_loss_prob_margin": 0.0,
287
+ "relation_loss_coef": 1.0,
288
+ "relation_loss_reduction": "mean",
289
+ "relation_neighbor_chunk_size": 512,
290
+ "relation_span_nms": false,
291
+ "relation_top_k_neighbors": null,
292
+ "relations_layer": null,
293
+ "represent_spans": false,
294
+ "span_loss_coef": 1.0,
295
+ "span_loss_reduction": "mean",
296
+ "triples_layer": null
297
+ },
298
+ "relations_layer": null,
299
+ "represent_spans": false,
300
+ "sep_token": "[SEP]",
301
+ "seq_token": "[SEQ]",
302
+ "shared_anchor_modeling": null,
303
+ "shared_anchor_refine_heads": 8,
304
+ "shared_anchor_refine_layers": 0,
305
+ "shared_anchor_refinement": null,
306
+ "span_loss_coef": 1.0,
307
+ "span_mode": "markerV0",
308
+ "struct_parent_token": "[SCHEMA]",
309
+ "structuring_child_token": "<<CHILD>>",
310
+ "structuring_config": {
311
+ "anchor_context_gate_init": 0.1,
312
+ "anchor_context_gate_trainable": true,
313
+ "anchor_cross_attention_bias": {
314
+ "params": {
315
+ "sigma": 0.5,
316
+ "units": "query_steps",
317
+ "weight": 1.0
318
+ },
319
+ "type": "gaussian_distance"
320
+ },
321
+ "anchor_layer": {
322
+ "params": {
323
+ "num_slots": 100
324
+ },
325
+ "type": "fixed"
326
+ },
327
+ "anchor_memory_position": {
328
+ "params": {},
329
+ "type": "fourier"
330
+ },
331
+ "anchor_memory_position_usage": "keys_and_values",
332
+ "anchor_mode": "fixed_transformer",
333
+ "anchor_modeling": "linear",
334
+ "anchor_normalization": "center_rms",
335
+ "anchor_num_heads": 4,
336
+ "anchor_num_layers": 2,
337
+ "anchor_objectness": true,
338
+ "anchor_objectness_loss_coef": 1.0,
339
+ "anchor_objectness_threshold": 0.5,
340
+ "anchor_query_position": {
341
+ "params": {},
342
+ "type": "fourier"
343
+ },
344
+ "anchor_refine_heads": 8,
345
+ "anchor_refine_layer_scale_init": null,
346
+ "anchor_refine_layers": 0,
347
+ "anchor_refine_norm": "post_norm",
348
+ "anchor_refinement": {
349
+ "params": {
350
+ "layer_scale_init": 0.1,
351
+ "norm_style": "pre_norm",
352
+ "num_heads": 8,
353
+ "num_layers": 2
354
+ },
355
+ "type": "cross_attention"
356
+ },
357
+ "anchor_relations_focal_loss_alpha": 0.75,
358
+ "anchor_relations_focal_loss_gamma": null,
359
+ "anchor_relations_focal_loss_prob_margin": null,
360
+ "anchor_relations_layer": "mlp",
361
+ "anchor_relations_loss_coef": 1.0,
362
+ "anchor_relations_threshold": 0.5,
363
+ "anchor_self_attention_bias": null,
364
+ "assignment_loss_coef": 1.0,
365
+ "bio_loss_reduction": "mean",
366
+ "child_token_index": 128005,
367
+ "embed_child_token": true,
368
+ "embed_parent_token": true,
369
+ "entity_loss_coef": 1.0,
370
+ "feature_anchor_mlp": false,
371
+ "feature_anchor_mlp_hidden_multiplier": 1,
372
+ "focal_loss_alpha": 0.75,
373
+ "focal_loss_gamma": -1,
374
+ "focal_loss_prob_margin": 0.0,
375
+ "head_type": "structuring",
376
+ "log_loss_stats": false,
377
+ "log_loss_stats_every": 50,
378
+ "loss_coef": 1.0,
379
+ "masking": "none",
380
+ "matcher_dice_cost": 1.0,
381
+ "matcher_membership_cost": 1.0,
382
+ "matcher_membership_temperature": 1.0,
383
+ "matcher_objectness_cost": 0.5,
384
+ "matcher_objectness_temperature": 1.0,
385
+ "matching_focal_loss_alpha": 0.99,
386
+ "matching_focal_loss_gamma": null,
387
+ "matching_focal_loss_prob_margin": null,
388
+ "max_count": 100,
389
+ "memory_position_embedding_kwargs": {},
390
+ "memory_position_embedding_type": "none",
391
+ "memory_position_in_values": false,
392
+ "multi_level": true,
393
+ "neg_spans_ratio": 1.0,
394
+ "negatives": 1.0,
395
+ "ner_focal_loss_alpha": 0.75,
396
+ "ner_focal_loss_gamma": null,
397
+ "ner_focal_loss_prob_margin": null,
398
+ "num_fixed_slots": 10,
399
+ "objectness_focal_loss_alpha": 0.5,
400
+ "objectness_focal_loss_gamma": null,
401
+ "objectness_focal_loss_prob_margin": null,
402
+ "parent_token_index": 128002,
403
+ "position_bucket_attention_bias_type": "none",
404
+ "position_bucket_attention_bias_weight": 1.0,
405
+ "position_bucket_attention_sigma": 0.5,
406
+ "position_bucket_normalization": "none",
407
+ "query_position_embedding_kwargs": {},
408
+ "query_position_embedding_type": "none",
409
+ "represent_spans": true,
410
+ "reuse_ner_head": true,
411
+ "span_loss_coef": 1.0,
412
+ "span_loss_reduction": "mean",
413
+ "structure_mode": {
414
+ "decoder": null,
415
+ "decoder_options": {},
416
+ "params": {},
417
+ "processor": null,
418
+ "processor_options": {},
419
+ "type": "multi_level"
420
+ },
421
+ "use_anchor_matching": true
422
+ },
423
+ "structuring_end_token": "<<END>>",
424
+ "structuring_loss_coef": 1.0,
425
+ "subtoken_pooling": "first",
426
+ "token_loss_coef": 1.0,
427
+ "transformers_version": "5.16.1",
428
+ "triples_layer": null,
429
+ "use_layout": true,
430
+ "vision_center_crop_size": null,
431
+ "vision_do_normalize": false,
432
+ "vision_do_rescale": true,
433
+ "vision_image_mean": null,
434
+ "vision_image_std": null,
435
+ "vision_interpolation": "bilinear",
436
+ "vision_processor_name": null,
437
+ "vision_processor_type": "custom",
438
+ "vision_resize_size": null,
439
+ "vocab_size": 128008,
440
+ "words_splitter_type": "whitespace"
441
+ }