Update tiny models for CohereCompassModel
Browse files- .gitattributes +1 -0
- chat_template.jinja +1 -0
- config.json +73 -0
- model.safetensors +3 -0
- preprocessor_config.json +28 -0
- tokenizer.json +3 -0
- tokenizer_config.json +35 -0
- video_preprocessor_config.json +31 -0
.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
|
chat_template.jinja
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{{ bos_token }}{%- for message in messages %}{%- if message.role == 'system' %}{{- '<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>' }}{%- if message.content is string %}{{- message.content }}{%- else %}{%- for content in message.content %}{%- if 'text' in content %}{{- content.text }}{%- endif %}{%- endfor %}{%- endif %}{{- '<|END_OF_TURN_TOKEN|>' }}{%- elif message.role == 'user' %}{{- '<|START_OF_TURN_TOKEN|><|USER_TOKEN|>' }}{%- if message.content is string %}{{- message.content }}{%- else %}{%- for content in message.content %}{%- if content.type == 'image' or 'image' in content or 'image_url' in content %}<|VISION_START|><|IMAGE_PAD|><|VISION_END|>{%- elif content.type == 'video' or 'video' in content %}<|VISION_START|><|VIDEO_PAD|><|VISION_END|>{%- elif 'text' in content %}{{- content.text }}{%- endif %}{%- endfor %}{%- endif %}{{- '<|END_OF_TURN_TOKEN|>' }}{%- elif message.role == 'assistant' or message.role == 'chatbot' %}{{- '<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>' }}{%- if message.content is string %}{{- message.content }}{%- else %}{%- for content in message.content %}{%- if 'text' in content %}{{- content.text }}{%- endif %}{%- endfor %}{%- endif %}{{- '<|END_OF_TURN_TOKEN|>' }}{%- endif %}{%- endfor %}{%- if add_generation_prompt %}{{- '<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>' }}{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"CohereCompassModel"
|
| 4 |
+
],
|
| 5 |
+
"dtype": "float32",
|
| 6 |
+
"image_token_id": 5,
|
| 7 |
+
"model_type": "cohere_compass",
|
| 8 |
+
"pad_token_id": 0,
|
| 9 |
+
"text_config": {
|
| 10 |
+
"attention_bias": false,
|
| 11 |
+
"attention_dropout": 0.0,
|
| 12 |
+
"bos_token_id": 2,
|
| 13 |
+
"eos_token_id": 255001,
|
| 14 |
+
"head_dim": 8,
|
| 15 |
+
"hidden_act": "silu",
|
| 16 |
+
"hidden_size": 32,
|
| 17 |
+
"initializer_range": 0.02,
|
| 18 |
+
"intermediate_size": 64,
|
| 19 |
+
"layer_norm_eps": 1e-05,
|
| 20 |
+
"layer_types": [
|
| 21 |
+
"full_attention",
|
| 22 |
+
"full_attention"
|
| 23 |
+
],
|
| 24 |
+
"logit_scale": null,
|
| 25 |
+
"max_position_embeddings": 200,
|
| 26 |
+
"model_type": "cohere_compass_text",
|
| 27 |
+
"num_attention_heads": 4,
|
| 28 |
+
"num_hidden_layers": 2,
|
| 29 |
+
"num_key_value_heads": 2,
|
| 30 |
+
"pad_token_id": 0,
|
| 31 |
+
"pooling": null,
|
| 32 |
+
"rope_parameters": {
|
| 33 |
+
"full_attention": {
|
| 34 |
+
"mrope_section": [
|
| 35 |
+
1,
|
| 36 |
+
1,
|
| 37 |
+
2
|
| 38 |
+
],
|
| 39 |
+
"rope_theta": 10000,
|
| 40 |
+
"rope_type": "default"
|
| 41 |
+
},
|
| 42 |
+
"rope_theta": 10000.0,
|
| 43 |
+
"rope_type": "default"
|
| 44 |
+
},
|
| 45 |
+
"sliding_window": 4096,
|
| 46 |
+
"tie_word_embeddings": false,
|
| 47 |
+
"use_cache": true,
|
| 48 |
+
"vocab_size": 255035
|
| 49 |
+
},
|
| 50 |
+
"tie_word_embeddings": false,
|
| 51 |
+
"transformers_version": "5.16.0.dev0",
|
| 52 |
+
"video_token_id": 8,
|
| 53 |
+
"vision_config": {
|
| 54 |
+
"deepstack_visual_indexes": [
|
| 55 |
+
0
|
| 56 |
+
],
|
| 57 |
+
"depth": 2,
|
| 58 |
+
"hidden_act": "silu",
|
| 59 |
+
"hidden_size": 32,
|
| 60 |
+
"in_channels": 3,
|
| 61 |
+
"initializer_range": 0.02,
|
| 62 |
+
"intermediate_size": 64,
|
| 63 |
+
"model_type": "cohere_compass_vision",
|
| 64 |
+
"num_heads": 4,
|
| 65 |
+
"num_position_embeddings": 2304,
|
| 66 |
+
"out_hidden_size": 32,
|
| 67 |
+
"patch_size": 16,
|
| 68 |
+
"spatial_merge_size": 2,
|
| 69 |
+
"temporal_patch_size": 2
|
| 70 |
+
},
|
| 71 |
+
"vision_end_token_id": 7,
|
| 72 |
+
"vision_start_token_id": 6
|
| 73 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55b763ff8a71949027d6aaf05f818c48fdf66cdcc7f454b84ef019b9ea2f9483
|
| 3 |
+
size 33451016
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"data_format": "channels_first",
|
| 3 |
+
"default_to_square": false,
|
| 4 |
+
"do_convert_rgb": true,
|
| 5 |
+
"do_normalize": true,
|
| 6 |
+
"do_rescale": true,
|
| 7 |
+
"do_resize": true,
|
| 8 |
+
"image_mean": [
|
| 9 |
+
0.5,
|
| 10 |
+
0.5,
|
| 11 |
+
0.5
|
| 12 |
+
],
|
| 13 |
+
"image_processor_type": "CohereCompassImageProcessor",
|
| 14 |
+
"image_std": [
|
| 15 |
+
0.5,
|
| 16 |
+
0.5,
|
| 17 |
+
0.5
|
| 18 |
+
],
|
| 19 |
+
"merge_size": 2,
|
| 20 |
+
"patch_size": 16,
|
| 21 |
+
"resample": 3,
|
| 22 |
+
"rescale_factor": 0.00392156862745098,
|
| 23 |
+
"size": {
|
| 24 |
+
"longest_edge": 16777216,
|
| 25 |
+
"shortest_edge": 65536
|
| 26 |
+
},
|
| 27 |
+
"temporal_patch_size": 2
|
| 28 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4594953eca27aa1122252e8a61a91a5b4941c92aba78d3811c8fe9b1b95d7f68
|
| 3 |
+
size 19550475
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<BOS_TOKEN>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"cls_token": "<CLS>",
|
| 7 |
+
"eos_token": "<|END_OF_TURN_TOKEN|>",
|
| 8 |
+
"errors": "replace",
|
| 9 |
+
"image_token": "<|IMAGE_PAD|>",
|
| 10 |
+
"is_local": true,
|
| 11 |
+
"legacy": true,
|
| 12 |
+
"local_files_only": false,
|
| 13 |
+
"mask_token": "<MASK_TOKEN>",
|
| 14 |
+
"max_pixels": 3868706,
|
| 15 |
+
"min_pixels": 16384,
|
| 16 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 17 |
+
"model_specific_special_tokens": {
|
| 18 |
+
"image_token": "<|IMAGE_PAD|>",
|
| 19 |
+
"video_token": "<|VIDEO_PAD|>",
|
| 20 |
+
"vision_end_token": "<|VISION_END|>",
|
| 21 |
+
"vision_start_token": "<|VISION_START|>"
|
| 22 |
+
},
|
| 23 |
+
"pad_token": "<PAD>",
|
| 24 |
+
"padding_side": "right",
|
| 25 |
+
"processor_class": "CohereCompassProcessor",
|
| 26 |
+
"sep_token": "<SEP>",
|
| 27 |
+
"sp_model_kwargs": {},
|
| 28 |
+
"spaces_between_special_tokens": false,
|
| 29 |
+
"tokenizer_class": "CohereTokenizer",
|
| 30 |
+
"unk_token": "<UNK>",
|
| 31 |
+
"use_default_system_prompt": false,
|
| 32 |
+
"video_token": "<|VIDEO_PAD|>",
|
| 33 |
+
"vision_end_token": "<|VISION_END|>",
|
| 34 |
+
"vision_start_token": "<|VISION_START|>"
|
| 35 |
+
}
|
video_preprocessor_config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_convert_rgb": true,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_rescale": true,
|
| 5 |
+
"do_resize": true,
|
| 6 |
+
"do_sample_frames": true,
|
| 7 |
+
"fps": 2,
|
| 8 |
+
"image_mean": [
|
| 9 |
+
0.5,
|
| 10 |
+
0.5,
|
| 11 |
+
0.5
|
| 12 |
+
],
|
| 13 |
+
"image_std": [
|
| 14 |
+
0.5,
|
| 15 |
+
0.5,
|
| 16 |
+
0.5
|
| 17 |
+
],
|
| 18 |
+
"max_frames": 768,
|
| 19 |
+
"merge_size": 2,
|
| 20 |
+
"min_frames": 4,
|
| 21 |
+
"patch_size": 16,
|
| 22 |
+
"resample": 3,
|
| 23 |
+
"rescale_factor": 0.00392156862745098,
|
| 24 |
+
"return_metadata": false,
|
| 25 |
+
"size": {
|
| 26 |
+
"longest_edge": 25165824,
|
| 27 |
+
"shortest_edge": 4096
|
| 28 |
+
},
|
| 29 |
+
"temporal_patch_size": 2,
|
| 30 |
+
"video_processor_type": "CohereCompassVideoProcessor"
|
| 31 |
+
}
|