sudy-super
commited on
Upload model and tokenizers
Browse files- .gitattributes +2 -0
- config.json +188 -0
- configuration_c_cubed.py +66 -0
- context_tokenizer/added_tokens.json +24 -0
- context_tokenizer/merges.txt +0 -0
- context_tokenizer/special_tokens_map.json +31 -0
- context_tokenizer/tokenizer.json +3 -0
- context_tokenizer/tokenizer_config.json +208 -0
- context_tokenizer/vocab.json +0 -0
- generation_config.json +6 -0
- model-00001-of-00004.safetensors +3 -0
- model-00002-of-00004.safetensors +3 -0
- model-00003-of-00004.safetensors +3 -0
- model-00004-of-00004.safetensors +3 -0
- model.safetensors.index.json +650 -0
- modeling_c_cubed.py +738 -0
- text_tokenizer/added_tokens.json +26 -0
- text_tokenizer/merges.txt +0 -0
- text_tokenizer/special_tokens_map.json +33 -0
- text_tokenizer/tokenizer.json +3 -0
- text_tokenizer/tokenizer_config.json +226 -0
- text_tokenizer/vocab.json +0 -0
- tokenizer_config.json +1 -0
.gitattributes
CHANGED
@@ -33,3 +33,5 @@ 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 |
+
context_tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
37 |
+
text_tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
config.json
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "./output/checkpoint-3169-consolidated",
|
3 |
+
"architectures": [
|
4 |
+
"CcubedForConditionalGeneration"
|
5 |
+
],
|
6 |
+
"auto_map": {
|
7 |
+
"AutoConfig": "configuration_c_cubed.CcubedConfig",
|
8 |
+
"AutoModelForCausalLM": "modeling_c_cubed.CcubedForConditionalGeneration"
|
9 |
+
},
|
10 |
+
"connector_hidden_act": "gelu",
|
11 |
+
"context_config": {
|
12 |
+
"_attn_implementation_autoset": true,
|
13 |
+
"_name_or_path": "Qwen/Qwen2.5-0.5B",
|
14 |
+
"add_cross_attention": false,
|
15 |
+
"architectures": [
|
16 |
+
"Qwen2ForCausalLM"
|
17 |
+
],
|
18 |
+
"attention_dropout": 0.0,
|
19 |
+
"bad_words_ids": null,
|
20 |
+
"begin_suppress_tokens": null,
|
21 |
+
"bos_token_id": 151643,
|
22 |
+
"chunk_size_feed_forward": 0,
|
23 |
+
"cross_attention_hidden_size": null,
|
24 |
+
"decoder_start_token_id": null,
|
25 |
+
"diversity_penalty": 0.0,
|
26 |
+
"do_sample": false,
|
27 |
+
"early_stopping": false,
|
28 |
+
"encoder_no_repeat_ngram_size": 0,
|
29 |
+
"eos_token_id": 151643,
|
30 |
+
"exponential_decay_length_penalty": null,
|
31 |
+
"finetuning_task": null,
|
32 |
+
"forced_bos_token_id": null,
|
33 |
+
"forced_eos_token_id": null,
|
34 |
+
"hidden_act": "silu",
|
35 |
+
"hidden_size": 896,
|
36 |
+
"id2label": {
|
37 |
+
"0": "LABEL_0",
|
38 |
+
"1": "LABEL_1"
|
39 |
+
},
|
40 |
+
"initializer_range": 0.02,
|
41 |
+
"intermediate_size": 4864,
|
42 |
+
"is_decoder": false,
|
43 |
+
"is_encoder_decoder": false,
|
44 |
+
"label2id": {
|
45 |
+
"LABEL_0": 0,
|
46 |
+
"LABEL_1": 1
|
47 |
+
},
|
48 |
+
"length_penalty": 1.0,
|
49 |
+
"max_length": 20,
|
50 |
+
"max_position_embeddings": 131072,
|
51 |
+
"max_window_layers": 24,
|
52 |
+
"min_length": 0,
|
53 |
+
"model_type": "qwen2",
|
54 |
+
"no_repeat_ngram_size": 0,
|
55 |
+
"num_attention_heads": 14,
|
56 |
+
"num_beam_groups": 1,
|
57 |
+
"num_beams": 1,
|
58 |
+
"num_hidden_layers": 24,
|
59 |
+
"num_key_value_heads": 2,
|
60 |
+
"num_return_sequences": 1,
|
61 |
+
"output_attentions": false,
|
62 |
+
"output_hidden_states": false,
|
63 |
+
"output_scores": false,
|
64 |
+
"pad_token_id": null,
|
65 |
+
"prefix": null,
|
66 |
+
"problem_type": null,
|
67 |
+
"pruned_heads": {},
|
68 |
+
"remove_invalid_values": false,
|
69 |
+
"repetition_penalty": 1.0,
|
70 |
+
"return_dict": true,
|
71 |
+
"return_dict_in_generate": false,
|
72 |
+
"rms_norm_eps": 1e-06,
|
73 |
+
"rope_scaling": null,
|
74 |
+
"rope_theta": 1000000.0,
|
75 |
+
"sep_token_id": null,
|
76 |
+
"sliding_window": null,
|
77 |
+
"suppress_tokens": null,
|
78 |
+
"task_specific_params": null,
|
79 |
+
"temperature": 1.0,
|
80 |
+
"tf_legacy_loss": false,
|
81 |
+
"tie_encoder_decoder": false,
|
82 |
+
"tie_word_embeddings": true,
|
83 |
+
"tokenizer_class": null,
|
84 |
+
"top_k": 50,
|
85 |
+
"top_p": 1.0,
|
86 |
+
"torch_dtype": "bfloat16",
|
87 |
+
"torchscript": false,
|
88 |
+
"typical_p": 1.0,
|
89 |
+
"use_bfloat16": false,
|
90 |
+
"use_cache": true,
|
91 |
+
"use_mrope": false,
|
92 |
+
"use_sliding_window": false,
|
93 |
+
"vocab_size": 151936
|
94 |
+
},
|
95 |
+
"context_feature_layer": -2,
|
96 |
+
"context_feature_select_strategy": "default",
|
97 |
+
"end_of_context_token_id": 151666,
|
98 |
+
"ignore_index": -100,
|
99 |
+
"model_type": "c_cubed",
|
100 |
+
"projector_hidden_act": "gelu",
|
101 |
+
"start_of_context_token_id": 151665,
|
102 |
+
"text_config": {
|
103 |
+
"_attn_implementation_autoset": true,
|
104 |
+
"_name_or_path": "Qwen/Qwen2.5-7B-Instruct",
|
105 |
+
"add_cross_attention": false,
|
106 |
+
"architectures": [
|
107 |
+
"Qwen2ForCausalLM"
|
108 |
+
],
|
109 |
+
"attention_dropout": 0.0,
|
110 |
+
"bad_words_ids": null,
|
111 |
+
"begin_suppress_tokens": null,
|
112 |
+
"bos_token_id": 151643,
|
113 |
+
"chunk_size_feed_forward": 0,
|
114 |
+
"cross_attention_hidden_size": null,
|
115 |
+
"decoder_start_token_id": null,
|
116 |
+
"diversity_penalty": 0.0,
|
117 |
+
"do_sample": false,
|
118 |
+
"early_stopping": false,
|
119 |
+
"encoder_no_repeat_ngram_size": 0,
|
120 |
+
"eos_token_id": 151645,
|
121 |
+
"exponential_decay_length_penalty": null,
|
122 |
+
"finetuning_task": null,
|
123 |
+
"forced_bos_token_id": null,
|
124 |
+
"forced_eos_token_id": null,
|
125 |
+
"hidden_act": "silu",
|
126 |
+
"hidden_size": 3584,
|
127 |
+
"id2label": {
|
128 |
+
"0": "LABEL_0",
|
129 |
+
"1": "LABEL_1"
|
130 |
+
},
|
131 |
+
"initializer_range": 0.02,
|
132 |
+
"intermediate_size": 18944,
|
133 |
+
"is_decoder": false,
|
134 |
+
"is_encoder_decoder": false,
|
135 |
+
"label2id": {
|
136 |
+
"LABEL_0": 0,
|
137 |
+
"LABEL_1": 1
|
138 |
+
},
|
139 |
+
"length_penalty": 1.0,
|
140 |
+
"max_length": 20,
|
141 |
+
"max_position_embeddings": 131072,
|
142 |
+
"max_window_layers": 28,
|
143 |
+
"min_length": 0,
|
144 |
+
"model_type": "qwen2",
|
145 |
+
"no_repeat_ngram_size": 0,
|
146 |
+
"num_attention_heads": 28,
|
147 |
+
"num_beam_groups": 1,
|
148 |
+
"num_beams": 1,
|
149 |
+
"num_hidden_layers": 28,
|
150 |
+
"num_key_value_heads": 4,
|
151 |
+
"num_return_sequences": 1,
|
152 |
+
"output_attentions": false,
|
153 |
+
"output_hidden_states": false,
|
154 |
+
"output_scores": false,
|
155 |
+
"pad_token_id": null,
|
156 |
+
"prefix": null,
|
157 |
+
"problem_type": null,
|
158 |
+
"pruned_heads": {},
|
159 |
+
"remove_invalid_values": false,
|
160 |
+
"repetition_penalty": 1.0,
|
161 |
+
"return_dict": true,
|
162 |
+
"return_dict_in_generate": false,
|
163 |
+
"rms_norm_eps": 1e-06,
|
164 |
+
"rope_scaling": null,
|
165 |
+
"rope_theta": 1000000.0,
|
166 |
+
"sep_token_id": null,
|
167 |
+
"sliding_window": null,
|
168 |
+
"suppress_tokens": null,
|
169 |
+
"task_specific_params": null,
|
170 |
+
"temperature": 1.0,
|
171 |
+
"tf_legacy_loss": false,
|
172 |
+
"tie_encoder_decoder": false,
|
173 |
+
"tie_word_embeddings": false,
|
174 |
+
"tokenizer_class": null,
|
175 |
+
"top_k": 50,
|
176 |
+
"top_p": 1.0,
|
177 |
+
"torch_dtype": "float32",
|
178 |
+
"torchscript": false,
|
179 |
+
"typical_p": 1.0,
|
180 |
+
"use_bfloat16": false,
|
181 |
+
"use_cache": true,
|
182 |
+
"use_sliding_window": false,
|
183 |
+
"vocab_size": 152064
|
184 |
+
},
|
185 |
+
"tie_word_embeddings": false,
|
186 |
+
"torch_dtype": "bfloat16",
|
187 |
+
"transformers_version": "4.49.0.dev0"
|
188 |
+
}
|
configuration_c_cubed.py
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
"""Ccubed model configuration"""
|
3 |
+
|
4 |
+
from transformers.configuration_utils import PretrainedConfig
|
5 |
+
from transformers.utils import logging
|
6 |
+
from transformers import CONFIG_MAPPING
|
7 |
+
|
8 |
+
logger = logging.get_logger(__name__)
|
9 |
+
|
10 |
+
|
11 |
+
class CcubedConfig(PretrainedConfig):
|
12 |
+
r"""
|
13 |
+
"""
|
14 |
+
|
15 |
+
model_type = "c_cubed"
|
16 |
+
|
17 |
+
def __init__(
|
18 |
+
self,
|
19 |
+
context_config=None,
|
20 |
+
text_config=None,
|
21 |
+
ignore_index=-100,
|
22 |
+
connector_hidden_act="gelu",
|
23 |
+
context_feature_layer=-2,
|
24 |
+
context_feature_select_strategy="default",
|
25 |
+
start_of_context_token_id=None,
|
26 |
+
end_of_context_token_id=None,
|
27 |
+
tie_word_embeddings=False,
|
28 |
+
**kwargs,
|
29 |
+
):
|
30 |
+
self.ignore_index = ignore_index
|
31 |
+
self.connector_hidden_act = connector_hidden_act
|
32 |
+
self.context_feature_layer = context_feature_layer
|
33 |
+
self.context_feature_select_strategy = context_feature_select_strategy
|
34 |
+
self.start_of_context_token_id = start_of_context_token_id
|
35 |
+
self.end_of_context_token_id = end_of_context_token_id
|
36 |
+
|
37 |
+
if context_feature_select_strategy not in ["default"]:
|
38 |
+
raise ValueError(
|
39 |
+
"context_feature_select_strategy should be one of 'default'."
|
40 |
+
f"Got: {context_feature_select_strategy}"
|
41 |
+
)
|
42 |
+
|
43 |
+
if isinstance(context_config, dict):
|
44 |
+
context_config["model_type"] = (
|
45 |
+
context_config["model_type"] if "model_type" in context_config else "qwen2"
|
46 |
+
)
|
47 |
+
context_config = CONFIG_MAPPING[context_config["model_type"]](**context_config)
|
48 |
+
|
49 |
+
self.context_config = context_config
|
50 |
+
|
51 |
+
if isinstance(text_config, dict):
|
52 |
+
text_config["model_type"] = text_config["model_type"] if "model_type" in text_config else "qwen2"
|
53 |
+
text_config = CONFIG_MAPPING[text_config["model_type"]](**text_config)
|
54 |
+
|
55 |
+
self.text_config = text_config
|
56 |
+
|
57 |
+
super().__init__(
|
58 |
+
tie_word_embeddings=tie_word_embeddings,
|
59 |
+
ignore_index=ignore_index,
|
60 |
+
connector_hidden_act=connector_hidden_act,
|
61 |
+
context_feature_layer=context_feature_layer,
|
62 |
+
context_feature_select_strategy=context_feature_select_strategy,
|
63 |
+
start_of_context_token_id=start_of_context_token_id,
|
64 |
+
end_of_context_token_id=end_of_context_token_id,
|
65 |
+
**kwargs
|
66 |
+
)
|
context_tokenizer/added_tokens.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"</tool_call>": 151658,
|
3 |
+
"<tool_call>": 151657,
|
4 |
+
"<|box_end|>": 151649,
|
5 |
+
"<|box_start|>": 151648,
|
6 |
+
"<|endoftext|>": 151643,
|
7 |
+
"<|file_sep|>": 151664,
|
8 |
+
"<|fim_middle|>": 151660,
|
9 |
+
"<|fim_pad|>": 151662,
|
10 |
+
"<|fim_prefix|>": 151659,
|
11 |
+
"<|fim_suffix|>": 151661,
|
12 |
+
"<|im_end|>": 151645,
|
13 |
+
"<|im_start|>": 151644,
|
14 |
+
"<|image_pad|>": 151655,
|
15 |
+
"<|object_ref_end|>": 151647,
|
16 |
+
"<|object_ref_start|>": 151646,
|
17 |
+
"<|quad_end|>": 151651,
|
18 |
+
"<|quad_start|>": 151650,
|
19 |
+
"<|repo_name|>": 151663,
|
20 |
+
"<|video_pad|>": 151656,
|
21 |
+
"<|vision_end|>": 151653,
|
22 |
+
"<|vision_pad|>": 151654,
|
23 |
+
"<|vision_start|>": 151652
|
24 |
+
}
|
context_tokenizer/merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
context_tokenizer/special_tokens_map.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|im_start|>",
|
4 |
+
"<|im_end|>",
|
5 |
+
"<|object_ref_start|>",
|
6 |
+
"<|object_ref_end|>",
|
7 |
+
"<|box_start|>",
|
8 |
+
"<|box_end|>",
|
9 |
+
"<|quad_start|>",
|
10 |
+
"<|quad_end|>",
|
11 |
+
"<|vision_start|>",
|
12 |
+
"<|vision_end|>",
|
13 |
+
"<|vision_pad|>",
|
14 |
+
"<|image_pad|>",
|
15 |
+
"<|video_pad|>"
|
16 |
+
],
|
17 |
+
"eos_token": {
|
18 |
+
"content": "<|endoftext|>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": false,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": false
|
23 |
+
},
|
24 |
+
"pad_token": {
|
25 |
+
"content": "<|endoftext|>",
|
26 |
+
"lstrip": false,
|
27 |
+
"normalized": false,
|
28 |
+
"rstrip": false,
|
29 |
+
"single_word": false
|
30 |
+
}
|
31 |
+
}
|
context_tokenizer/tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
|
3 |
+
size 11421896
|
context_tokenizer/tokenizer_config.json
ADDED
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": false,
|
3 |
+
"add_prefix_space": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"151643": {
|
6 |
+
"content": "<|endoftext|>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"151644": {
|
14 |
+
"content": "<|im_start|>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"151645": {
|
22 |
+
"content": "<|im_end|>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
},
|
29 |
+
"151646": {
|
30 |
+
"content": "<|object_ref_start|>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": false,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false,
|
35 |
+
"special": true
|
36 |
+
},
|
37 |
+
"151647": {
|
38 |
+
"content": "<|object_ref_end|>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false,
|
43 |
+
"special": true
|
44 |
+
},
|
45 |
+
"151648": {
|
46 |
+
"content": "<|box_start|>",
|
47 |
+
"lstrip": false,
|
48 |
+
"normalized": false,
|
49 |
+
"rstrip": false,
|
50 |
+
"single_word": false,
|
51 |
+
"special": true
|
52 |
+
},
|
53 |
+
"151649": {
|
54 |
+
"content": "<|box_end|>",
|
55 |
+
"lstrip": false,
|
56 |
+
"normalized": false,
|
57 |
+
"rstrip": false,
|
58 |
+
"single_word": false,
|
59 |
+
"special": true
|
60 |
+
},
|
61 |
+
"151650": {
|
62 |
+
"content": "<|quad_start|>",
|
63 |
+
"lstrip": false,
|
64 |
+
"normalized": false,
|
65 |
+
"rstrip": false,
|
66 |
+
"single_word": false,
|
67 |
+
"special": true
|
68 |
+
},
|
69 |
+
"151651": {
|
70 |
+
"content": "<|quad_end|>",
|
71 |
+
"lstrip": false,
|
72 |
+
"normalized": false,
|
73 |
+
"rstrip": false,
|
74 |
+
"single_word": false,
|
75 |
+
"special": true
|
76 |
+
},
|
77 |
+
"151652": {
|
78 |
+
"content": "<|vision_start|>",
|
79 |
+
"lstrip": false,
|
80 |
+
"normalized": false,
|
81 |
+
"rstrip": false,
|
82 |
+
"single_word": false,
|
83 |
+
"special": true
|
84 |
+
},
|
85 |
+
"151653": {
|
86 |
+
"content": "<|vision_end|>",
|
87 |
+
"lstrip": false,
|
88 |
+
"normalized": false,
|
89 |
+
"rstrip": false,
|
90 |
+
"single_word": false,
|
91 |
+
"special": true
|
92 |
+
},
|
93 |
+
"151654": {
|
94 |
+
"content": "<|vision_pad|>",
|
95 |
+
"lstrip": false,
|
96 |
+
"normalized": false,
|
97 |
+
"rstrip": false,
|
98 |
+
"single_word": false,
|
99 |
+
"special": true
|
100 |
+
},
|
101 |
+
"151655": {
|
102 |
+
"content": "<|image_pad|>",
|
103 |
+
"lstrip": false,
|
104 |
+
"normalized": false,
|
105 |
+
"rstrip": false,
|
106 |
+
"single_word": false,
|
107 |
+
"special": true
|
108 |
+
},
|
109 |
+
"151656": {
|
110 |
+
"content": "<|video_pad|>",
|
111 |
+
"lstrip": false,
|
112 |
+
"normalized": false,
|
113 |
+
"rstrip": false,
|
114 |
+
"single_word": false,
|
115 |
+
"special": true
|
116 |
+
},
|
117 |
+
"151657": {
|
118 |
+
"content": "<tool_call>",
|
119 |
+
"lstrip": false,
|
120 |
+
"normalized": false,
|
121 |
+
"rstrip": false,
|
122 |
+
"single_word": false,
|
123 |
+
"special": false
|
124 |
+
},
|
125 |
+
"151658": {
|
126 |
+
"content": "</tool_call>",
|
127 |
+
"lstrip": false,
|
128 |
+
"normalized": false,
|
129 |
+
"rstrip": false,
|
130 |
+
"single_word": false,
|
131 |
+
"special": false
|
132 |
+
},
|
133 |
+
"151659": {
|
134 |
+
"content": "<|fim_prefix|>",
|
135 |
+
"lstrip": false,
|
136 |
+
"normalized": false,
|
137 |
+
"rstrip": false,
|
138 |
+
"single_word": false,
|
139 |
+
"special": false
|
140 |
+
},
|
141 |
+
"151660": {
|
142 |
+
"content": "<|fim_middle|>",
|
143 |
+
"lstrip": false,
|
144 |
+
"normalized": false,
|
145 |
+
"rstrip": false,
|
146 |
+
"single_word": false,
|
147 |
+
"special": false
|
148 |
+
},
|
149 |
+
"151661": {
|
150 |
+
"content": "<|fim_suffix|>",
|
151 |
+
"lstrip": false,
|
152 |
+
"normalized": false,
|
153 |
+
"rstrip": false,
|
154 |
+
"single_word": false,
|
155 |
+
"special": false
|
156 |
+
},
|
157 |
+
"151662": {
|
158 |
+
"content": "<|fim_pad|>",
|
159 |
+
"lstrip": false,
|
160 |
+
"normalized": false,
|
161 |
+
"rstrip": false,
|
162 |
+
"single_word": false,
|
163 |
+
"special": false
|
164 |
+
},
|
165 |
+
"151663": {
|
166 |
+
"content": "<|repo_name|>",
|
167 |
+
"lstrip": false,
|
168 |
+
"normalized": false,
|
169 |
+
"rstrip": false,
|
170 |
+
"single_word": false,
|
171 |
+
"special": false
|
172 |
+
},
|
173 |
+
"151664": {
|
174 |
+
"content": "<|file_sep|>",
|
175 |
+
"lstrip": false,
|
176 |
+
"normalized": false,
|
177 |
+
"rstrip": false,
|
178 |
+
"single_word": false,
|
179 |
+
"special": false
|
180 |
+
}
|
181 |
+
},
|
182 |
+
"additional_special_tokens": [
|
183 |
+
"<|im_start|>",
|
184 |
+
"<|im_end|>",
|
185 |
+
"<|object_ref_start|>",
|
186 |
+
"<|object_ref_end|>",
|
187 |
+
"<|box_start|>",
|
188 |
+
"<|box_end|>",
|
189 |
+
"<|quad_start|>",
|
190 |
+
"<|quad_end|>",
|
191 |
+
"<|vision_start|>",
|
192 |
+
"<|vision_end|>",
|
193 |
+
"<|vision_pad|>",
|
194 |
+
"<|image_pad|>",
|
195 |
+
"<|video_pad|>"
|
196 |
+
],
|
197 |
+
"bos_token": null,
|
198 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
|
199 |
+
"clean_up_tokenization_spaces": false,
|
200 |
+
"eos_token": "<|endoftext|>",
|
201 |
+
"errors": "replace",
|
202 |
+
"extra_special_tokens": {},
|
203 |
+
"model_max_length": 131072,
|
204 |
+
"pad_token": "<|endoftext|>",
|
205 |
+
"split_special_tokens": false,
|
206 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
207 |
+
"unk_token": null
|
208 |
+
}
|
context_tokenizer/vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
generation_config.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 151643,
|
4 |
+
"eos_token_id": 151645,
|
5 |
+
"transformers_version": "4.49.0.dev0"
|
6 |
+
}
|
model-00001-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:512761d92bcd349074ca0699aa951ea8958a49c9ea3d63c3175253b40f8d2767
|
3 |
+
size 4911735722
|
model-00002-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cb68d7d9dd8485aa735d5d3d9e2665bad5c164891158f1b275f35a5bfd6cce36
|
3 |
+
size 4991497784
|
model-00003-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:22e4ee359842319636ce1f8a376bcb005aeccadf254901a1170aa1512b74d3b9
|
3 |
+
size 4932752872
|
model-00004-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:67bb9a1557eec756179072f4eae58209482098e533cd1c32dc18dfd7544bdb47
|
3 |
+
size 1691924640
|
model.safetensors.index.json
ADDED
@@ -0,0 +1,650 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"metadata": {
|
3 |
+
"total_size": 16527827202
|
4 |
+
},
|
5 |
+
"weight_map": {
|
6 |
+
"connector.dynamic_pooling.imp_estim_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
7 |
+
"connector.dynamic_pooling.imp_estim_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
8 |
+
"connector.dynamic_pooling.imp_estim_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
9 |
+
"connector.dynamic_pooling.imp_estim_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
10 |
+
"connector.dynamic_pooling.scale_param": "model-00001-of-00004.safetensors",
|
11 |
+
"connector.dynamic_pooling.size_estim_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
12 |
+
"connector.dynamic_pooling.size_estim_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
13 |
+
"connector.dynamic_pooling.size_estim_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
14 |
+
"connector.dynamic_pooling.size_estim_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
15 |
+
"connector.linear_1.bias": "model-00001-of-00004.safetensors",
|
16 |
+
"connector.linear_1.weight": "model-00001-of-00004.safetensors",
|
17 |
+
"connector.linear_2.bias": "model-00001-of-00004.safetensors",
|
18 |
+
"connector.linear_2.weight": "model-00001-of-00004.safetensors",
|
19 |
+
"context_tower.tower.lm_head.weight": "model-00001-of-00004.safetensors",
|
20 |
+
"context_tower.tower.model.embed_tokens.weight": "model-00001-of-00004.safetensors",
|
21 |
+
"context_tower.tower.model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
22 |
+
"context_tower.tower.model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
23 |
+
"context_tower.tower.model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
24 |
+
"context_tower.tower.model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
25 |
+
"context_tower.tower.model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
26 |
+
"context_tower.tower.model.layers.0.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
27 |
+
"context_tower.tower.model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
28 |
+
"context_tower.tower.model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
29 |
+
"context_tower.tower.model.layers.0.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
30 |
+
"context_tower.tower.model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
31 |
+
"context_tower.tower.model.layers.0.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
32 |
+
"context_tower.tower.model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
33 |
+
"context_tower.tower.model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
34 |
+
"context_tower.tower.model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
35 |
+
"context_tower.tower.model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
36 |
+
"context_tower.tower.model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
37 |
+
"context_tower.tower.model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
38 |
+
"context_tower.tower.model.layers.1.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
39 |
+
"context_tower.tower.model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
40 |
+
"context_tower.tower.model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
41 |
+
"context_tower.tower.model.layers.1.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
42 |
+
"context_tower.tower.model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
43 |
+
"context_tower.tower.model.layers.1.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
44 |
+
"context_tower.tower.model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
45 |
+
"context_tower.tower.model.layers.10.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
46 |
+
"context_tower.tower.model.layers.10.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
47 |
+
"context_tower.tower.model.layers.10.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
48 |
+
"context_tower.tower.model.layers.10.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
49 |
+
"context_tower.tower.model.layers.10.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
50 |
+
"context_tower.tower.model.layers.10.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
51 |
+
"context_tower.tower.model.layers.10.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
52 |
+
"context_tower.tower.model.layers.10.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
53 |
+
"context_tower.tower.model.layers.10.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
54 |
+
"context_tower.tower.model.layers.10.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
55 |
+
"context_tower.tower.model.layers.10.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
56 |
+
"context_tower.tower.model.layers.10.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
57 |
+
"context_tower.tower.model.layers.11.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
58 |
+
"context_tower.tower.model.layers.11.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
59 |
+
"context_tower.tower.model.layers.11.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
60 |
+
"context_tower.tower.model.layers.11.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
61 |
+
"context_tower.tower.model.layers.11.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
62 |
+
"context_tower.tower.model.layers.11.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
63 |
+
"context_tower.tower.model.layers.11.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
64 |
+
"context_tower.tower.model.layers.11.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
65 |
+
"context_tower.tower.model.layers.11.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
66 |
+
"context_tower.tower.model.layers.11.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
67 |
+
"context_tower.tower.model.layers.11.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
68 |
+
"context_tower.tower.model.layers.11.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
69 |
+
"context_tower.tower.model.layers.12.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
70 |
+
"context_tower.tower.model.layers.12.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
71 |
+
"context_tower.tower.model.layers.12.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
72 |
+
"context_tower.tower.model.layers.12.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
73 |
+
"context_tower.tower.model.layers.12.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
74 |
+
"context_tower.tower.model.layers.12.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
75 |
+
"context_tower.tower.model.layers.12.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
76 |
+
"context_tower.tower.model.layers.12.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
77 |
+
"context_tower.tower.model.layers.12.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
78 |
+
"context_tower.tower.model.layers.12.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
79 |
+
"context_tower.tower.model.layers.12.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
80 |
+
"context_tower.tower.model.layers.12.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
81 |
+
"context_tower.tower.model.layers.13.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
82 |
+
"context_tower.tower.model.layers.13.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
83 |
+
"context_tower.tower.model.layers.13.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
84 |
+
"context_tower.tower.model.layers.13.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
85 |
+
"context_tower.tower.model.layers.13.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
86 |
+
"context_tower.tower.model.layers.13.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
87 |
+
"context_tower.tower.model.layers.13.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
88 |
+
"context_tower.tower.model.layers.13.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
89 |
+
"context_tower.tower.model.layers.13.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
90 |
+
"context_tower.tower.model.layers.13.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
91 |
+
"context_tower.tower.model.layers.13.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
92 |
+
"context_tower.tower.model.layers.13.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
93 |
+
"context_tower.tower.model.layers.14.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
94 |
+
"context_tower.tower.model.layers.14.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
95 |
+
"context_tower.tower.model.layers.14.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
96 |
+
"context_tower.tower.model.layers.14.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
97 |
+
"context_tower.tower.model.layers.14.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
98 |
+
"context_tower.tower.model.layers.14.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
99 |
+
"context_tower.tower.model.layers.14.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
100 |
+
"context_tower.tower.model.layers.14.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
101 |
+
"context_tower.tower.model.layers.14.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
102 |
+
"context_tower.tower.model.layers.14.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
103 |
+
"context_tower.tower.model.layers.14.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
104 |
+
"context_tower.tower.model.layers.14.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
105 |
+
"context_tower.tower.model.layers.15.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
106 |
+
"context_tower.tower.model.layers.15.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
107 |
+
"context_tower.tower.model.layers.15.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
108 |
+
"context_tower.tower.model.layers.15.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
109 |
+
"context_tower.tower.model.layers.15.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
110 |
+
"context_tower.tower.model.layers.15.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
111 |
+
"context_tower.tower.model.layers.15.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
112 |
+
"context_tower.tower.model.layers.15.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
113 |
+
"context_tower.tower.model.layers.15.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
114 |
+
"context_tower.tower.model.layers.15.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
115 |
+
"context_tower.tower.model.layers.15.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
116 |
+
"context_tower.tower.model.layers.15.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
117 |
+
"context_tower.tower.model.layers.16.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
118 |
+
"context_tower.tower.model.layers.16.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
119 |
+
"context_tower.tower.model.layers.16.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
120 |
+
"context_tower.tower.model.layers.16.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
121 |
+
"context_tower.tower.model.layers.16.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
122 |
+
"context_tower.tower.model.layers.16.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
123 |
+
"context_tower.tower.model.layers.16.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
124 |
+
"context_tower.tower.model.layers.16.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
125 |
+
"context_tower.tower.model.layers.16.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
126 |
+
"context_tower.tower.model.layers.16.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
127 |
+
"context_tower.tower.model.layers.16.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
128 |
+
"context_tower.tower.model.layers.16.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
129 |
+
"context_tower.tower.model.layers.17.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
130 |
+
"context_tower.tower.model.layers.17.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
131 |
+
"context_tower.tower.model.layers.17.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
132 |
+
"context_tower.tower.model.layers.17.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
133 |
+
"context_tower.tower.model.layers.17.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
134 |
+
"context_tower.tower.model.layers.17.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
135 |
+
"context_tower.tower.model.layers.17.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
136 |
+
"context_tower.tower.model.layers.17.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
137 |
+
"context_tower.tower.model.layers.17.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
138 |
+
"context_tower.tower.model.layers.17.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
139 |
+
"context_tower.tower.model.layers.17.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
140 |
+
"context_tower.tower.model.layers.17.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
141 |
+
"context_tower.tower.model.layers.18.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
142 |
+
"context_tower.tower.model.layers.18.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
143 |
+
"context_tower.tower.model.layers.18.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
144 |
+
"context_tower.tower.model.layers.18.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
145 |
+
"context_tower.tower.model.layers.18.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
146 |
+
"context_tower.tower.model.layers.18.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
147 |
+
"context_tower.tower.model.layers.18.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
148 |
+
"context_tower.tower.model.layers.18.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
149 |
+
"context_tower.tower.model.layers.18.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
150 |
+
"context_tower.tower.model.layers.18.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
151 |
+
"context_tower.tower.model.layers.18.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
152 |
+
"context_tower.tower.model.layers.18.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
153 |
+
"context_tower.tower.model.layers.19.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
154 |
+
"context_tower.tower.model.layers.19.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
155 |
+
"context_tower.tower.model.layers.19.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
156 |
+
"context_tower.tower.model.layers.19.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
157 |
+
"context_tower.tower.model.layers.19.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
158 |
+
"context_tower.tower.model.layers.19.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
159 |
+
"context_tower.tower.model.layers.19.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
160 |
+
"context_tower.tower.model.layers.19.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
161 |
+
"context_tower.tower.model.layers.19.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
162 |
+
"context_tower.tower.model.layers.19.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
163 |
+
"context_tower.tower.model.layers.19.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
164 |
+
"context_tower.tower.model.layers.19.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
165 |
+
"context_tower.tower.model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
166 |
+
"context_tower.tower.model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
167 |
+
"context_tower.tower.model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
168 |
+
"context_tower.tower.model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
169 |
+
"context_tower.tower.model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
170 |
+
"context_tower.tower.model.layers.2.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
171 |
+
"context_tower.tower.model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
172 |
+
"context_tower.tower.model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
173 |
+
"context_tower.tower.model.layers.2.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
174 |
+
"context_tower.tower.model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
175 |
+
"context_tower.tower.model.layers.2.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
176 |
+
"context_tower.tower.model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
177 |
+
"context_tower.tower.model.layers.20.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
178 |
+
"context_tower.tower.model.layers.20.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
179 |
+
"context_tower.tower.model.layers.20.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
180 |
+
"context_tower.tower.model.layers.20.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
181 |
+
"context_tower.tower.model.layers.20.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
182 |
+
"context_tower.tower.model.layers.20.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
183 |
+
"context_tower.tower.model.layers.20.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
184 |
+
"context_tower.tower.model.layers.20.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
185 |
+
"context_tower.tower.model.layers.20.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
186 |
+
"context_tower.tower.model.layers.20.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
187 |
+
"context_tower.tower.model.layers.20.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
188 |
+
"context_tower.tower.model.layers.20.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
189 |
+
"context_tower.tower.model.layers.21.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
190 |
+
"context_tower.tower.model.layers.21.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
191 |
+
"context_tower.tower.model.layers.21.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
192 |
+
"context_tower.tower.model.layers.21.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
193 |
+
"context_tower.tower.model.layers.21.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
194 |
+
"context_tower.tower.model.layers.21.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
195 |
+
"context_tower.tower.model.layers.21.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
196 |
+
"context_tower.tower.model.layers.21.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
197 |
+
"context_tower.tower.model.layers.21.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
198 |
+
"context_tower.tower.model.layers.21.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
199 |
+
"context_tower.tower.model.layers.21.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
200 |
+
"context_tower.tower.model.layers.21.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
201 |
+
"context_tower.tower.model.layers.22.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
202 |
+
"context_tower.tower.model.layers.22.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
203 |
+
"context_tower.tower.model.layers.22.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
204 |
+
"context_tower.tower.model.layers.22.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
205 |
+
"context_tower.tower.model.layers.22.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
206 |
+
"context_tower.tower.model.layers.22.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
207 |
+
"context_tower.tower.model.layers.22.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
208 |
+
"context_tower.tower.model.layers.22.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
209 |
+
"context_tower.tower.model.layers.22.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
210 |
+
"context_tower.tower.model.layers.22.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
211 |
+
"context_tower.tower.model.layers.22.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
212 |
+
"context_tower.tower.model.layers.22.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
213 |
+
"context_tower.tower.model.layers.23.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
214 |
+
"context_tower.tower.model.layers.23.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
215 |
+
"context_tower.tower.model.layers.23.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
216 |
+
"context_tower.tower.model.layers.23.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
217 |
+
"context_tower.tower.model.layers.23.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
218 |
+
"context_tower.tower.model.layers.23.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
219 |
+
"context_tower.tower.model.layers.23.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
220 |
+
"context_tower.tower.model.layers.23.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
221 |
+
"context_tower.tower.model.layers.23.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
222 |
+
"context_tower.tower.model.layers.23.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
223 |
+
"context_tower.tower.model.layers.23.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
224 |
+
"context_tower.tower.model.layers.23.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
225 |
+
"context_tower.tower.model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
226 |
+
"context_tower.tower.model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
227 |
+
"context_tower.tower.model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
228 |
+
"context_tower.tower.model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
229 |
+
"context_tower.tower.model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
230 |
+
"context_tower.tower.model.layers.3.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
231 |
+
"context_tower.tower.model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
232 |
+
"context_tower.tower.model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
233 |
+
"context_tower.tower.model.layers.3.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
234 |
+
"context_tower.tower.model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
235 |
+
"context_tower.tower.model.layers.3.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
236 |
+
"context_tower.tower.model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
237 |
+
"context_tower.tower.model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
238 |
+
"context_tower.tower.model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
239 |
+
"context_tower.tower.model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
240 |
+
"context_tower.tower.model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
241 |
+
"context_tower.tower.model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
242 |
+
"context_tower.tower.model.layers.4.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
243 |
+
"context_tower.tower.model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
244 |
+
"context_tower.tower.model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
245 |
+
"context_tower.tower.model.layers.4.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
246 |
+
"context_tower.tower.model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
247 |
+
"context_tower.tower.model.layers.4.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
248 |
+
"context_tower.tower.model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
249 |
+
"context_tower.tower.model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
250 |
+
"context_tower.tower.model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
251 |
+
"context_tower.tower.model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
252 |
+
"context_tower.tower.model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
253 |
+
"context_tower.tower.model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
254 |
+
"context_tower.tower.model.layers.5.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
255 |
+
"context_tower.tower.model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
256 |
+
"context_tower.tower.model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
257 |
+
"context_tower.tower.model.layers.5.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
258 |
+
"context_tower.tower.model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
259 |
+
"context_tower.tower.model.layers.5.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
260 |
+
"context_tower.tower.model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
261 |
+
"context_tower.tower.model.layers.6.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
262 |
+
"context_tower.tower.model.layers.6.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
263 |
+
"context_tower.tower.model.layers.6.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
264 |
+
"context_tower.tower.model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
265 |
+
"context_tower.tower.model.layers.6.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
266 |
+
"context_tower.tower.model.layers.6.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
267 |
+
"context_tower.tower.model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
268 |
+
"context_tower.tower.model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
269 |
+
"context_tower.tower.model.layers.6.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
270 |
+
"context_tower.tower.model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
271 |
+
"context_tower.tower.model.layers.6.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
272 |
+
"context_tower.tower.model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
273 |
+
"context_tower.tower.model.layers.7.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
274 |
+
"context_tower.tower.model.layers.7.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
275 |
+
"context_tower.tower.model.layers.7.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
276 |
+
"context_tower.tower.model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
277 |
+
"context_tower.tower.model.layers.7.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
278 |
+
"context_tower.tower.model.layers.7.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
279 |
+
"context_tower.tower.model.layers.7.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
280 |
+
"context_tower.tower.model.layers.7.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
281 |
+
"context_tower.tower.model.layers.7.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
282 |
+
"context_tower.tower.model.layers.7.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
283 |
+
"context_tower.tower.model.layers.7.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
284 |
+
"context_tower.tower.model.layers.7.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
285 |
+
"context_tower.tower.model.layers.8.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
286 |
+
"context_tower.tower.model.layers.8.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
287 |
+
"context_tower.tower.model.layers.8.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
288 |
+
"context_tower.tower.model.layers.8.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
289 |
+
"context_tower.tower.model.layers.8.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
290 |
+
"context_tower.tower.model.layers.8.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
291 |
+
"context_tower.tower.model.layers.8.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
292 |
+
"context_tower.tower.model.layers.8.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
293 |
+
"context_tower.tower.model.layers.8.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
294 |
+
"context_tower.tower.model.layers.8.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
295 |
+
"context_tower.tower.model.layers.8.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
296 |
+
"context_tower.tower.model.layers.8.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
297 |
+
"context_tower.tower.model.layers.9.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
298 |
+
"context_tower.tower.model.layers.9.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
299 |
+
"context_tower.tower.model.layers.9.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
300 |
+
"context_tower.tower.model.layers.9.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
301 |
+
"context_tower.tower.model.layers.9.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
302 |
+
"context_tower.tower.model.layers.9.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
303 |
+
"context_tower.tower.model.layers.9.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
304 |
+
"context_tower.tower.model.layers.9.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
305 |
+
"context_tower.tower.model.layers.9.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
306 |
+
"context_tower.tower.model.layers.9.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
307 |
+
"context_tower.tower.model.layers.9.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
308 |
+
"context_tower.tower.model.layers.9.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
309 |
+
"context_tower.tower.model.norm.weight": "model-00001-of-00004.safetensors",
|
310 |
+
"language_model.lm_head.weight": "model-00004-of-00004.safetensors",
|
311 |
+
"language_model.model.embed_tokens.weight": "model-00001-of-00004.safetensors",
|
312 |
+
"language_model.model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
313 |
+
"language_model.model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
314 |
+
"language_model.model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
315 |
+
"language_model.model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
316 |
+
"language_model.model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
317 |
+
"language_model.model.layers.0.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
318 |
+
"language_model.model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
319 |
+
"language_model.model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
320 |
+
"language_model.model.layers.0.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
321 |
+
"language_model.model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
322 |
+
"language_model.model.layers.0.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
323 |
+
"language_model.model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
324 |
+
"language_model.model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
325 |
+
"language_model.model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
326 |
+
"language_model.model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
327 |
+
"language_model.model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
328 |
+
"language_model.model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
329 |
+
"language_model.model.layers.1.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
330 |
+
"language_model.model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
331 |
+
"language_model.model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
332 |
+
"language_model.model.layers.1.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
333 |
+
"language_model.model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
334 |
+
"language_model.model.layers.1.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
335 |
+
"language_model.model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
336 |
+
"language_model.model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
337 |
+
"language_model.model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
338 |
+
"language_model.model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
339 |
+
"language_model.model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
340 |
+
"language_model.model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
341 |
+
"language_model.model.layers.10.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
|
342 |
+
"language_model.model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
343 |
+
"language_model.model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
344 |
+
"language_model.model.layers.10.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
|
345 |
+
"language_model.model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
346 |
+
"language_model.model.layers.10.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
|
347 |
+
"language_model.model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
348 |
+
"language_model.model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
349 |
+
"language_model.model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
350 |
+
"language_model.model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
351 |
+
"language_model.model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
352 |
+
"language_model.model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
353 |
+
"language_model.model.layers.11.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
|
354 |
+
"language_model.model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
355 |
+
"language_model.model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
356 |
+
"language_model.model.layers.11.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
|
357 |
+
"language_model.model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
358 |
+
"language_model.model.layers.11.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
|
359 |
+
"language_model.model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
360 |
+
"language_model.model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
361 |
+
"language_model.model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
362 |
+
"language_model.model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
363 |
+
"language_model.model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
364 |
+
"language_model.model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
365 |
+
"language_model.model.layers.12.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
|
366 |
+
"language_model.model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
367 |
+
"language_model.model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
368 |
+
"language_model.model.layers.12.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
|
369 |
+
"language_model.model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
370 |
+
"language_model.model.layers.12.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
|
371 |
+
"language_model.model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
372 |
+
"language_model.model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
373 |
+
"language_model.model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
374 |
+
"language_model.model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
375 |
+
"language_model.model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
376 |
+
"language_model.model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
377 |
+
"language_model.model.layers.13.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
|
378 |
+
"language_model.model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
379 |
+
"language_model.model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
380 |
+
"language_model.model.layers.13.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
|
381 |
+
"language_model.model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
382 |
+
"language_model.model.layers.13.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
|
383 |
+
"language_model.model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
384 |
+
"language_model.model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
385 |
+
"language_model.model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
386 |
+
"language_model.model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
387 |
+
"language_model.model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
388 |
+
"language_model.model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
389 |
+
"language_model.model.layers.14.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
|
390 |
+
"language_model.model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
391 |
+
"language_model.model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
392 |
+
"language_model.model.layers.14.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
|
393 |
+
"language_model.model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
394 |
+
"language_model.model.layers.14.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
|
395 |
+
"language_model.model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
396 |
+
"language_model.model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
397 |
+
"language_model.model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
398 |
+
"language_model.model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
399 |
+
"language_model.model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
400 |
+
"language_model.model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
401 |
+
"language_model.model.layers.15.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
|
402 |
+
"language_model.model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
403 |
+
"language_model.model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
404 |
+
"language_model.model.layers.15.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
|
405 |
+
"language_model.model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
406 |
+
"language_model.model.layers.15.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
|
407 |
+
"language_model.model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
408 |
+
"language_model.model.layers.16.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
409 |
+
"language_model.model.layers.16.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
410 |
+
"language_model.model.layers.16.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
411 |
+
"language_model.model.layers.16.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
412 |
+
"language_model.model.layers.16.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
413 |
+
"language_model.model.layers.16.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
|
414 |
+
"language_model.model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
415 |
+
"language_model.model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
416 |
+
"language_model.model.layers.16.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
|
417 |
+
"language_model.model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
418 |
+
"language_model.model.layers.16.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
|
419 |
+
"language_model.model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
420 |
+
"language_model.model.layers.17.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
421 |
+
"language_model.model.layers.17.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
422 |
+
"language_model.model.layers.17.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
423 |
+
"language_model.model.layers.17.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
424 |
+
"language_model.model.layers.17.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
425 |
+
"language_model.model.layers.17.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
|
426 |
+
"language_model.model.layers.17.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
427 |
+
"language_model.model.layers.17.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
428 |
+
"language_model.model.layers.17.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
|
429 |
+
"language_model.model.layers.17.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
430 |
+
"language_model.model.layers.17.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
|
431 |
+
"language_model.model.layers.17.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
432 |
+
"language_model.model.layers.18.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
433 |
+
"language_model.model.layers.18.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
434 |
+
"language_model.model.layers.18.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
435 |
+
"language_model.model.layers.18.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
436 |
+
"language_model.model.layers.18.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
437 |
+
"language_model.model.layers.18.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
|
438 |
+
"language_model.model.layers.18.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
439 |
+
"language_model.model.layers.18.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
440 |
+
"language_model.model.layers.18.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
|
441 |
+
"language_model.model.layers.18.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
442 |
+
"language_model.model.layers.18.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
|
443 |
+
"language_model.model.layers.18.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
444 |
+
"language_model.model.layers.19.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
445 |
+
"language_model.model.layers.19.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
446 |
+
"language_model.model.layers.19.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
447 |
+
"language_model.model.layers.19.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
448 |
+
"language_model.model.layers.19.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
449 |
+
"language_model.model.layers.19.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
|
450 |
+
"language_model.model.layers.19.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
451 |
+
"language_model.model.layers.19.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
452 |
+
"language_model.model.layers.19.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
|
453 |
+
"language_model.model.layers.19.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
454 |
+
"language_model.model.layers.19.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
|
455 |
+
"language_model.model.layers.19.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
456 |
+
"language_model.model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
457 |
+
"language_model.model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
458 |
+
"language_model.model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
459 |
+
"language_model.model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
460 |
+
"language_model.model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
461 |
+
"language_model.model.layers.2.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
462 |
+
"language_model.model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
463 |
+
"language_model.model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
464 |
+
"language_model.model.layers.2.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
465 |
+
"language_model.model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
466 |
+
"language_model.model.layers.2.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
467 |
+
"language_model.model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
468 |
+
"language_model.model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
469 |
+
"language_model.model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
470 |
+
"language_model.model.layers.20.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
471 |
+
"language_model.model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
472 |
+
"language_model.model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
473 |
+
"language_model.model.layers.20.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
|
474 |
+
"language_model.model.layers.20.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
475 |
+
"language_model.model.layers.20.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
476 |
+
"language_model.model.layers.20.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
|
477 |
+
"language_model.model.layers.20.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
478 |
+
"language_model.model.layers.20.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
|
479 |
+
"language_model.model.layers.20.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
480 |
+
"language_model.model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
481 |
+
"language_model.model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
482 |
+
"language_model.model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
483 |
+
"language_model.model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
484 |
+
"language_model.model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
485 |
+
"language_model.model.layers.21.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
|
486 |
+
"language_model.model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
487 |
+
"language_model.model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
488 |
+
"language_model.model.layers.21.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
|
489 |
+
"language_model.model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
490 |
+
"language_model.model.layers.21.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
|
491 |
+
"language_model.model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
492 |
+
"language_model.model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
493 |
+
"language_model.model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
494 |
+
"language_model.model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
495 |
+
"language_model.model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
496 |
+
"language_model.model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
497 |
+
"language_model.model.layers.22.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
|
498 |
+
"language_model.model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
499 |
+
"language_model.model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
500 |
+
"language_model.model.layers.22.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
|
501 |
+
"language_model.model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
502 |
+
"language_model.model.layers.22.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
|
503 |
+
"language_model.model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
504 |
+
"language_model.model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
505 |
+
"language_model.model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
506 |
+
"language_model.model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
507 |
+
"language_model.model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
508 |
+
"language_model.model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
509 |
+
"language_model.model.layers.23.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
|
510 |
+
"language_model.model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
511 |
+
"language_model.model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
512 |
+
"language_model.model.layers.23.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
|
513 |
+
"language_model.model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
514 |
+
"language_model.model.layers.23.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
|
515 |
+
"language_model.model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
516 |
+
"language_model.model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
517 |
+
"language_model.model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
518 |
+
"language_model.model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
519 |
+
"language_model.model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
520 |
+
"language_model.model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
521 |
+
"language_model.model.layers.24.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
|
522 |
+
"language_model.model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
523 |
+
"language_model.model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
524 |
+
"language_model.model.layers.24.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
|
525 |
+
"language_model.model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
526 |
+
"language_model.model.layers.24.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
|
527 |
+
"language_model.model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
528 |
+
"language_model.model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
529 |
+
"language_model.model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
530 |
+
"language_model.model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
531 |
+
"language_model.model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
532 |
+
"language_model.model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
533 |
+
"language_model.model.layers.25.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
|
534 |
+
"language_model.model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
535 |
+
"language_model.model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
536 |
+
"language_model.model.layers.25.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
|
537 |
+
"language_model.model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
538 |
+
"language_model.model.layers.25.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
|
539 |
+
"language_model.model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
540 |
+
"language_model.model.layers.26.input_layernorm.weight": "model-00004-of-00004.safetensors",
|
541 |
+
"language_model.model.layers.26.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
|
542 |
+
"language_model.model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
543 |
+
"language_model.model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
544 |
+
"language_model.model.layers.26.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
|
545 |
+
"language_model.model.layers.26.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
|
546 |
+
"language_model.model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
547 |
+
"language_model.model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
548 |
+
"language_model.model.layers.26.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
|
549 |
+
"language_model.model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
550 |
+
"language_model.model.layers.26.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
|
551 |
+
"language_model.model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
552 |
+
"language_model.model.layers.27.input_layernorm.weight": "model-00004-of-00004.safetensors",
|
553 |
+
"language_model.model.layers.27.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
|
554 |
+
"language_model.model.layers.27.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
|
555 |
+
"language_model.model.layers.27.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
|
556 |
+
"language_model.model.layers.27.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
|
557 |
+
"language_model.model.layers.27.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
|
558 |
+
"language_model.model.layers.27.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
|
559 |
+
"language_model.model.layers.27.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
|
560 |
+
"language_model.model.layers.27.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
|
561 |
+
"language_model.model.layers.27.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
|
562 |
+
"language_model.model.layers.27.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
|
563 |
+
"language_model.model.layers.27.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
|
564 |
+
"language_model.model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
565 |
+
"language_model.model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
566 |
+
"language_model.model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
567 |
+
"language_model.model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
568 |
+
"language_model.model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
569 |
+
"language_model.model.layers.3.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
570 |
+
"language_model.model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
571 |
+
"language_model.model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
572 |
+
"language_model.model.layers.3.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
573 |
+
"language_model.model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
574 |
+
"language_model.model.layers.3.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
575 |
+
"language_model.model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
576 |
+
"language_model.model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
577 |
+
"language_model.model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
578 |
+
"language_model.model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
579 |
+
"language_model.model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
580 |
+
"language_model.model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
581 |
+
"language_model.model.layers.4.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
582 |
+
"language_model.model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
583 |
+
"language_model.model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
584 |
+
"language_model.model.layers.4.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
585 |
+
"language_model.model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
586 |
+
"language_model.model.layers.4.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
587 |
+
"language_model.model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
588 |
+
"language_model.model.layers.5.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
589 |
+
"language_model.model.layers.5.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
590 |
+
"language_model.model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
591 |
+
"language_model.model.layers.5.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
592 |
+
"language_model.model.layers.5.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
593 |
+
"language_model.model.layers.5.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
|
594 |
+
"language_model.model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
595 |
+
"language_model.model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
596 |
+
"language_model.model.layers.5.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
|
597 |
+
"language_model.model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
598 |
+
"language_model.model.layers.5.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
|
599 |
+
"language_model.model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
600 |
+
"language_model.model.layers.6.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
601 |
+
"language_model.model.layers.6.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
602 |
+
"language_model.model.layers.6.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
603 |
+
"language_model.model.layers.6.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
604 |
+
"language_model.model.layers.6.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
605 |
+
"language_model.model.layers.6.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
|
606 |
+
"language_model.model.layers.6.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
607 |
+
"language_model.model.layers.6.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
608 |
+
"language_model.model.layers.6.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
|
609 |
+
"language_model.model.layers.6.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
610 |
+
"language_model.model.layers.6.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
|
611 |
+
"language_model.model.layers.6.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
612 |
+
"language_model.model.layers.7.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
613 |
+
"language_model.model.layers.7.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
614 |
+
"language_model.model.layers.7.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
615 |
+
"language_model.model.layers.7.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
616 |
+
"language_model.model.layers.7.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
617 |
+
"language_model.model.layers.7.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
|
618 |
+
"language_model.model.layers.7.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
619 |
+
"language_model.model.layers.7.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
620 |
+
"language_model.model.layers.7.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
|
621 |
+
"language_model.model.layers.7.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
622 |
+
"language_model.model.layers.7.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
|
623 |
+
"language_model.model.layers.7.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
624 |
+
"language_model.model.layers.8.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
625 |
+
"language_model.model.layers.8.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
626 |
+
"language_model.model.layers.8.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
627 |
+
"language_model.model.layers.8.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
628 |
+
"language_model.model.layers.8.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
629 |
+
"language_model.model.layers.8.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
|
630 |
+
"language_model.model.layers.8.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
631 |
+
"language_model.model.layers.8.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
632 |
+
"language_model.model.layers.8.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
|
633 |
+
"language_model.model.layers.8.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
634 |
+
"language_model.model.layers.8.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
|
635 |
+
"language_model.model.layers.8.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
636 |
+
"language_model.model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
637 |
+
"language_model.model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
638 |
+
"language_model.model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
639 |
+
"language_model.model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
640 |
+
"language_model.model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
641 |
+
"language_model.model.layers.9.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
|
642 |
+
"language_model.model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
643 |
+
"language_model.model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
644 |
+
"language_model.model.layers.9.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
|
645 |
+
"language_model.model.layers.9.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
646 |
+
"language_model.model.layers.9.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
|
647 |
+
"language_model.model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
648 |
+
"language_model.model.norm.weight": "model-00004-of-00004.safetensors"
|
649 |
+
}
|
650 |
+
}
|
modeling_c_cubed.py
ADDED
@@ -0,0 +1,738 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
"""PyTorch Ccubed model."""
|
3 |
+
|
4 |
+
import math
|
5 |
+
from dataclasses import dataclass
|
6 |
+
from typing import List, Optional, Tuple, Union
|
7 |
+
|
8 |
+
import numpy as np
|
9 |
+
import torch
|
10 |
+
import torch.utils.checkpoint
|
11 |
+
from torch import nn
|
12 |
+
|
13 |
+
from transformers.modeling_utils import ALL_ATTENTION_FUNCTIONS, PreTrainedModel
|
14 |
+
from transformers.activations import ACT2FN
|
15 |
+
from transformers.cache_utils import Cache, DynamicCache, StaticCache
|
16 |
+
from transformers.processing_utils import Unpack
|
17 |
+
from transformers.image_processing_utils import select_best_resolution
|
18 |
+
from transformers.modeling_outputs import ModelOutput
|
19 |
+
from transformers.modeling_flash_attention_utils import FlashAttentionKwargs, _flash_attention_forward
|
20 |
+
from transformers.utils import (
|
21 |
+
add_start_docstrings,
|
22 |
+
add_start_docstrings_to_model_forward,
|
23 |
+
logging,
|
24 |
+
replace_return_docstrings,
|
25 |
+
is_flash_attn_2_available,
|
26 |
+
is_flash_attn_greater_or_equal_2_10
|
27 |
+
)
|
28 |
+
from transformers import AutoTokenizer, AutoModel, AutoModelForCausalLM
|
29 |
+
from .configuration_c_cubed import CcubedConfig
|
30 |
+
|
31 |
+
|
32 |
+
logger = logging.get_logger(__name__)
|
33 |
+
|
34 |
+
_CONFIG_FOR_DOC = "CcubedConfig"
|
35 |
+
|
36 |
+
|
37 |
+
def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor:
|
38 |
+
"""
|
39 |
+
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch,
|
40 |
+
num_key_value_heads, seqlen, head_dim) to (batch, num_attention_heads, seqlen, head_dim)
|
41 |
+
"""
|
42 |
+
batch, num_key_value_heads, slen, head_dim = hidden_states.shape
|
43 |
+
if n_rep == 1:
|
44 |
+
return hidden_states
|
45 |
+
hidden_states = hidden_states[:, :, None, :, :].expand(batch, num_key_value_heads, n_rep, slen, head_dim)
|
46 |
+
return hidden_states.reshape(batch, num_key_value_heads * n_rep, slen, head_dim)
|
47 |
+
|
48 |
+
|
49 |
+
@dataclass
|
50 |
+
class CcubedCausalLMOutputWithPast(ModelOutput):
|
51 |
+
"""
|
52 |
+
Base class for Ccubed causal language model (or autoregressive) outputs.
|
53 |
+
|
54 |
+
Args:
|
55 |
+
loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
|
56 |
+
Language modeling loss (for next-token prediction).
|
57 |
+
logits (`torch.FloatTensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
|
58 |
+
Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).
|
59 |
+
past_key_values (`tuple(tuple(torch.FloatTensor))`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
|
60 |
+
Tuple of `tuple(torch.FloatTensor)` of length `config.context_config.num_layers`, with each tuple having 2 tensors of shape
|
61 |
+
`(batch_size, num_heads, sequence_length, embed_size_per_head)`)
|
62 |
+
|
63 |
+
Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
|
64 |
+
`past_key_values` input) to speed up sequential decoding.
|
65 |
+
hidden_states (`tuple(torch.FloatTensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
|
66 |
+
Tuple of `torch.FloatTensor` (one for the output of the embeddings, if the model has an embedding layer, +
|
67 |
+
one for the output of each layer) of shape `(batch_size, sequence_length, hidden_size)`.
|
68 |
+
|
69 |
+
Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.
|
70 |
+
attentions (`tuple(torch.FloatTensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
|
71 |
+
Tuple of `torch.FloatTensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
|
72 |
+
sequence_length)`.
|
73 |
+
|
74 |
+
Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
|
75 |
+
heads.
|
76 |
+
context_hidden_states (`torch.FloatTensor`, *optional*):
|
77 |
+
A `torch.FloatTensor` of size (batch_size, sequence_length, hidden_size)`.
|
78 |
+
context_hidden_states of the model produced by the context encoder and after projecting the last hidden state.
|
79 |
+
"""
|
80 |
+
|
81 |
+
loss: Optional[torch.FloatTensor] = None
|
82 |
+
logits: torch.FloatTensor = None
|
83 |
+
past_key_values: Optional[List[torch.FloatTensor]] = None
|
84 |
+
hidden_states: Optional[Tuple[torch.FloatTensor]] = None
|
85 |
+
attentions: Optional[Tuple[torch.FloatTensor]] = None
|
86 |
+
context_hidden_states: Optional[torch.FloatTensor] = None
|
87 |
+
|
88 |
+
|
89 |
+
class CcubedDynamicAttention(nn.Module):
|
90 |
+
"""
|
91 |
+
Attention mechanism adapted for dynamic output size based on Mistral's architecture. This attention layer computes
|
92 |
+
the output attention scores which are used to determine the pooling size dynamically.
|
93 |
+
"""
|
94 |
+
|
95 |
+
def __init__(self, config: CcubedConfig):
|
96 |
+
super().__init__()
|
97 |
+
|
98 |
+
self.config = config
|
99 |
+
self.hidden_size = config.context_config.hidden_size
|
100 |
+
self.num_heads = config.context_config.num_attention_heads
|
101 |
+
self.head_dim = getattr(config.context_config, "head_dim", self.hidden_size // self.num_heads)
|
102 |
+
self.num_key_value_heads = config.context_config.num_key_value_heads
|
103 |
+
self.num_key_value_groups = self.num_heads // self.num_key_value_heads
|
104 |
+
self.scaling = self.head_dim ** -0.5
|
105 |
+
self.attention_dropout = getattr(self.config.context_config, "attention_dropout", 0.0)
|
106 |
+
|
107 |
+
# Query, Key, Value, and Output Projections
|
108 |
+
self.q_proj = nn.Linear(self.hidden_size, self.num_heads * self.head_dim, bias=False)
|
109 |
+
self.k_proj = nn.Linear(self.hidden_size, self.num_key_value_heads * self.head_dim, bias=False)
|
110 |
+
self.v_proj = nn.Linear(self.hidden_size, self.num_key_value_heads * self.head_dim, bias=False)
|
111 |
+
self.o_proj = nn.Linear(self.num_heads * self.head_dim, 1, bias=False)
|
112 |
+
|
113 |
+
def forward(
|
114 |
+
self,
|
115 |
+
hidden_states: torch.Tensor,
|
116 |
+
attention_mask: Optional[torch.Tensor] = None,
|
117 |
+
output_attentions: bool = False,
|
118 |
+
):
|
119 |
+
# Get input dimensions
|
120 |
+
bsz, seq_len, hidden_size = hidden_states.size()
|
121 |
+
|
122 |
+
# Query, Key, Value projections
|
123 |
+
query_states = self.q_proj(hidden_states)
|
124 |
+
key_states = self.k_proj(hidden_states)
|
125 |
+
value_states = self.v_proj(hidden_states)
|
126 |
+
|
127 |
+
# Reshape and transpose to [batch_size, num_heads, seq_len, head_dim]
|
128 |
+
query_states = query_states.view(bsz, seq_len, self.num_heads, self.head_dim).transpose(1, 2)
|
129 |
+
key_states = key_states.view(bsz, seq_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
|
130 |
+
value_states = value_states.view(bsz, seq_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
|
131 |
+
|
132 |
+
# Repeat key and value states for multi-head attention
|
133 |
+
key_states = repeat_kv(key_states, self.num_key_value_groups)
|
134 |
+
value_states = repeat_kv(value_states, self.num_key_value_groups)
|
135 |
+
|
136 |
+
# Compute attention scores
|
137 |
+
attn_weights = torch.matmul(query_states, key_states.transpose(2, 3)) / math.sqrt(self.head_dim)
|
138 |
+
|
139 |
+
# Apply softmax to get attention probabilities
|
140 |
+
attn_weights = nn.functional.softmax(attn_weights, dim=-1)
|
141 |
+
|
142 |
+
# Apply attention to values
|
143 |
+
attn_output = torch.matmul(attn_weights, value_states)
|
144 |
+
|
145 |
+
# Reshape attention output
|
146 |
+
attn_output = attn_output.transpose(1, 2).contiguous()
|
147 |
+
attn_output = attn_output.reshape(bsz, seq_len, -1)
|
148 |
+
|
149 |
+
# Project to output dimension
|
150 |
+
attn_output = self.o_proj(attn_output)
|
151 |
+
|
152 |
+
if not output_attentions:
|
153 |
+
attn_weights = None
|
154 |
+
|
155 |
+
return attn_output, attn_weights
|
156 |
+
|
157 |
+
|
158 |
+
class CcubedDynamicFlashAttention2(CcubedDynamicAttention):
|
159 |
+
def __init__(self, config: CcubedConfig):
|
160 |
+
super().__init__(config)
|
161 |
+
self.is_causal = False # Assuming non-causal attention for this context
|
162 |
+
|
163 |
+
def forward(
|
164 |
+
self,
|
165 |
+
hidden_states: torch.Tensor,
|
166 |
+
attention_mask: Optional[torch.Tensor] = None,
|
167 |
+
output_attentions: bool = False,
|
168 |
+
**kwargs: Unpack[FlashAttentionKwargs],
|
169 |
+
):
|
170 |
+
input_shape = hidden_states.shape[:-1]
|
171 |
+
hidden_shape = (*input_shape, -1, self.head_dim)
|
172 |
+
|
173 |
+
query_states = self.q_proj(hidden_states).view(hidden_shape).transpose(1, 2)
|
174 |
+
key_states = self.k_proj(hidden_states).view(hidden_shape).transpose(1, 2)
|
175 |
+
value_states = self.v_proj(hidden_states).view(hidden_shape).transpose(1, 2)
|
176 |
+
|
177 |
+
sliding_window = None
|
178 |
+
if getattr(self.config, "sliding_window", None) is not None:
|
179 |
+
sliding_window = self.config.sliding_window
|
180 |
+
|
181 |
+
attention_interface = ALL_ATTENTION_FUNCTIONS[self.config._attn_implementation]
|
182 |
+
|
183 |
+
attn_output, attn_weights = attention_interface(
|
184 |
+
self,
|
185 |
+
query_states,
|
186 |
+
key_states,
|
187 |
+
value_states,
|
188 |
+
attention_mask,
|
189 |
+
dropout=0.0 if not self.training else self.attention_dropout,
|
190 |
+
scaling=self.scaling,
|
191 |
+
sliding_window=sliding_window, # main diff with Llama
|
192 |
+
**kwargs,
|
193 |
+
)
|
194 |
+
|
195 |
+
attn_output = attn_output.reshape(*input_shape, -1).contiguous()
|
196 |
+
attn_output = self.o_proj(attn_output)
|
197 |
+
return attn_output, attn_weights
|
198 |
+
|
199 |
+
|
200 |
+
class CcubedDynamicWeightedAvgPool1d(nn.Module):
|
201 |
+
"""
|
202 |
+
A module that dynamically determines the output size based on input
|
203 |
+
and performs weighted average pooling with separate attention mechanisms
|
204 |
+
for output size estimation and weighted pooling.
|
205 |
+
"""
|
206 |
+
def __init__(self, config, output_size_min=32, output_size_max=131072):
|
207 |
+
super().__init__()
|
208 |
+
# Attention mechanism for estimating output size
|
209 |
+
self.size_estim_attn = CcubedDynamicFlashAttention2(config) # CcubedDynamicAttention(config)
|
210 |
+
# Attention mechanism for weighted pooling
|
211 |
+
self.imp_estim_attn = CcubedDynamicFlashAttention2(config) # CcubedDynamicAttention(config)
|
212 |
+
self.output_size_min = output_size_min
|
213 |
+
self.output_size_max = (
|
214 |
+
config.context_config.max_position_embeddings if config.context_config.max_position_embeddings is not None else output_size_max
|
215 |
+
)
|
216 |
+
self.scale_param = nn.Parameter(torch.tensor(0.01))
|
217 |
+
|
218 |
+
def forward(self, hidden_states, context_attention_mask=None):
|
219 |
+
"""
|
220 |
+
Args:
|
221 |
+
x: Input tensor of shape (batch_size, seq_len, hidden_size)
|
222 |
+
|
223 |
+
Returns:
|
224 |
+
Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
|
225 |
+
- pooled_output: Padded tensor of compressed sequences (batch_size, max_pooled_len, hidden_size)
|
226 |
+
- attention_mask: Binary mask indicating valid tokens (batch_size, max_pooled_len)
|
227 |
+
- dynamic_output_sizes: Dynamic output sizes for each batch (batch_size,)
|
228 |
+
"""
|
229 |
+
batch_size, seq_len, hidden_size = hidden_states.size()
|
230 |
+
device = hidden_states.device
|
231 |
+
|
232 |
+
# Estimate output size using attention mechanism
|
233 |
+
# attn_output_size: (batch_size, seq_len, 1)
|
234 |
+
attn_output_size, _ = self.size_estim_attn(hidden_states)
|
235 |
+
|
236 |
+
# Calculate dynamic output sizes for each batch item
|
237 |
+
# (batch_size, seq_len, 1) -> (batch_size, 1)
|
238 |
+
batch_attn_means = torch.sigmoid(attn_output_size).mean(dim=1)
|
239 |
+
scaled_batch_means = batch_attn_means * self.scale_param.to(batch_attn_means.dtype)
|
240 |
+
|
241 |
+
# Calculate dynamic output sizes (batch_size,)
|
242 |
+
dynamic_output_sizes = (
|
243 |
+
(scaled_batch_means * (self.output_size_max - self.output_size_min)) + self.output_size_min
|
244 |
+
).int().squeeze(-1)
|
245 |
+
|
246 |
+
max_pooled_len = dynamic_output_sizes.max().item()
|
247 |
+
|
248 |
+
# Compute attention weights for weighted pooling
|
249 |
+
# attn_output_weights: (batch_size, seq_len, 1)
|
250 |
+
attn_output_weights, _ = self.imp_estim_attn(hidden_states)
|
251 |
+
# Normalize with sigmoid function for use as weights
|
252 |
+
# attention_weights: (batch_size, seq_len)
|
253 |
+
attention_weights = torch.sigmoid(attn_output_weights).squeeze(-1)
|
254 |
+
|
255 |
+
# If context_attention_mask is provided, apply it to zero out weights for invalid tokens
|
256 |
+
if context_attention_mask is not None:
|
257 |
+
attention_weights = attention_weights * context_attention_mask
|
258 |
+
|
259 |
+
# Initialize output tensors
|
260 |
+
# pooled_output: (batch_size, max_pooled_len, hidden_size)
|
261 |
+
pooled_output = torch.zeros(
|
262 |
+
batch_size, max_pooled_len, hidden_size,
|
263 |
+
device=device, dtype=hidden_states.dtype
|
264 |
+
)
|
265 |
+
# attention_mask: (batch_size, max_pooled_len)
|
266 |
+
attention_mask = torch.zeros(
|
267 |
+
batch_size, max_pooled_len,
|
268 |
+
dtype=torch.bool, device=device
|
269 |
+
)
|
270 |
+
|
271 |
+
for batch_idx in range(batch_size):
|
272 |
+
output_size = dynamic_output_sizes[batch_idx].item()
|
273 |
+
item_input = hidden_states[batch_idx] # Shape: (seq_len, hidden_size)
|
274 |
+
item_weights = attention_weights[batch_idx] # Shape: (seq_len)
|
275 |
+
|
276 |
+
# Perform weighted pooling
|
277 |
+
pooled_values = []
|
278 |
+
batch_attn_mask = torch.zeros(output_size, dtype=torch.bool, device=device)
|
279 |
+
# Split the sequence evenly
|
280 |
+
intervals = torch.linspace(0, seq_len, steps=output_size + 1).long()
|
281 |
+
for i in range(output_size):
|
282 |
+
start = intervals[i].item()
|
283 |
+
end = intervals[i + 1].item()
|
284 |
+
chunk_input = item_input[start:end] # Shape: (chunk_size, hidden_size)
|
285 |
+
chunk_weights = item_weights[start:end] # Shape: (chunk_size)
|
286 |
+
if chunk_weights.sum() == 0:
|
287 |
+
# If the sum of weights is zero, add a zero vector
|
288 |
+
pooled_value = torch.zeros(hidden_size, device=device, dtype=hidden_states.dtype)
|
289 |
+
else:
|
290 |
+
# Calculate weighted average
|
291 |
+
weighted_input = chunk_input * chunk_weights.unsqueeze(-1) # Shape: (chunk_size, hidden_size)
|
292 |
+
pooled_value = weighted_input.sum(dim=0) / (chunk_weights.sum() + 1e-8) # Shape: (hidden_size)
|
293 |
+
batch_attn_mask[i] = True
|
294 |
+
pooled_values.append(pooled_value)
|
295 |
+
|
296 |
+
if pooled_values: # Only stack if there are values
|
297 |
+
# Convert the result to a tensor
|
298 |
+
pooled_values = torch.stack(pooled_values) # Shape: (output_size, hidden_size)
|
299 |
+
# Store the result
|
300 |
+
pooled_output[batch_idx, -output_size:] = pooled_values
|
301 |
+
attention_mask[batch_idx, -output_size:] = batch_attn_mask
|
302 |
+
|
303 |
+
return pooled_output, attention_mask, dynamic_output_sizes
|
304 |
+
|
305 |
+
|
306 |
+
class CcubedContextLanguageConnector(nn.Module):
|
307 |
+
def __init__(self, config: CcubedConfig):
|
308 |
+
super().__init__()
|
309 |
+
|
310 |
+
self.dynamic_pooling = CcubedDynamicWeightedAvgPool1d(config)
|
311 |
+
|
312 |
+
self.linear_1 = nn.Linear(
|
313 |
+
config.context_config.hidden_size,
|
314 |
+
config.text_config.hidden_size,
|
315 |
+
bias=True
|
316 |
+
)
|
317 |
+
self.act = ACT2FN[config.projector_hidden_act]
|
318 |
+
self.linear_2 = nn.Linear(
|
319 |
+
config.text_config.hidden_size,
|
320 |
+
config.text_config.hidden_size,
|
321 |
+
bias=True
|
322 |
+
)
|
323 |
+
|
324 |
+
def forward(self, context_features):
|
325 |
+
# context_features: [batch_size, seq_len, hidden_size]
|
326 |
+
# Apply dynamic adaptive average pooling with attention
|
327 |
+
pooled_output, attention_mask, dynamic_output_sizes = self.dynamic_pooling(
|
328 |
+
hidden_states=context_features
|
329 |
+
)
|
330 |
+
|
331 |
+
hidden_states = self.linear_1(pooled_output)
|
332 |
+
hidden_states = self.act(hidden_states)
|
333 |
+
hidden_states = self.linear_2(hidden_states)
|
334 |
+
|
335 |
+
return hidden_states, attention_mask
|
336 |
+
|
337 |
+
|
338 |
+
class CcubedContextTower(nn.Module):
|
339 |
+
def __init__(self, config: CcubedConfig):
|
340 |
+
super().__init__()
|
341 |
+
|
342 |
+
self.tower = AutoModelForCausalLM.from_config(
|
343 |
+
config.context_config,
|
344 |
+
attn_implementation="flash_attention_2" if is_flash_attn_2_available() else "eager"
|
345 |
+
)
|
346 |
+
self.select_layer = config.context_feature_layer
|
347 |
+
|
348 |
+
def feature_select(self, llm_outputs):
|
349 |
+
hidden_states = llm_outputs.hidden_states
|
350 |
+
return hidden_states[self.select_layer]
|
351 |
+
|
352 |
+
def forward(
|
353 |
+
self,
|
354 |
+
input_ids,
|
355 |
+
inputs_embeds,
|
356 |
+
attention_mask
|
357 |
+
):
|
358 |
+
outputs = self.tower(
|
359 |
+
input_ids=input_ids,
|
360 |
+
inputs_embeds=inputs_embeds,
|
361 |
+
attention_mask=attention_mask,
|
362 |
+
output_hidden_states=True
|
363 |
+
)
|
364 |
+
features = self.feature_select(outputs)
|
365 |
+
return features
|
366 |
+
|
367 |
+
|
368 |
+
class CcubedPreTrainedModel(PreTrainedModel):
|
369 |
+
config_class = CcubedConfig
|
370 |
+
base_model_prefix = "model"
|
371 |
+
supports_gradient_checkpointing = True
|
372 |
+
_no_split_modules = [] # ["CcubedContextLanguageConnector", "CcubedContextTower"]
|
373 |
+
_skip_keys_device_placement = ["past_key_values"]
|
374 |
+
_supports_flash_attn_2 = True
|
375 |
+
_supports_sdpa = True
|
376 |
+
_supports_cache_class = True
|
377 |
+
_supports_quantized_cache = True
|
378 |
+
_supports_static_cache = True
|
379 |
+
|
380 |
+
def _init_weights(self, module):
|
381 |
+
std = (
|
382 |
+
self.config.initializer_range
|
383 |
+
if hasattr(self.config, "initializer_range")
|
384 |
+
else self.config.text_config.initializer_range
|
385 |
+
)
|
386 |
+
if isinstance(module, nn.Linear):
|
387 |
+
module.weight.data.normal_(mean=0.0, std=std)
|
388 |
+
if module.bias is not None:
|
389 |
+
module.bias.data.zero_()
|
390 |
+
elif isinstance(module, nn.Embedding):
|
391 |
+
module.weight.data.normal_(mean=0.0, std=std)
|
392 |
+
if module.padding_idx is not None:
|
393 |
+
module.weight.data[module.padding_idx].zero_()
|
394 |
+
|
395 |
+
|
396 |
+
class CcubedForConditionalGeneration(CcubedPreTrainedModel):
|
397 |
+
def __init__(self, config: CcubedConfig):
|
398 |
+
super().__init__(config)
|
399 |
+
self.context_tower = CcubedContextTower(config)
|
400 |
+
self.connector = CcubedContextLanguageConnector(config)
|
401 |
+
|
402 |
+
self.language_model = AutoModelForCausalLM.from_config(
|
403 |
+
config.text_config,
|
404 |
+
attn_implementation="flash_attention_2" if is_flash_attn_2_available() else "eager"
|
405 |
+
)
|
406 |
+
|
407 |
+
self.vocab_size = config.text_config.vocab_size
|
408 |
+
self.ignore_index = config.ignore_index if hasattr(config, 'ignore_index') else -100
|
409 |
+
self.start_of_context_token_id = config.start_of_context_token_id
|
410 |
+
self.end_of_context_token_id = config.end_of_context_token_id
|
411 |
+
|
412 |
+
self.post_init()
|
413 |
+
|
414 |
+
def get_input_embeddings(self):
|
415 |
+
return self.language_model.get_input_embeddings()
|
416 |
+
|
417 |
+
def get_context_input_embeddings(self):
|
418 |
+
return self.context_tower.tower.get_input_embeddings()
|
419 |
+
|
420 |
+
def set_input_embeddings(self, value):
|
421 |
+
self.language_model.set_input_embeddings(value)
|
422 |
+
|
423 |
+
def set_context_input_embeddings(self, value):
|
424 |
+
self.context_tower.tower.set_input_embeddings(value)
|
425 |
+
|
426 |
+
def get_output_embeddings(self):
|
427 |
+
return self.language_model.get_output_embeddings()
|
428 |
+
|
429 |
+
def get_context_output_embeddings(self):
|
430 |
+
return self.context_tower.tower.get_output_embeddings()
|
431 |
+
|
432 |
+
def set_output_embeddings(self, new_embeddings):
|
433 |
+
self.language_model.set_output_embeddings(new_embeddings)
|
434 |
+
|
435 |
+
def set_context_output_embeddings(self, new_embeddings):
|
436 |
+
self.context_tower.tower.set_output_embeddings(new_embeddings)
|
437 |
+
|
438 |
+
def set_decoder(self, decoder):
|
439 |
+
self.language_model.set_decoder(decoder)
|
440 |
+
|
441 |
+
def set_context_encoder(self, decoder):
|
442 |
+
self.context_tower.tower.set_decoder(decoder)
|
443 |
+
|
444 |
+
def get_decoder(self):
|
445 |
+
return self.language_model.get_decoder()
|
446 |
+
|
447 |
+
def get_context_encoder(self):
|
448 |
+
return self.context_tower.tower.get_decoder()
|
449 |
+
|
450 |
+
def tie_weights(self):
|
451 |
+
return self.language_model.tie_weights()
|
452 |
+
|
453 |
+
def context_tie_weights(self):
|
454 |
+
return self.context_tower.tower.tie_weights()
|
455 |
+
|
456 |
+
def resize_token_embeddings(self, new_num_tokens: Optional[int] = None, pad_to_multiple_of=None) -> nn.Embedding:
|
457 |
+
model_embeds = self.language_model.resize_token_embeddings(new_num_tokens, pad_to_multiple_of)
|
458 |
+
# update vocab size
|
459 |
+
self.config.text_config.vocab_size = model_embeds.num_embeddings
|
460 |
+
self.vocab_size = model_embeds.num_embeddings
|
461 |
+
return model_embeds
|
462 |
+
|
463 |
+
def _merge_context_features(
|
464 |
+
self,
|
465 |
+
context_features = None,
|
466 |
+
inputs_embeds = None,
|
467 |
+
attention_mask = None,
|
468 |
+
context_attention_mask=None,
|
469 |
+
position_ids=None,
|
470 |
+
labels=None,
|
471 |
+
):
|
472 |
+
if context_features is None:
|
473 |
+
return inputs_embeds, attention_mask, position_ids, labels
|
474 |
+
|
475 |
+
batch_size, seq_length, embed_dim = inputs_embeds.shape
|
476 |
+
context_seq_len = context_features.size(1)
|
477 |
+
|
478 |
+
# Create embeddings for begin and end of context tokens
|
479 |
+
begin_context_embed = self.get_input_embeddings()(torch.tensor(self.start_of_context_token_id, device=context_features.device))
|
480 |
+
end_context_embed = self.get_input_embeddings()(torch.tensor(self.end_of_context_token_id, device=context_features.device))
|
481 |
+
|
482 |
+
# Determine the actual lengths of context sequences (excluding padding)
|
483 |
+
if context_attention_mask is not None:
|
484 |
+
# context_attention_mask: [batch_size, context_seq_len, 1]
|
485 |
+
context_attention_mask = context_attention_mask.squeeze(-1) # [batch_size, context_seq_len]
|
486 |
+
# Sum over sequence length to get actual lengths
|
487 |
+
context_lengths = context_attention_mask.sum(dim=1).long() # [batch_size]
|
488 |
+
else:
|
489 |
+
# If no context_attention_mask is provided, assume full length
|
490 |
+
context_lengths = torch.full((batch_size,), context_seq_len, device=context_features.device, dtype=torch.long)
|
491 |
+
context_attention_mask = torch.ones(batch_size, context_seq_len, device=context_features.device, dtype=torch.long)
|
492 |
+
|
493 |
+
# Rearrange context features to include padding at the beginning
|
494 |
+
# Identify the maximum context length (excluding padding)
|
495 |
+
max_context_length = context_lengths.max().item()
|
496 |
+
# Calculate the amount of padding needed for each sample
|
497 |
+
padding_lengths = context_seq_len - context_lengths # [batch_size]
|
498 |
+
|
499 |
+
# Create new context_features with padding at the beginning
|
500 |
+
new_context_features = []
|
501 |
+
for i in range(batch_size):
|
502 |
+
padding_len = padding_lengths[i].item()
|
503 |
+
# Create padding embeddings (zeros)
|
504 |
+
padding_embed = torch.zeros(padding_len, embed_dim, device=context_features.device, dtype=context_features.dtype)
|
505 |
+
# Get actual context features (excluding padding)
|
506 |
+
actual_context = context_features[i, padding_len:context_seq_len]
|
507 |
+
# Concatenate padding, begin token, actual context, end token
|
508 |
+
sample_context = torch.cat([
|
509 |
+
padding_embed,
|
510 |
+
begin_context_embed.unsqueeze(0),
|
511 |
+
actual_context,
|
512 |
+
end_context_embed.unsqueeze(0)
|
513 |
+
], dim=0) # [context_seq_len + 2, embed_dim]
|
514 |
+
new_context_features.append(sample_context)
|
515 |
+
# Stack to create [batch_size, new_context_seq_len, embed_dim]
|
516 |
+
context_features = torch.stack(new_context_features, dim=0)
|
517 |
+
new_context_seq_len = context_features.size(1)
|
518 |
+
|
519 |
+
# Update context_attention_mask accordingly
|
520 |
+
new_context_attention_mask = []
|
521 |
+
for i in range(batch_size):
|
522 |
+
padding_len = padding_lengths[i].item()
|
523 |
+
# Create padding mask (zeros)
|
524 |
+
padding_mask = torch.zeros(padding_len, device=context_features.device, dtype=attention_mask.dtype)
|
525 |
+
# Begin and end token masks
|
526 |
+
begin_attention = torch.ones(1, device=context_features.device, dtype=attention_mask.dtype)
|
527 |
+
end_attention = torch.ones(1, device=context_features.device, dtype=attention_mask.dtype)
|
528 |
+
# Actual context attention mask (excluding padding)
|
529 |
+
actual_mask = context_attention_mask[i, padding_len:context_seq_len]
|
530 |
+
# Concatenate masks
|
531 |
+
sample_mask = torch.cat([
|
532 |
+
padding_mask,
|
533 |
+
begin_attention,
|
534 |
+
actual_mask,
|
535 |
+
end_attention
|
536 |
+
], dim=0) # [context_seq_len + 2]
|
537 |
+
new_context_attention_mask.append(sample_mask)
|
538 |
+
# Stack to create [batch_size, new_context_seq_len]
|
539 |
+
context_attention_mask = torch.stack(new_context_attention_mask, dim=0)
|
540 |
+
|
541 |
+
# Concatenate context features with input embeddings
|
542 |
+
new_inputs_embeds = torch.cat([context_features, inputs_embeds], dim=1) # [batch_size, total_seq_len, embed_dim]
|
543 |
+
|
544 |
+
# Concatenate attention masks
|
545 |
+
new_attention_mask = torch.cat([context_attention_mask, attention_mask], dim=1)
|
546 |
+
|
547 |
+
# Create new position_ids
|
548 |
+
total_seq_len = new_inputs_embeds.size(1)
|
549 |
+
new_position_ids = torch.arange(total_seq_len, device=inputs_embeds.device).unsqueeze(0).expand(batch_size, -1)
|
550 |
+
|
551 |
+
# Update labels if provided
|
552 |
+
if labels is not None:
|
553 |
+
# Create ignore labels for context (including padding and special tokens)
|
554 |
+
context_labels = torch.full((batch_size, new_context_seq_len), self.ignore_index, device=labels.device, dtype=labels.dtype)
|
555 |
+
new_labels = torch.cat([context_labels, labels], dim=1)
|
556 |
+
else:
|
557 |
+
new_labels = None
|
558 |
+
|
559 |
+
return new_inputs_embeds, new_attention_mask, new_position_ids, new_labels
|
560 |
+
|
561 |
+
|
562 |
+
@replace_return_docstrings(output_type=CcubedCausalLMOutputWithPast, config_class=_CONFIG_FOR_DOC)
|
563 |
+
def forward(
|
564 |
+
self,
|
565 |
+
context_input_ids: torch.LongTensor = None,
|
566 |
+
context_inputs_embeds: Optional[torch.FloatTensor] = None,
|
567 |
+
context_attention_mask: Optional[torch.Tensor] = None,
|
568 |
+
input_ids: torch.LongTensor = None,
|
569 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
570 |
+
attention_mask: Optional[torch.Tensor] = None,
|
571 |
+
position_ids: Optional[torch.LongTensor] = None,
|
572 |
+
past_key_values: Optional[List[torch.FloatTensor]] = None,
|
573 |
+
labels: Optional[torch.LongTensor] = None,
|
574 |
+
use_cache: Optional[bool] = None,
|
575 |
+
output_attentions: Optional[bool] = None,
|
576 |
+
output_hidden_states: Optional[bool] = None,
|
577 |
+
return_dict: Optional[bool] = None,
|
578 |
+
cache_position: Optional[torch.LongTensor] = None,
|
579 |
+
logits_to_keep: int = 0,
|
580 |
+
) -> Union[Tuple, CcubedCausalLMOutputWithPast]:
|
581 |
+
"""
|
582 |
+
Perform a forward pass through the Ccubed model, optionally conditioning on context input.
|
583 |
+
|
584 |
+
Args:
|
585 |
+
context_input_ids (`torch.LongTensor` of shape `(batch_size, context_sequence_length)`, *optional*):
|
586 |
+
Token IDs of the context input sequence.
|
587 |
+
context_inputs_embeds (`torch.FloatTensor` of shape `(batch_size, context_sequence_length, hidden_size)`, *optional*):
|
588 |
+
Pre-computed context embeddings. If provided, will not compute embeddings from context_input_ids.
|
589 |
+
context_attention_mask (`torch.Tensor` of shape `(batch_size, context_sequence_length)`, *optional*):
|
590 |
+
Attention mask for context input sequence.
|
591 |
+
input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
|
592 |
+
Token IDs of the input sequence.
|
593 |
+
inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
|
594 |
+
Optionally, instead of passing `input_ids`, you can pass an embedded representation directly.
|
595 |
+
attention_mask (`torch.Tensor` of shape `(batch_size, sequence_length)`, *optional*):
|
596 |
+
Mask to avoid performing attention on padding token indices.
|
597 |
+
position_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
|
598 |
+
Indices of positions of each input sequence token.
|
599 |
+
past_key_values (`List[torch.FloatTensor]`, *optional*):
|
600 |
+
Pre-computed hidden-states (key and value tensors) that can be used to speed up sequential decoding.
|
601 |
+
labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
|
602 |
+
Labels for computing the masked language modeling loss. Indices should either be in `[0, ...,
|
603 |
+
config.vocab_size]` or -100 (see `input_ids` docstring). Tokens with indices set to `-100` are ignored
|
604 |
+
(masked), the loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`.
|
605 |
+
use_cache (`bool`, *optional*):
|
606 |
+
If `True`, past key values will be used to speed up decoding.
|
607 |
+
output_attentions (`bool`, *optional*):
|
608 |
+
If `True`, return the attention tensors for each layer.
|
609 |
+
output_hidden_states (`bool`, *optional*):
|
610 |
+
If `True`, return the hidden states of all layers.
|
611 |
+
return_dict (`bool`, *optional*):
|
612 |
+
If `True`, return a `CcubedCausalLMOutputWithPast` instead of a plain tuple.
|
613 |
+
num_logits_to_keep (`int`, *optional*):
|
614 |
+
Calculate logits for the last `num_logits_to_keep` tokens. If `0`, calculate logits for all
|
615 |
+
`input_ids` (special case). Only last token logits are needed for generation, and calculating them only for that
|
616 |
+
token can save memory, which becomes pretty significant for long sequences or large vocabulary size.
|
617 |
+
|
618 |
+
Returns:
|
619 |
+
`Union[Tuple, CcubedCausalLMOutputWithPast]`: A tuple containing various model outputs or a `CcubedCausalLMOutputWithPast` instance.
|
620 |
+
The CcubedCausalLMOutputWithPast contains the following fields:
|
621 |
+
- loss (`torch.FloatTensor`, *optional*): Language modeling loss if labels provided, None otherwise.
|
622 |
+
- logits (`torch.FloatTensor` of shape `(batch_size, sequence_length, vocab_size)`): Prediction scores.
|
623 |
+
- past_key_values (`List[torch.FloatTensor]`, *optional*): Pre-computed hidden states for efficient decoding.
|
624 |
+
- hidden_states (`Tuple[torch.FloatTensor]`, *optional*): Layer hidden states if output_hidden_states=True.
|
625 |
+
- attentions (`Tuple[torch.FloatTensor]`, *optional*): Layer attention weights if output_attentions=True.
|
626 |
+
- context_hidden_states (`torch.FloatTensor`, *optional*): Final hidden states from the context tower.
|
627 |
+
"""
|
628 |
+
|
629 |
+
output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
|
630 |
+
output_hidden_states = (
|
631 |
+
output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
|
632 |
+
)
|
633 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
634 |
+
|
635 |
+
|
636 |
+
all_inputs_none = (
|
637 |
+
input_ids is None and
|
638 |
+
inputs_embeds is None and
|
639 |
+
context_input_ids is None and
|
640 |
+
context_inputs_embeds is None
|
641 |
+
)
|
642 |
+
|
643 |
+
if all_inputs_none:
|
644 |
+
raise ValueError("You must provide either non-empty input_ids/inputs_embeds or context_input_ids/context_inputs_embeds.")
|
645 |
+
|
646 |
+
|
647 |
+
if context_input_ids is not None or context_inputs_embeds is not None:
|
648 |
+
context_features = self.context_tower(
|
649 |
+
input_ids=context_input_ids,
|
650 |
+
inputs_embeds=context_inputs_embeds,
|
651 |
+
attention_mask=context_attention_mask,
|
652 |
+
)
|
653 |
+
context_features, context_attention_mask = self.connector(
|
654 |
+
context_features=context_features
|
655 |
+
)
|
656 |
+
else:
|
657 |
+
context_features = None
|
658 |
+
context_attention_mask = None
|
659 |
+
|
660 |
+
|
661 |
+
if inputs_embeds is None and input_ids is not None:
|
662 |
+
inputs_embeds = self.get_input_embeddings()(input_ids)
|
663 |
+
|
664 |
+
if inputs_embeds is not None:
|
665 |
+
inputs_embeds, attention_mask, position_ids, labels = self._merge_context_features(
|
666 |
+
context_features=context_features,
|
667 |
+
inputs_embeds=inputs_embeds,
|
668 |
+
attention_mask=attention_mask,
|
669 |
+
context_attention_mask=context_attention_mask,
|
670 |
+
position_ids=position_ids,
|
671 |
+
labels=labels,
|
672 |
+
)
|
673 |
+
else:
|
674 |
+
inputs_embeds = context_features
|
675 |
+
attention_mask = context_attention_mask
|
676 |
+
|
677 |
+
outputs = self.language_model(
|
678 |
+
attention_mask=attention_mask,
|
679 |
+
position_ids=position_ids,
|
680 |
+
past_key_values=past_key_values,
|
681 |
+
inputs_embeds=inputs_embeds,
|
682 |
+
use_cache=use_cache,
|
683 |
+
output_attentions=output_attentions,
|
684 |
+
output_hidden_states=output_hidden_states,
|
685 |
+
return_dict=return_dict,
|
686 |
+
cache_position=cache_position,
|
687 |
+
logits_to_keep=logits_to_keep,
|
688 |
+
)
|
689 |
+
|
690 |
+
logits = outputs[0]
|
691 |
+
|
692 |
+
loss = None
|
693 |
+
if labels is not None:
|
694 |
+
shift_logits = logits[..., :-1, :].contiguous()
|
695 |
+
shift_labels = labels[..., 1:].contiguous()
|
696 |
+
loss_fct = nn.CrossEntropyLoss(ignore_index=self.ignore_index)
|
697 |
+
loss = loss_fct(shift_logits.view(-1, shift_logits.size(-1)), shift_labels.view(-1).to(shift_logits.device))
|
698 |
+
|
699 |
+
if not return_dict:
|
700 |
+
output = (logits,) + outputs[1:]
|
701 |
+
return (loss,) + output if loss is not None else output
|
702 |
+
|
703 |
+
return CcubedCausalLMOutputWithPast(
|
704 |
+
loss=loss,
|
705 |
+
logits=logits,
|
706 |
+
past_key_values=outputs.past_key_values,
|
707 |
+
hidden_states=outputs.hidden_states,
|
708 |
+
attentions=outputs.attentions,
|
709 |
+
context_hidden_states=context_features,
|
710 |
+
)
|
711 |
+
|
712 |
+
def prepare_inputs_for_generation(
|
713 |
+
self,
|
714 |
+
input_ids,
|
715 |
+
past_key_values=None,
|
716 |
+
attention_mask=None,
|
717 |
+
inputs_embeds=None,
|
718 |
+
context_features=None,
|
719 |
+
**kwargs
|
720 |
+
):
|
721 |
+
if past_key_values:
|
722 |
+
input_ids = input_ids[:, -1:]
|
723 |
+
|
724 |
+
# if `inputs_embeds` are passed, we only want to use them in the 1st generation step
|
725 |
+
if inputs_embeds is not None and past_key_values is None:
|
726 |
+
model_inputs = {"inputs_embeds": inputs_embeds}
|
727 |
+
else:
|
728 |
+
model_inputs = {"input_ids": input_ids}
|
729 |
+
|
730 |
+
model_inputs.update(
|
731 |
+
{
|
732 |
+
"past_key_values": past_key_values,
|
733 |
+
"use_cache": kwargs.get("use_cache"),
|
734 |
+
"attention_mask": attention_mask,
|
735 |
+
"context_features": context_features,
|
736 |
+
}
|
737 |
+
)
|
738 |
+
return model_inputs
|
text_tokenizer/added_tokens.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"</tool_call>": 151658,
|
3 |
+
"<tool_call>": 151657,
|
4 |
+
"<|box_end|>": 151649,
|
5 |
+
"<|box_start|>": 151648,
|
6 |
+
"<|ctx_end|>": 151666,
|
7 |
+
"<|ctx_start|>": 151665,
|
8 |
+
"<|endoftext|>": 151643,
|
9 |
+
"<|file_sep|>": 151664,
|
10 |
+
"<|fim_middle|>": 151660,
|
11 |
+
"<|fim_pad|>": 151662,
|
12 |
+
"<|fim_prefix|>": 151659,
|
13 |
+
"<|fim_suffix|>": 151661,
|
14 |
+
"<|im_end|>": 151645,
|
15 |
+
"<|im_start|>": 151644,
|
16 |
+
"<|image_pad|>": 151655,
|
17 |
+
"<|object_ref_end|>": 151647,
|
18 |
+
"<|object_ref_start|>": 151646,
|
19 |
+
"<|quad_end|>": 151651,
|
20 |
+
"<|quad_start|>": 151650,
|
21 |
+
"<|repo_name|>": 151663,
|
22 |
+
"<|video_pad|>": 151656,
|
23 |
+
"<|vision_end|>": 151653,
|
24 |
+
"<|vision_pad|>": 151654,
|
25 |
+
"<|vision_start|>": 151652
|
26 |
+
}
|
text_tokenizer/merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
text_tokenizer/special_tokens_map.json
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|im_start|>",
|
4 |
+
"<|im_end|>",
|
5 |
+
"<|object_ref_start|>",
|
6 |
+
"<|object_ref_end|>",
|
7 |
+
"<|box_start|>",
|
8 |
+
"<|box_end|>",
|
9 |
+
"<|quad_start|>",
|
10 |
+
"<|quad_end|>",
|
11 |
+
"<|vision_start|>",
|
12 |
+
"<|vision_end|>",
|
13 |
+
"<|vision_pad|>",
|
14 |
+
"<|image_pad|>",
|
15 |
+
"<|video_pad|>",
|
16 |
+
"<|ctx_start|>",
|
17 |
+
"<|ctx_end|>"
|
18 |
+
],
|
19 |
+
"eos_token": {
|
20 |
+
"content": "<|im_end|>",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false
|
25 |
+
},
|
26 |
+
"pad_token": {
|
27 |
+
"content": "<|endoftext|>",
|
28 |
+
"lstrip": false,
|
29 |
+
"normalized": false,
|
30 |
+
"rstrip": false,
|
31 |
+
"single_word": false
|
32 |
+
}
|
33 |
+
}
|
text_tokenizer/tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8720cd2ad3b0c43b93dfdacb8f894b297827dec51604ccb3e777ce295068a66f
|
3 |
+
size 11422274
|
text_tokenizer/tokenizer_config.json
ADDED
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": false,
|
3 |
+
"add_prefix_space": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"151643": {
|
6 |
+
"content": "<|endoftext|>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"151644": {
|
14 |
+
"content": "<|im_start|>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"151645": {
|
22 |
+
"content": "<|im_end|>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
},
|
29 |
+
"151646": {
|
30 |
+
"content": "<|object_ref_start|>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": false,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false,
|
35 |
+
"special": true
|
36 |
+
},
|
37 |
+
"151647": {
|
38 |
+
"content": "<|object_ref_end|>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false,
|
43 |
+
"special": true
|
44 |
+
},
|
45 |
+
"151648": {
|
46 |
+
"content": "<|box_start|>",
|
47 |
+
"lstrip": false,
|
48 |
+
"normalized": false,
|
49 |
+
"rstrip": false,
|
50 |
+
"single_word": false,
|
51 |
+
"special": true
|
52 |
+
},
|
53 |
+
"151649": {
|
54 |
+
"content": "<|box_end|>",
|
55 |
+
"lstrip": false,
|
56 |
+
"normalized": false,
|
57 |
+
"rstrip": false,
|
58 |
+
"single_word": false,
|
59 |
+
"special": true
|
60 |
+
},
|
61 |
+
"151650": {
|
62 |
+
"content": "<|quad_start|>",
|
63 |
+
"lstrip": false,
|
64 |
+
"normalized": false,
|
65 |
+
"rstrip": false,
|
66 |
+
"single_word": false,
|
67 |
+
"special": true
|
68 |
+
},
|
69 |
+
"151651": {
|
70 |
+
"content": "<|quad_end|>",
|
71 |
+
"lstrip": false,
|
72 |
+
"normalized": false,
|
73 |
+
"rstrip": false,
|
74 |
+
"single_word": false,
|
75 |
+
"special": true
|
76 |
+
},
|
77 |
+
"151652": {
|
78 |
+
"content": "<|vision_start|>",
|
79 |
+
"lstrip": false,
|
80 |
+
"normalized": false,
|
81 |
+
"rstrip": false,
|
82 |
+
"single_word": false,
|
83 |
+
"special": true
|
84 |
+
},
|
85 |
+
"151653": {
|
86 |
+
"content": "<|vision_end|>",
|
87 |
+
"lstrip": false,
|
88 |
+
"normalized": false,
|
89 |
+
"rstrip": false,
|
90 |
+
"single_word": false,
|
91 |
+
"special": true
|
92 |
+
},
|
93 |
+
"151654": {
|
94 |
+
"content": "<|vision_pad|>",
|
95 |
+
"lstrip": false,
|
96 |
+
"normalized": false,
|
97 |
+
"rstrip": false,
|
98 |
+
"single_word": false,
|
99 |
+
"special": true
|
100 |
+
},
|
101 |
+
"151655": {
|
102 |
+
"content": "<|image_pad|>",
|
103 |
+
"lstrip": false,
|
104 |
+
"normalized": false,
|
105 |
+
"rstrip": false,
|
106 |
+
"single_word": false,
|
107 |
+
"special": true
|
108 |
+
},
|
109 |
+
"151656": {
|
110 |
+
"content": "<|video_pad|>",
|
111 |
+
"lstrip": false,
|
112 |
+
"normalized": false,
|
113 |
+
"rstrip": false,
|
114 |
+
"single_word": false,
|
115 |
+
"special": true
|
116 |
+
},
|
117 |
+
"151657": {
|
118 |
+
"content": "<tool_call>",
|
119 |
+
"lstrip": false,
|
120 |
+
"normalized": false,
|
121 |
+
"rstrip": false,
|
122 |
+
"single_word": false,
|
123 |
+
"special": false
|
124 |
+
},
|
125 |
+
"151658": {
|
126 |
+
"content": "</tool_call>",
|
127 |
+
"lstrip": false,
|
128 |
+
"normalized": false,
|
129 |
+
"rstrip": false,
|
130 |
+
"single_word": false,
|
131 |
+
"special": false
|
132 |
+
},
|
133 |
+
"151659": {
|
134 |
+
"content": "<|fim_prefix|>",
|
135 |
+
"lstrip": false,
|
136 |
+
"normalized": false,
|
137 |
+
"rstrip": false,
|
138 |
+
"single_word": false,
|
139 |
+
"special": false
|
140 |
+
},
|
141 |
+
"151660": {
|
142 |
+
"content": "<|fim_middle|>",
|
143 |
+
"lstrip": false,
|
144 |
+
"normalized": false,
|
145 |
+
"rstrip": false,
|
146 |
+
"single_word": false,
|
147 |
+
"special": false
|
148 |
+
},
|
149 |
+
"151661": {
|
150 |
+
"content": "<|fim_suffix|>",
|
151 |
+
"lstrip": false,
|
152 |
+
"normalized": false,
|
153 |
+
"rstrip": false,
|
154 |
+
"single_word": false,
|
155 |
+
"special": false
|
156 |
+
},
|
157 |
+
"151662": {
|
158 |
+
"content": "<|fim_pad|>",
|
159 |
+
"lstrip": false,
|
160 |
+
"normalized": false,
|
161 |
+
"rstrip": false,
|
162 |
+
"single_word": false,
|
163 |
+
"special": false
|
164 |
+
},
|
165 |
+
"151663": {
|
166 |
+
"content": "<|repo_name|>",
|
167 |
+
"lstrip": false,
|
168 |
+
"normalized": false,
|
169 |
+
"rstrip": false,
|
170 |
+
"single_word": false,
|
171 |
+
"special": false
|
172 |
+
},
|
173 |
+
"151664": {
|
174 |
+
"content": "<|file_sep|>",
|
175 |
+
"lstrip": false,
|
176 |
+
"normalized": false,
|
177 |
+
"rstrip": false,
|
178 |
+
"single_word": false,
|
179 |
+
"special": false
|
180 |
+
},
|
181 |
+
"151665": {
|
182 |
+
"content": "<|ctx_start|>",
|
183 |
+
"lstrip": false,
|
184 |
+
"normalized": false,
|
185 |
+
"rstrip": false,
|
186 |
+
"single_word": false,
|
187 |
+
"special": true
|
188 |
+
},
|
189 |
+
"151666": {
|
190 |
+
"content": "<|ctx_end|>",
|
191 |
+
"lstrip": false,
|
192 |
+
"normalized": false,
|
193 |
+
"rstrip": false,
|
194 |
+
"single_word": false,
|
195 |
+
"special": true
|
196 |
+
}
|
197 |
+
},
|
198 |
+
"additional_special_tokens": [
|
199 |
+
"<|im_start|>",
|
200 |
+
"<|im_end|>",
|
201 |
+
"<|object_ref_start|>",
|
202 |
+
"<|object_ref_end|>",
|
203 |
+
"<|box_start|>",
|
204 |
+
"<|box_end|>",
|
205 |
+
"<|quad_start|>",
|
206 |
+
"<|quad_end|>",
|
207 |
+
"<|vision_start|>",
|
208 |
+
"<|vision_end|>",
|
209 |
+
"<|vision_pad|>",
|
210 |
+
"<|image_pad|>",
|
211 |
+
"<|video_pad|>",
|
212 |
+
"<|ctx_start|>",
|
213 |
+
"<|ctx_end|>"
|
214 |
+
],
|
215 |
+
"bos_token": null,
|
216 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
|
217 |
+
"clean_up_tokenization_spaces": false,
|
218 |
+
"eos_token": "<|im_end|>",
|
219 |
+
"errors": "replace",
|
220 |
+
"extra_special_tokens": {},
|
221 |
+
"model_max_length": 131072,
|
222 |
+
"pad_token": "<|endoftext|>",
|
223 |
+
"split_special_tokens": false,
|
224 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
225 |
+
"unk_token": null
|
226 |
+
}
|
text_tokenizer/vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"tokenizer_class": "CcubedDualTokenizer"}
|