hf-transformers-bot commited on
Commit
ed65fcc
·
verified ·
1 Parent(s): 8c991a6

Update tiny models for CohereCompassForCausalLM

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
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,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CohereCompassForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 2,
8
+ "dtype": "float32",
9
+ "eos_token_id": 255001,
10
+ "head_dim": 8,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 32,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 64,
15
+ "is_decoder": true,
16
+ "layer_norm_eps": 1e-05,
17
+ "layer_types": [
18
+ "full_attention",
19
+ "full_attention"
20
+ ],
21
+ "logit_scale": null,
22
+ "max_position_embeddings": 200,
23
+ "model_type": "cohere_compass_text",
24
+ "num_attention_heads": 4,
25
+ "num_hidden_layers": 2,
26
+ "num_key_value_heads": 2,
27
+ "pad_token_id": 0,
28
+ "pooling": null,
29
+ "rope_parameters": {
30
+ "full_attention": {
31
+ "mrope_section": [
32
+ 1,
33
+ 1,
34
+ 2
35
+ ],
36
+ "rope_theta": 10000,
37
+ "rope_type": "default"
38
+ },
39
+ "rope_theta": 10000.0,
40
+ "rope_type": "default"
41
+ },
42
+ "sliding_window": 4096,
43
+ "tie_word_embeddings": false,
44
+ "transformers_version": "5.16.0.dev0",
45
+ "use_cache": true,
46
+ "vocab_size": 255035
47
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 2,
4
+ "eos_token_id": 255001,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "pad_token_id": 0,
8
+ "transformers_version": "5.16.0.dev0",
9
+ "use_cache": true
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4d848d346cca8fce5f0aa3a97cb7e54959a8399f1cc67a02fa1a63de896b7a7
3
+ size 65365080
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": 200,
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
+ }