zyliu commited on
Commit
fe73b9d
1 Parent(s): 6b8fc0d

init commit

Browse files
added_tokens.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</box>": 92552,
3
+ "</det>": 92560,
4
+ "</grd>": 92562,
5
+ "</img>": 92545,
6
+ "</quad>": 92548,
7
+ "</ref>": 92550,
8
+ "</reg>": 92558,
9
+ "</s>": 2,
10
+ "<IMG_CONTEXT>": 92546,
11
+ "<box>": 92551,
12
+ "<det>": 92559,
13
+ "<grd>": 92561,
14
+ "<im_patch>": 92555,
15
+ "<image>": 92554,
16
+ "<img>": 92544,
17
+ "<quad>": 92547,
18
+ "<ref>": 92549,
19
+ "<reg>": 92557,
20
+ "<region>": 92556,
21
+ "<s>": 1,
22
+ "<unk>": 0,
23
+ "<|action_end|>": 92540,
24
+ "<|action_start|>": 92541,
25
+ "<|im_end|>": 92542,
26
+ "<|im_start|>": 92543,
27
+ "<|interpreter|>": 92539,
28
+ "<|plugin|>": 92538,
29
+ "[DET]": 92563,
30
+ "[EDIT]": 92568,
31
+ "[EMB2]": 92570,
32
+ "[EMB3]": 92571,
33
+ "[EMB4]": 92572,
34
+ "[EMB5]": 92573,
35
+ "[EMB6]": 92574,
36
+ "[EMB7]": 92575,
37
+ "[EMB8]": 92576,
38
+ "[EMB]": 92569,
39
+ "[GEN]": 92567,
40
+ "[GRD]": 92564,
41
+ "[PAD]": 92553,
42
+ "[POSE]": 92566,
43
+ "[SEG]": 92565
44
+ }
config.json ADDED
@@ -0,0 +1,576 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_commit_hash": null,
3
+ "_name_or_path": "/mnt/petrelfs/share_data/liuzhaoyang/share/vllm/internvl_scaleup_s3_3_ft_v1_ckpt_30000",
4
+ "architectures": [
5
+ "VisionLLMv2Model"
6
+ ],
7
+ "downsample_ratio": 0.5,
8
+ "gdino_config": {
9
+ "_commit_hash": null,
10
+ "_name_or_path": "checkpoints/grounding-dino-internimage-H",
11
+ "`_dropout": 0.0,
12
+ "activation_dropout": 0.0,
13
+ "activation_function": "relu",
14
+ "add_cross_attention": false,
15
+ "architectures": [
16
+ "GroundingDinoForObjectDetection"
17
+ ],
18
+ "attention_dropout": 0.0,
19
+ "auxiliary_loss": true,
20
+ "backbone_config": {
21
+ "model_type": "internimage-H"
22
+ },
23
+ "bad_words_ids": null,
24
+ "bbox_cost": 5.0,
25
+ "bbox_loss_coefficient": 5.0,
26
+ "begin_suppress_tokens": null,
27
+ "bos_token_id": null,
28
+ "box_cost": 5.0,
29
+ "box_weight": 5.0,
30
+ "chunk_size_feed_forward": 0,
31
+ "class_cost": 2.0,
32
+ "class_weight": 2.0,
33
+ "cross_attention_hidden_size": null,
34
+ "d_model": 256,
35
+ "decoder_attention_heads": 8,
36
+ "decoder_bbox_embed_share": true,
37
+ "decoder_ffn_dim": 2048,
38
+ "decoder_layers": 6,
39
+ "decoder_n_points": 4,
40
+ "decoder_start_token_id": null,
41
+ "dice_cost": 5.0,
42
+ "dice_weight": 5.0,
43
+ "disable_custom_kernels": false,
44
+ "diversity_penalty": 0.0,
45
+ "do_sample": false,
46
+ "dropout": 0.1,
47
+ "early_stopping": false,
48
+ "embedding_init_target": true,
49
+ "encoder_attention_heads": 8,
50
+ "encoder_ffn_dim": 2048,
51
+ "encoder_layers": 6,
52
+ "encoder_n_points": 4,
53
+ "encoder_no_repeat_ngram_size": 0,
54
+ "eos_token_id": null,
55
+ "exponential_decay_length_penalty": null,
56
+ "finetuning_task": null,
57
+ "focal_alpha": 0.25,
58
+ "forced_bos_token_id": null,
59
+ "forced_eos_token_id": null,
60
+ "fusion_dropout": 0.0,
61
+ "fusion_droppath": 0.1,
62
+ "giou_cost": 2.0,
63
+ "giou_loss_coefficient": 2.0,
64
+ "giou_weight": 2.0,
65
+ "id2label": {
66
+ "0": "LABEL_0",
67
+ "1": "LABEL_1"
68
+ },
69
+ "init_std": 0.02,
70
+ "is_decoder": false,
71
+ "is_encoder_decoder": true,
72
+ "l_hidden_size": 6144,
73
+ "label2id": {
74
+ "LABEL_0": 0,
75
+ "LABEL_1": 1
76
+ },
77
+ "length_penalty": 1.0,
78
+ "mask_cost": 5.0,
79
+ "mask_dim": 256,
80
+ "mask_weight": 5.0,
81
+ "max_length": 20,
82
+ "max_text_len": 256,
83
+ "min_length": 0,
84
+ "model_type": "grounding-dino",
85
+ "no_repeat_ngram_size": 0,
86
+ "norm": "GN",
87
+ "num_beam_groups": 1,
88
+ "num_beams": 1,
89
+ "num_embs": 4,
90
+ "num_feature_levels": 4,
91
+ "num_queries": 900,
92
+ "num_return_sequences": 1,
93
+ "output_attentions": false,
94
+ "output_hidden_states": false,
95
+ "output_scores": false,
96
+ "pad_token_id": null,
97
+ "position_embedding_type": "sine",
98
+ "positional_embedding_temperature": 20,
99
+ "prefix": null,
100
+ "problem_type": null,
101
+ "pruned_heads": {},
102
+ "query_dim": 4,
103
+ "remove_invalid_values": false,
104
+ "repetition_penalty": 1.0,
105
+ "return_dict": true,
106
+ "return_dict_in_generate": false,
107
+ "sep_token_id": null,
108
+ "suppress_tokens": null,
109
+ "task_specific_params": null,
110
+ "temperature": 1.0,
111
+ "text_backbone_config": {
112
+ "_name_or_path": "",
113
+ "add_cross_attention": false,
114
+ "architectures": null,
115
+ "attention_probs_dropout_prob": 0.1,
116
+ "bad_words_ids": null,
117
+ "begin_suppress_tokens": null,
118
+ "bos_token_id": null,
119
+ "chunk_size_feed_forward": 0,
120
+ "cross_attention_hidden_size": null,
121
+ "decoder_start_token_id": null,
122
+ "diversity_penalty": 0.0,
123
+ "do_sample": false,
124
+ "early_stopping": false,
125
+ "encoder_no_repeat_ngram_size": 0,
126
+ "eos_token_id": null,
127
+ "exponential_decay_length_penalty": null,
128
+ "finetuning_task": null,
129
+ "forced_bos_token_id": null,
130
+ "forced_eos_token_id": null,
131
+ "hidden_act": "gelu",
132
+ "hidden_dropout_prob": 0.1,
133
+ "hidden_size": 768,
134
+ "id2label": {
135
+ "0": "LABEL_0",
136
+ "1": "LABEL_1"
137
+ },
138
+ "init_std": 0.02,
139
+ "intermediate_size": 3072,
140
+ "is_decoder": false,
141
+ "is_encoder_decoder": false,
142
+ "label2id": {
143
+ "LABEL_0": 0,
144
+ "LABEL_1": 1
145
+ },
146
+ "layer_norm_eps": 1e-12,
147
+ "length_penalty": 1.0,
148
+ "max_length": 20,
149
+ "max_position_embeddings": 512,
150
+ "min_length": 0,
151
+ "model_type": "grounding-dino-text-prenet",
152
+ "no_repeat_ngram_size": 0,
153
+ "num_attention_heads": 12,
154
+ "num_beam_groups": 1,
155
+ "num_beams": 1,
156
+ "num_hidden_layers": 12,
157
+ "num_return_sequences": 1,
158
+ "output_attentions": false,
159
+ "output_hidden_states": false,
160
+ "output_scores": false,
161
+ "pad_token_id": 0,
162
+ "position_embedding_type": "absolute",
163
+ "prefix": null,
164
+ "problem_type": null,
165
+ "pruned_heads": {},
166
+ "remove_invalid_values": false,
167
+ "repetition_penalty": 1.0,
168
+ "return_dict": true,
169
+ "return_dict_in_generate": false,
170
+ "sep_token_id": null,
171
+ "suppress_tokens": null,
172
+ "task_specific_params": null,
173
+ "temperature": 1.0,
174
+ "tf_legacy_loss": false,
175
+ "tie_encoder_decoder": false,
176
+ "tie_word_embeddings": true,
177
+ "tokenizer_class": null,
178
+ "top_k": 50,
179
+ "top_p": 1.0,
180
+ "torch_dtype": null,
181
+ "torchscript": false,
182
+ "transformers_version": "4.34.0",
183
+ "type_vocab_size": 2,
184
+ "typical_p": 1.0,
185
+ "use_bfloat16": false,
186
+ "vocab_size": 30522
187
+ },
188
+ "text_enhancer_dropout": 0.0,
189
+ "tf_legacy_loss": false,
190
+ "tie_encoder_decoder": false,
191
+ "tie_word_embeddings": true,
192
+ "tokenizer_class": null,
193
+ "top_k": 50,
194
+ "top_p": 1.0,
195
+ "torch_dtype": "float32",
196
+ "torchscript": false,
197
+ "transformers_version": "4.36.0.dev0",
198
+ "two_stage": true,
199
+ "two_stage_bbox_embed_share": false,
200
+ "typical_p": 1.0,
201
+ "use_bfloat16": false
202
+ },
203
+ "ip2p_config": {
204
+ "_name_or_path": "visionllmv2/model/instruct_pix2pix/ip2p.json",
205
+ "add_cross_attention": false,
206
+ "architectures": [
207
+ "InstructPix2PixWithLLMEmbConfig"
208
+ ],
209
+ "bad_words_ids": null,
210
+ "begin_suppress_tokens": null,
211
+ "bos_token_id": null,
212
+ "cfg_drop_rate": 0.05,
213
+ "cfg_scale": 7.5,
214
+ "chunk_size_feed_forward": 0,
215
+ "cross_attention_hidden_size": null,
216
+ "decoder_start_token_id": null,
217
+ "diversity_penalty": 0.0,
218
+ "do_sample": false,
219
+ "early_stopping": false,
220
+ "embed_tokens": {
221
+ "emb": "[EMB]",
222
+ "emb2": "[EMB2]",
223
+ "emb3": "[EMB3]",
224
+ "emb4": "[EMB4]",
225
+ "emb5": "[EMB5]",
226
+ "emb6": "[EMB6]",
227
+ "emb7": "[EMB7]",
228
+ "emb8": "[EMB8]"
229
+ },
230
+ "encoder_no_repeat_ngram_size": 0,
231
+ "eos_token_id": null,
232
+ "exponential_decay_length_penalty": null,
233
+ "finetuning_task": null,
234
+ "forced_bos_token_id": null,
235
+ "forced_eos_token_id": null,
236
+ "id2label": {
237
+ "0": "LABEL_0",
238
+ "1": "LABEL_1"
239
+ },
240
+ "is_decoder": false,
241
+ "is_encoder_decoder": false,
242
+ "label2id": {
243
+ "LABEL_0": 0,
244
+ "LABEL_1": 1
245
+ },
246
+ "length_penalty": 1.0,
247
+ "llm_hidden_size": 6144,
248
+ "max_length": 20,
249
+ "min_length": 0,
250
+ "model_type": "instructpix2pix_with_llm_emb",
251
+ "no_repeat_ngram_size": 0,
252
+ "num_beam_groups": 1,
253
+ "num_beams": 1,
254
+ "num_decoder_layers": 1,
255
+ "num_embed_tokens": 64,
256
+ "num_encoder_layers": 1,
257
+ "num_queries": 77,
258
+ "num_return_sequences": 1,
259
+ "output_attentions": false,
260
+ "output_hidden_states": false,
261
+ "output_scores": false,
262
+ "pad_token_id": null,
263
+ "prefix": null,
264
+ "problem_type": null,
265
+ "pruned_heads": {},
266
+ "remove_invalid_values": false,
267
+ "repetition_penalty": 1.0,
268
+ "return_dict": true,
269
+ "return_dict_in_generate": false,
270
+ "sd_hidden_size": 768,
271
+ "sd_model_id": "timbrooks/instruct-pix2pix",
272
+ "sep_token_id": null,
273
+ "suppress_tokens": null,
274
+ "task_specific_params": null,
275
+ "temperature": 1.0,
276
+ "tf_legacy_loss": false,
277
+ "tie_encoder_decoder": false,
278
+ "tie_word_embeddings": true,
279
+ "tokenizer_class": null,
280
+ "top_k": 50,
281
+ "top_p": 1.0,
282
+ "torch_dtype": null,
283
+ "torchscript": false,
284
+ "transformers_version": "4.34.0",
285
+ "trigger_token": "[EDIT]",
286
+ "trigger_token_id": 92568,
287
+ "typical_p": 1.0,
288
+ "use_bfloat16": false
289
+ },
290
+ "l_hidden_size": 6144,
291
+ "llm_config": {
292
+ "_name_or_path": "pretrained/internlm2-chat-20b/",
293
+ "add_cross_attention": false,
294
+ "architectures": [
295
+ "InternLM2ForCausalLM"
296
+ ],
297
+ "attention_bias": false,
298
+ "attn_implementation": "flash_attention_2",
299
+ "auto_map": {
300
+ "AutoConfig": "configuration_internlm2.InternLM2Config",
301
+ "AutoModel": "modeling_internlm2.InternLM2ForCausalLM",
302
+ "AutoModelForCausalLM": "modeling_internlm2.InternLM2ForCausalLM"
303
+ },
304
+ "bad_words_ids": null,
305
+ "begin_suppress_tokens": null,
306
+ "bias": false,
307
+ "bos_token_id": 1,
308
+ "chunk_size_feed_forward": 0,
309
+ "cross_attention_hidden_size": null,
310
+ "decoder_start_token_id": null,
311
+ "diversity_penalty": 0.0,
312
+ "do_sample": false,
313
+ "early_stopping": false,
314
+ "encoder_no_repeat_ngram_size": 0,
315
+ "eos_token_id": 2,
316
+ "exponential_decay_length_penalty": null,
317
+ "finetuning_task": null,
318
+ "forced_bos_token_id": null,
319
+ "forced_eos_token_id": null,
320
+ "hidden_act": "silu",
321
+ "hidden_size": 6144,
322
+ "id2label": {
323
+ "0": "LABEL_0",
324
+ "1": "LABEL_1"
325
+ },
326
+ "initializer_range": 0.02,
327
+ "intermediate_size": 16384,
328
+ "is_decoder": false,
329
+ "is_encoder_decoder": false,
330
+ "label2id": {
331
+ "LABEL_0": 0,
332
+ "LABEL_1": 1
333
+ },
334
+ "length_penalty": 1.0,
335
+ "max_length": 20,
336
+ "max_position_embeddings": 32768,
337
+ "min_length": 0,
338
+ "model_type": "llama",
339
+ "no_repeat_ngram_size": 0,
340
+ "num_attention_heads": 48,
341
+ "num_beam_groups": 1,
342
+ "num_beams": 1,
343
+ "num_hidden_layers": 48,
344
+ "num_key_value_heads": 8,
345
+ "num_return_sequences": 1,
346
+ "output_attentions": false,
347
+ "output_hidden_states": false,
348
+ "output_scores": false,
349
+ "pad_token_id": 2,
350
+ "prefix": null,
351
+ "pretraining_tp": 1,
352
+ "problem_type": null,
353
+ "pruned_heads": {},
354
+ "remove_invalid_values": false,
355
+ "repetition_penalty": 1.0,
356
+ "return_dict": true,
357
+ "return_dict_in_generate": false,
358
+ "rms_norm_eps": 1e-05,
359
+ "rope_scaling": {
360
+ "factor": 3.0,
361
+ "type": "dynamic"
362
+ },
363
+ "rope_theta": 1000000,
364
+ "sep_token_id": null,
365
+ "suppress_tokens": null,
366
+ "task_specific_params": null,
367
+ "temperature": 1.0,
368
+ "tf_legacy_loss": false,
369
+ "tie_encoder_decoder": false,
370
+ "tie_word_embeddings": false,
371
+ "tokenizer_class": null,
372
+ "top_k": 50,
373
+ "top_p": 1.0,
374
+ "torch_dtype": "bfloat16",
375
+ "torchscript": false,
376
+ "transformers_version": "4.34.0",
377
+ "typical_p": 1.0,
378
+ "use_bfloat16": false,
379
+ "use_cache": true,
380
+ "vocab_size": 92577
381
+ },
382
+ "model_type": "visionllmv2",
383
+ "num_embs": 4,
384
+ "num_embs_gen": 64,
385
+ "pretrained_vl_bridge": null,
386
+ "sd_config": {
387
+ "_name_or_path": "visionllmv2/model/stable_diffusion/sd.json",
388
+ "add_cross_attention": false,
389
+ "architectures": [
390
+ "StableDiffusionWithLLMEmbConfig"
391
+ ],
392
+ "bad_words_ids": null,
393
+ "begin_suppress_tokens": null,
394
+ "bos_token_id": null,
395
+ "cfg_drop_rate": 0.1,
396
+ "cfg_scale": 7.5,
397
+ "chunk_size_feed_forward": 0,
398
+ "cross_attention_hidden_size": null,
399
+ "decoder_start_token_id": null,
400
+ "diversity_penalty": 0.0,
401
+ "do_sample": false,
402
+ "early_stopping": false,
403
+ "embed_tokens": {
404
+ "emb": "[EMB]",
405
+ "emb2": "[EMB2]",
406
+ "emb3": "[EMB3]",
407
+ "emb4": "[EMB4]",
408
+ "emb5": "[EMB5]",
409
+ "emb6": "[EMB6]",
410
+ "emb7": "[EMB7]",
411
+ "emb8": "[EMB8]"
412
+ },
413
+ "encoder_no_repeat_ngram_size": 0,
414
+ "eos_token_id": null,
415
+ "exponential_decay_length_penalty": null,
416
+ "finetuning_task": null,
417
+ "forced_bos_token_id": null,
418
+ "forced_eos_token_id": null,
419
+ "id2label": {
420
+ "0": "LABEL_0",
421
+ "1": "LABEL_1"
422
+ },
423
+ "is_decoder": false,
424
+ "is_encoder_decoder": false,
425
+ "label2id": {
426
+ "LABEL_0": 0,
427
+ "LABEL_1": 1
428
+ },
429
+ "length_penalty": 1.0,
430
+ "llm_hidden_size": 6144,
431
+ "max_length": 20,
432
+ "min_length": 0,
433
+ "model_type": "stable_diffusion_with_llm_emb",
434
+ "no_repeat_ngram_size": 0,
435
+ "num_beam_groups": 1,
436
+ "num_beams": 1,
437
+ "num_decoder_layers": 1,
438
+ "num_embed_tokens": 64,
439
+ "num_encoder_layers": 1,
440
+ "num_queries": 77,
441
+ "num_return_sequences": 1,
442
+ "output_attentions": false,
443
+ "output_hidden_states": false,
444
+ "output_scores": false,
445
+ "pad_token_id": null,
446
+ "prefix": null,
447
+ "problem_type": null,
448
+ "pruned_heads": {},
449
+ "remove_invalid_values": false,
450
+ "repetition_penalty": 1.0,
451
+ "return_dict": true,
452
+ "return_dict_in_generate": false,
453
+ "sd_hidden_size": 768,
454
+ "sd_model_id": "runwayml/stable-diffusion-v1-5",
455
+ "sep_token_id": null,
456
+ "suppress_tokens": null,
457
+ "task_specific_params": null,
458
+ "temperature": 1.0,
459
+ "tf_legacy_loss": false,
460
+ "tie_encoder_decoder": false,
461
+ "tie_word_embeddings": true,
462
+ "tokenizer_class": null,
463
+ "top_k": 50,
464
+ "top_p": 1.0,
465
+ "torch_dtype": null,
466
+ "torchscript": false,
467
+ "transformers_version": "4.34.0",
468
+ "trigger_token": "[GEN]",
469
+ "trigger_token_id": 92567,
470
+ "typical_p": 1.0,
471
+ "use_bfloat16": false
472
+ },
473
+ "torch_dtype": "bfloat16",
474
+ "transformers_version": null,
475
+ "unipose_config": null,
476
+ "use_gdino": true,
477
+ "use_internvl": true,
478
+ "use_ip2p": true,
479
+ "use_llm_lora": false,
480
+ "use_pixelshuffle": true,
481
+ "use_region_encoder": false,
482
+ "use_sd": true,
483
+ "use_unipose": false,
484
+ "v_hidden_size": 3200,
485
+ "vis_encoder_config": {
486
+ "_name_or_path": "OpenGVLab/InternViT-6B-448px-V1-5",
487
+ "add_cross_attention": false,
488
+ "architectures": [
489
+ "InternVisionModel"
490
+ ],
491
+ "attention_dropout": 0.0,
492
+ "auto_map": {
493
+ "AutoConfig": "configuration_intern_vit.InternVisionConfig",
494
+ "AutoModel": "modeling_intern_vit.InternVisionModel"
495
+ },
496
+ "bad_words_ids": null,
497
+ "begin_suppress_tokens": null,
498
+ "bos_token_id": null,
499
+ "chunk_size_feed_forward": 0,
500
+ "cross_attention_hidden_size": null,
501
+ "decoder_start_token_id": null,
502
+ "diversity_penalty": 0.0,
503
+ "do_sample": false,
504
+ "drop_path_rate": 0.4,
505
+ "dropout": 0.0,
506
+ "early_stopping": false,
507
+ "encoder_no_repeat_ngram_size": 0,
508
+ "eos_token_id": null,
509
+ "exponential_decay_length_penalty": null,
510
+ "finetuning_task": null,
511
+ "forced_bos_token_id": null,
512
+ "forced_eos_token_id": null,
513
+ "hidden_act": "gelu",
514
+ "hidden_size": 3200,
515
+ "id2label": {
516
+ "0": "LABEL_0",
517
+ "1": "LABEL_1"
518
+ },
519
+ "image_size": 448,
520
+ "initializer_factor": 0.1,
521
+ "initializer_range": 1e-10,
522
+ "intermediate_size": 12800,
523
+ "is_decoder": false,
524
+ "is_encoder_decoder": false,
525
+ "label2id": {
526
+ "LABEL_0": 0,
527
+ "LABEL_1": 1
528
+ },
529
+ "layer_norm_eps": 1e-06,
530
+ "length_penalty": 1.0,
531
+ "max_length": 20,
532
+ "min_length": 0,
533
+ "model_type": "clip_vision_model",
534
+ "no_repeat_ngram_size": 0,
535
+ "norm_type": "rms_norm",
536
+ "num_attention_heads": 25,
537
+ "num_beam_groups": 1,
538
+ "num_beams": 1,
539
+ "num_channels": 3,
540
+ "num_hidden_layers": 45,
541
+ "num_return_sequences": 1,
542
+ "output_attentions": false,
543
+ "output_hidden_states": false,
544
+ "output_scores": false,
545
+ "pad_token_id": null,
546
+ "patch_size": 14,
547
+ "prefix": null,
548
+ "problem_type": null,
549
+ "projection_dim": 512,
550
+ "pruned_heads": {},
551
+ "qk_normalization": true,
552
+ "qkv_bias": false,
553
+ "remove_invalid_values": false,
554
+ "repetition_penalty": 1.0,
555
+ "return_dict": true,
556
+ "return_dict_in_generate": false,
557
+ "sep_token_id": null,
558
+ "suppress_tokens": null,
559
+ "task_specific_params": null,
560
+ "temperature": 1.0,
561
+ "tf_legacy_loss": false,
562
+ "tie_encoder_decoder": false,
563
+ "tie_word_embeddings": true,
564
+ "tokenizer_class": null,
565
+ "top_k": 50,
566
+ "top_p": 1.0,
567
+ "torch_dtype": "bfloat16",
568
+ "torchscript": false,
569
+ "transformers_version": "4.34.0",
570
+ "typical_p": 1.0,
571
+ "use_bfloat16": true,
572
+ "use_flash_attn": true
573
+ },
574
+ "vis_output_layer": -1,
575
+ "vl_bridge_type": "internvl"
576
+ }
generation_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "transformers_version": "4.34.0"
4
+ }
pytorch_model-00001-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b6afd7ec251278870a415046acd5b7731513564167b0ae28d410ab803f69f6f
3
+ size 9925943736
pytorch_model-00002-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c38eec0147b8bb8edab8e2a250de6d57d9e80ddc27e60a2c8c93e7176a92c3d6
3
+ size 9885161269
pytorch_model-00003-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e88b31c6551076b8cf88a4e2ff2ae6531b1104d7e162da4443bf97343290ee4f
3
+ size 9940850947
pytorch_model-00004-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:283ff9adbecc5b58cc720e9f10e3c92e44a7e9a2a4ff9949a174d78b25b9c4e0
3
+ size 9940850971
pytorch_model-00005-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce381c748ca61de2881ffd4b29f8d05ce48a0109a73e205d28207b16d1479a1f
3
+ size 9966029083
pytorch_model-00006-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31126be65eda8e0b48102835f6bee6641dee544562486f6b524dd68fff8a2c07
3
+ size 7965295911
pytorch_model.bin.index.json ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<unk>",
4
+ "<s>",
5
+ "</s>",
6
+ "<|plugin|>",
7
+ "<|interpreter|>",
8
+ "<|action_end|>",
9
+ "<|action_start|>",
10
+ "<|im_end|>",
11
+ "<|im_start|>",
12
+ "<img>",
13
+ "</img>",
14
+ "<IMG_CONTEXT>",
15
+ "<quad>",
16
+ "</quad>",
17
+ "<ref>",
18
+ "</ref>",
19
+ "<box>",
20
+ "</box>",
21
+ "[PAD]",
22
+ "<image>",
23
+ "<im_patch>",
24
+ "<region>",
25
+ "<reg>",
26
+ "</reg>",
27
+ "<det>",
28
+ "</det>",
29
+ "<grd>",
30
+ "</grd>",
31
+ "[DET]",
32
+ "[GRD]",
33
+ "[SEG]",
34
+ "[POSE]",
35
+ "[GEN]",
36
+ "[EDIT]",
37
+ "[EMB]",
38
+ "[EMB2]",
39
+ "[EMB3]",
40
+ "[EMB4]",
41
+ "[EMB5]",
42
+ "[EMB6]",
43
+ "[EMB7]",
44
+ "[EMB8]"
45
+ ],
46
+ "bos_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "pad_token": "<unk>",
49
+ "unk_token": "<unk>"
50
+ }
tokenization_internlm2.py ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) The InternLM team and The HuggingFace Inc. team. All rights reserved.
2
+ #
3
+ # This code is based on transformers/src/transformers/models/llama/tokenization_llama.py
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ """Tokenization classes for InternLM."""
18
+ import os
19
+ from shutil import copyfile
20
+ from typing import Any, Dict, List, Optional, Tuple
21
+
22
+ import sentencepiece as spm
23
+ from transformers.tokenization_utils import PreTrainedTokenizer
24
+ from transformers.utils import logging
25
+
26
+ logger = logging.get_logger(__name__)
27
+
28
+ VOCAB_FILES_NAMES = {'vocab_file': './tokenizer.model'}
29
+
30
+ PRETRAINED_VOCAB_FILES_MAP = {}
31
+
32
+
33
+ # Modified from transformers.model.llama.tokenization_llama.LlamaTokenizer
34
+ class InternLM2Tokenizer(PreTrainedTokenizer):
35
+ """
36
+ Construct a InternLM2 tokenizer. Based on byte-level Byte-Pair-Encoding.
37
+
38
+ Args:
39
+ vocab_file (`str`):
40
+ Path to the vocabulary file.
41
+ """
42
+
43
+ vocab_files_names = VOCAB_FILES_NAMES
44
+ pretrained_vocab_files_map = PRETRAINED_VOCAB_FILES_MAP
45
+ model_input_names = ['input_ids', 'attention_mask']
46
+ _auto_class = 'AutoTokenizer'
47
+
48
+ def __init__(
49
+ self,
50
+ vocab_file,
51
+ unk_token='<unk>',
52
+ bos_token='<s>',
53
+ eos_token='</s>',
54
+ pad_token='</s>',
55
+ sp_model_kwargs: Optional[Dict[str, Any]] = None,
56
+ add_bos_token=True,
57
+ add_eos_token=False,
58
+ decode_with_prefix_space=False,
59
+ clean_up_tokenization_spaces=False,
60
+ **kwargs,
61
+ ):
62
+ self.sp_model_kwargs = {} if sp_model_kwargs is None else sp_model_kwargs
63
+ self.vocab_file = vocab_file
64
+ self.add_bos_token = add_bos_token
65
+ self.add_eos_token = add_eos_token
66
+ self.decode_with_prefix_space = decode_with_prefix_space
67
+ self.sp_model = spm.SentencePieceProcessor(**self.sp_model_kwargs)
68
+ self.sp_model.Load(vocab_file)
69
+ self._no_prefix_space_tokens = None
70
+ super().__init__(
71
+ bos_token=bos_token,
72
+ eos_token=eos_token,
73
+ unk_token=unk_token,
74
+ pad_token=pad_token,
75
+ clean_up_tokenization_spaces=clean_up_tokenization_spaces,
76
+ **kwargs,
77
+ )
78
+
79
+ @property
80
+ def no_prefix_space_tokens(self):
81
+ if self._no_prefix_space_tokens is None:
82
+ vocab = self.convert_ids_to_tokens(list(range(self.vocab_size)))
83
+ self._no_prefix_space_tokens = {i for i, tok in enumerate(vocab) if not tok.startswith('▁')}
84
+ return self._no_prefix_space_tokens
85
+
86
+ @property
87
+ def vocab_size(self):
88
+ """Returns vocab size"""
89
+ return self.sp_model.get_piece_size()
90
+
91
+ @property
92
+ def bos_token_id(self) -> Optional[int]:
93
+ return self.sp_model.bos_id()
94
+
95
+ @property
96
+ def eos_token_id(self) -> Optional[int]:
97
+ return self.sp_model.eos_id()
98
+
99
+ def get_vocab(self):
100
+ """Returns vocab as a dict"""
101
+ vocab = {self.convert_ids_to_tokens(i): i for i in range(self.vocab_size)}
102
+ vocab.update(self.added_tokens_encoder)
103
+ return vocab
104
+
105
+ def _tokenize(self, text):
106
+ """Returns a tokenized string."""
107
+ return self.sp_model.encode(text, out_type=str)
108
+
109
+ def _convert_token_to_id(self, token):
110
+ """Converts a token (str) in an id using the vocab."""
111
+ return self.sp_model.piece_to_id(token)
112
+
113
+ def _convert_id_to_token(self, index):
114
+ """Converts an index (integer) in a token (str) using the vocab."""
115
+ token = self.sp_model.IdToPiece(index)
116
+ return token
117
+
118
+ def _maybe_add_prefix_space(self, tokens, decoded):
119
+ if tokens and tokens[0] not in self.no_prefix_space_tokens:
120
+ return ' ' + decoded
121
+ else:
122
+ return decoded
123
+
124
+ def convert_tokens_to_string(self, tokens):
125
+ """Converts a sequence of tokens (string) in a single string."""
126
+ current_sub_tokens = []
127
+ out_string = ''
128
+ prev_is_special = False
129
+ for token in tokens:
130
+ # make sure that special tokens are not decoded using sentencepiece model
131
+ if token in self.all_special_tokens:
132
+ if not prev_is_special:
133
+ out_string += ' '
134
+ out_string += self.sp_model.decode(current_sub_tokens) + token
135
+ prev_is_special = True
136
+ current_sub_tokens = []
137
+ else:
138
+ current_sub_tokens.append(token)
139
+ prev_is_special = False
140
+ out_string += self.sp_model.decode(current_sub_tokens)
141
+ out_string = self.clean_up_tokenization(out_string)
142
+ out_string = self._maybe_add_prefix_space(tokens=tokens, decoded=out_string)
143
+ return out_string[1:]
144
+
145
+ def save_vocabulary(self, save_directory, filename_prefix: Optional[str] = None) -> Tuple[str]:
146
+ """
147
+ Save the vocabulary and special tokens file to a directory.
148
+
149
+ Args:
150
+ save_directory (`str`):
151
+ The directory in which to save the vocabulary.
152
+
153
+ Returns:
154
+ `Tuple(str)`: Paths to the files saved.
155
+ """
156
+ if not os.path.isdir(save_directory):
157
+ logger.error(f'Vocabulary path ({save_directory}) should be a directory')
158
+ return
159
+ out_vocab_file = os.path.join(
160
+ save_directory, (filename_prefix + '-' if filename_prefix else '') + VOCAB_FILES_NAMES['vocab_file']
161
+ )
162
+
163
+ if os.path.abspath(self.vocab_file) != os.path.abspath(out_vocab_file) and os.path.isfile(self.vocab_file):
164
+ copyfile(self.vocab_file, out_vocab_file)
165
+ elif not os.path.isfile(self.vocab_file):
166
+ with open(out_vocab_file, 'wb') as fi:
167
+ content_spiece_model = self.sp_model.serialized_model_proto()
168
+ fi.write(content_spiece_model)
169
+
170
+ return (out_vocab_file,)
171
+
172
+ def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None):
173
+ if self.add_bos_token:
174
+ bos_token_ids = [self.bos_token_id]
175
+ else:
176
+ bos_token_ids = []
177
+
178
+ output = bos_token_ids + token_ids_0
179
+
180
+ if token_ids_1 is not None:
181
+ output = output + token_ids_1
182
+
183
+ if self.add_eos_token:
184
+ output = output + [self.eos_token_id]
185
+
186
+ return output
187
+
188
+ def get_special_tokens_mask(
189
+ self, token_ids_0: List[int], token_ids_1: Optional[List[int]] = None, already_has_special_tokens: bool = False
190
+ ) -> List[int]:
191
+ """
192
+ Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
193
+ special tokens using the tokenizer `prepare_for_model` method.
194
+
195
+ Args:
196
+ token_ids_0 (`List[int]`):
197
+ List of IDs.
198
+ token_ids_1 (`List[int]`, *optional*):
199
+ Optional second list of IDs for sequence pairs.
200
+ already_has_special_tokens (`bool`, *optional*, defaults to `False`):
201
+ Whether or not the token list is already formatted with special tokens for the model.
202
+
203
+ Returns:
204
+ `List[int]`: A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.
205
+ """
206
+ if already_has_special_tokens:
207
+ return super().get_special_tokens_mask(
208
+ token_ids_0=token_ids_0, token_ids_1=token_ids_1, already_has_special_tokens=True
209
+ )
210
+
211
+ if token_ids_1 is None:
212
+ return [1] + ([0] * len(token_ids_0)) + [1]
213
+ return [1] + ([0] * len(token_ids_0)) + [1, 1] + ([0] * len(token_ids_1)) + [1]
214
+
215
+ def create_token_type_ids_from_sequences(
216
+ self, token_ids_0: List[int], token_ids_1: Optional[List[int]] = None
217
+ ) -> List[int]:
218
+ """
219
+ Create a mask from the two sequences passed to be used in a sequence-pair classification task. T5 does not make
220
+ use of token type ids, therefore a list of zeros is returned.
221
+
222
+ Args:
223
+ token_ids_0 (`List[int]`):
224
+ List of IDs.
225
+ token_ids_1 (`List[int]`, *optional*):
226
+ Optional second list of IDs for sequence pairs.
227
+
228
+ Returns:
229
+ `List[int]`: List of zeros.
230
+ """
231
+ eos = [self.eos_token_id]
232
+
233
+ if token_ids_1 is None:
234
+ return len(token_ids_0 + eos) * [0]
235
+ return len(token_ids_0 + eos + token_ids_1 + eos) * [0]
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f868398fc4e05ee1e8aeba95ddf18ddcc45b8bce55d5093bead5bbf80429b48b
3
+ size 1477754
tokenizer_config.json ADDED
@@ -0,0 +1,400 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<unk>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<s>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "92538": {
28
+ "content": "<|plugin|>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "92539": {
36
+ "content": "<|interpreter|>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "92540": {
44
+ "content": "<|action_end|>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "92541": {
52
+ "content": "<|action_start|>",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ },
59
+ "92542": {
60
+ "content": "<|im_end|>",
61
+ "lstrip": false,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": true
66
+ },
67
+ "92543": {
68
+ "content": "<|im_start|>",
69
+ "lstrip": false,
70
+ "normalized": false,
71
+ "rstrip": false,
72
+ "single_word": false,
73
+ "special": true
74
+ },
75
+ "92544": {
76
+ "content": "<img>",
77
+ "lstrip": true,
78
+ "normalized": false,
79
+ "rstrip": true,
80
+ "single_word": false,
81
+ "special": true
82
+ },
83
+ "92545": {
84
+ "content": "</img>",
85
+ "lstrip": true,
86
+ "normalized": false,
87
+ "rstrip": true,
88
+ "single_word": false,
89
+ "special": true
90
+ },
91
+ "92546": {
92
+ "content": "<IMG_CONTEXT>",
93
+ "lstrip": false,
94
+ "normalized": false,
95
+ "rstrip": false,
96
+ "single_word": false,
97
+ "special": true
98
+ },
99
+ "92547": {
100
+ "content": "<quad>",
101
+ "lstrip": false,
102
+ "normalized": false,
103
+ "rstrip": false,
104
+ "single_word": false,
105
+ "special": true
106
+ },
107
+ "92548": {
108
+ "content": "</quad>",
109
+ "lstrip": false,
110
+ "normalized": false,
111
+ "rstrip": false,
112
+ "single_word": false,
113
+ "special": true
114
+ },
115
+ "92549": {
116
+ "content": "<ref>",
117
+ "lstrip": false,
118
+ "normalized": false,
119
+ "rstrip": false,
120
+ "single_word": false,
121
+ "special": true
122
+ },
123
+ "92550": {
124
+ "content": "</ref>",
125
+ "lstrip": false,
126
+ "normalized": false,
127
+ "rstrip": false,
128
+ "single_word": false,
129
+ "special": true
130
+ },
131
+ "92551": {
132
+ "content": "<box>",
133
+ "lstrip": false,
134
+ "normalized": false,
135
+ "rstrip": false,
136
+ "single_word": false,
137
+ "special": true
138
+ },
139
+ "92552": {
140
+ "content": "</box>",
141
+ "lstrip": false,
142
+ "normalized": false,
143
+ "rstrip": false,
144
+ "single_word": false,
145
+ "special": true
146
+ },
147
+ "92553": {
148
+ "content": "[PAD]",
149
+ "lstrip": true,
150
+ "normalized": false,
151
+ "rstrip": true,
152
+ "single_word": false,
153
+ "special": true
154
+ },
155
+ "92554": {
156
+ "content": "<image>",
157
+ "lstrip": true,
158
+ "normalized": false,
159
+ "rstrip": true,
160
+ "single_word": false,
161
+ "special": true
162
+ },
163
+ "92555": {
164
+ "content": "<im_patch>",
165
+ "lstrip": true,
166
+ "normalized": false,
167
+ "rstrip": true,
168
+ "single_word": false,
169
+ "special": true
170
+ },
171
+ "92556": {
172
+ "content": "<region>",
173
+ "lstrip": true,
174
+ "normalized": false,
175
+ "rstrip": true,
176
+ "single_word": false,
177
+ "special": true
178
+ },
179
+ "92557": {
180
+ "content": "<reg>",
181
+ "lstrip": true,
182
+ "normalized": false,
183
+ "rstrip": true,
184
+ "single_word": false,
185
+ "special": true
186
+ },
187
+ "92558": {
188
+ "content": "</reg>",
189
+ "lstrip": true,
190
+ "normalized": false,
191
+ "rstrip": true,
192
+ "single_word": false,
193
+ "special": true
194
+ },
195
+ "92559": {
196
+ "content": "<det>",
197
+ "lstrip": true,
198
+ "normalized": false,
199
+ "rstrip": true,
200
+ "single_word": false,
201
+ "special": true
202
+ },
203
+ "92560": {
204
+ "content": "</det>",
205
+ "lstrip": true,
206
+ "normalized": false,
207
+ "rstrip": true,
208
+ "single_word": false,
209
+ "special": true
210
+ },
211
+ "92561": {
212
+ "content": "<grd>",
213
+ "lstrip": true,
214
+ "normalized": false,
215
+ "rstrip": true,
216
+ "single_word": false,
217
+ "special": true
218
+ },
219
+ "92562": {
220
+ "content": "</grd>",
221
+ "lstrip": true,
222
+ "normalized": false,
223
+ "rstrip": true,
224
+ "single_word": false,
225
+ "special": true
226
+ },
227
+ "92563": {
228
+ "content": "[DET]",
229
+ "lstrip": true,
230
+ "normalized": false,
231
+ "rstrip": true,
232
+ "single_word": false,
233
+ "special": true
234
+ },
235
+ "92564": {
236
+ "content": "[GRD]",
237
+ "lstrip": true,
238
+ "normalized": false,
239
+ "rstrip": true,
240
+ "single_word": false,
241
+ "special": true
242
+ },
243
+ "92565": {
244
+ "content": "[SEG]",
245
+ "lstrip": true,
246
+ "normalized": false,
247
+ "rstrip": true,
248
+ "single_word": false,
249
+ "special": true
250
+ },
251
+ "92566": {
252
+ "content": "[POSE]",
253
+ "lstrip": true,
254
+ "normalized": false,
255
+ "rstrip": true,
256
+ "single_word": false,
257
+ "special": true
258
+ },
259
+ "92567": {
260
+ "content": "[GEN]",
261
+ "lstrip": true,
262
+ "normalized": false,
263
+ "rstrip": true,
264
+ "single_word": false,
265
+ "special": true
266
+ },
267
+ "92568": {
268
+ "content": "[EDIT]",
269
+ "lstrip": true,
270
+ "normalized": false,
271
+ "rstrip": true,
272
+ "single_word": false,
273
+ "special": true
274
+ },
275
+ "92569": {
276
+ "content": "[EMB]",
277
+ "lstrip": true,
278
+ "normalized": false,
279
+ "rstrip": true,
280
+ "single_word": false,
281
+ "special": true
282
+ },
283
+ "92570": {
284
+ "content": "[EMB2]",
285
+ "lstrip": true,
286
+ "normalized": false,
287
+ "rstrip": true,
288
+ "single_word": false,
289
+ "special": true
290
+ },
291
+ "92571": {
292
+ "content": "[EMB3]",
293
+ "lstrip": true,
294
+ "normalized": false,
295
+ "rstrip": true,
296
+ "single_word": false,
297
+ "special": true
298
+ },
299
+ "92572": {
300
+ "content": "[EMB4]",
301
+ "lstrip": true,
302
+ "normalized": false,
303
+ "rstrip": true,
304
+ "single_word": false,
305
+ "special": true
306
+ },
307
+ "92573": {
308
+ "content": "[EMB5]",
309
+ "lstrip": true,
310
+ "normalized": false,
311
+ "rstrip": true,
312
+ "single_word": false,
313
+ "special": true
314
+ },
315
+ "92574": {
316
+ "content": "[EMB6]",
317
+ "lstrip": true,
318
+ "normalized": false,
319
+ "rstrip": true,
320
+ "single_word": false,
321
+ "special": true
322
+ },
323
+ "92575": {
324
+ "content": "[EMB7]",
325
+ "lstrip": true,
326
+ "normalized": false,
327
+ "rstrip": true,
328
+ "single_word": false,
329
+ "special": true
330
+ },
331
+ "92576": {
332
+ "content": "[EMB8]",
333
+ "lstrip": true,
334
+ "normalized": false,
335
+ "rstrip": true,
336
+ "single_word": false,
337
+ "special": true
338
+ }
339
+ },
340
+ "additional_special_tokens": [
341
+ "<unk>",
342
+ "<s>",
343
+ "</s>",
344
+ "<|plugin|>",
345
+ "<|interpreter|>",
346
+ "<|action_end|>",
347
+ "<|action_start|>",
348
+ "<|im_end|>",
349
+ "<|im_start|>",
350
+ "<img>",
351
+ "</img>",
352
+ "<IMG_CONTEXT>",
353
+ "<quad>",
354
+ "</quad>",
355
+ "<ref>",
356
+ "</ref>",
357
+ "<box>",
358
+ "</box>",
359
+ "[PAD]",
360
+ "<image>",
361
+ "<im_patch>",
362
+ "<region>",
363
+ "<reg>",
364
+ "</reg>",
365
+ "<det>",
366
+ "</det>",
367
+ "<grd>",
368
+ "</grd>",
369
+ "[DET]",
370
+ "[GRD]",
371
+ "[SEG]",
372
+ "[POSE]",
373
+ "[GEN]",
374
+ "[EDIT]",
375
+ "[EMB]",
376
+ "[EMB2]",
377
+ "[EMB3]",
378
+ "[EMB4]",
379
+ "[EMB5]",
380
+ "[EMB6]",
381
+ "[EMB7]",
382
+ "[EMB8]"
383
+ ],
384
+ "auto_map": {
385
+ "AutoTokenizer": [
386
+ "tokenization_internlm2.InternLM2Tokenizer",
387
+ null
388
+ ]
389
+ },
390
+ "bos_token": "<s>",
391
+ "chat_template": "{{ bos_token }}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
392
+ "clean_up_tokenization_spaces": false,
393
+ "eos_token": "</s>",
394
+ "model_max_length": 4096,
395
+ "pad_token": "<unk>",
396
+ "padding_side": "right",
397
+ "tokenizer_class": "InternLM2Tokenizer",
398
+ "tokenizer_file": null,
399
+ "unk_token": "<unk>"
400
+ }