Update tiny models for CohereCompassVisionModel
Browse files- .gitattributes +1 -0
- chat_template.jinja +1 -0
- config.json +23 -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,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"CohereCompassVisionModel"
|
| 4 |
+
],
|
| 5 |
+
"deepstack_visual_indexes": [
|
| 6 |
+
0
|
| 7 |
+
],
|
| 8 |
+
"depth": 2,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 32,
|
| 12 |
+
"in_channels": 3,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 64,
|
| 15 |
+
"model_type": "cohere_compass_vision",
|
| 16 |
+
"num_heads": 4,
|
| 17 |
+
"num_position_embeddings": 2304,
|
| 18 |
+
"out_hidden_size": 32,
|
| 19 |
+
"patch_size": 16,
|
| 20 |
+
"spatial_merge_size": 2,
|
| 21 |
+
"temporal_patch_size": 2,
|
| 22 |
+
"transformers_version": "5.16.0.dev0"
|
| 23 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6bb91867848c702f54e6ad6771f2308dccec0d062a3309c17615db1aaa5d4c84
|
| 3 |
+
size 729896
|
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 |
+
}
|