Saktsant commited on
Commit
84fa1b9
·
verified ·
1 Parent(s): 536a9fa

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ 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
+ llm/model.onnx.data filter=lfs diff=lfs merge=lfs -text
37
+ llm/tokenizer.json filter=lfs diff=lfs merge=lfs -text
38
+ visual/model.onnx.data filter=lfs diff=lfs merge=lfs -text
llm/chat_template.jinja ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {%- if messages[0].content is string %}
5
+ {{- messages[0].content }}
6
+ {%- else %}
7
+ {%- for content in messages[0].content %}
8
+ {%- if 'text' in content %}
9
+ {{- content.text }}
10
+ {%- endif %}
11
+ {%- endfor %}
12
+ {%- endif %}
13
+ {{- '\n\n' }}
14
+ {%- endif %}
15
+ {{- "# 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>" }}
16
+ {%- for tool in tools %}
17
+ {{- "\n" }}
18
+ {{- tool | tojson }}
19
+ {%- endfor %}
20
+ {{- "\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" }}
21
+ {%- else %}
22
+ {%- if messages[0].role == 'system' %}
23
+ {{- '<|im_start|>system\n' }}
24
+ {%- if messages[0].content is string %}
25
+ {{- messages[0].content }}
26
+ {%- else %}
27
+ {%- for content in messages[0].content %}
28
+ {%- if 'text' in content %}
29
+ {{- content.text }}
30
+ {%- endif %}
31
+ {%- endfor %}
32
+ {%- endif %}
33
+ {{- '<|im_end|>\n' }}
34
+ {%- endif %}
35
+ {%- endif %}
36
+ {%- set image_count = namespace(value=0) %}
37
+ {%- set video_count = namespace(value=0) %}
38
+ {%- for message in messages %}
39
+ {%- if message.role == "user" %}
40
+ {{- '<|im_start|>' + message.role + '\n' }}
41
+ {%- if message.content is string %}
42
+ {{- message.content }}
43
+ {%- else %}
44
+ {%- for content in message.content %}
45
+ {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
46
+ {%- set image_count.value = image_count.value + 1 %}
47
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
48
+ <|vision_start|><|image_pad|><|vision_end|>
49
+ {%- elif content.type == 'video' or 'video' in content %}
50
+ {%- set video_count.value = video_count.value + 1 %}
51
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
52
+ <|vision_start|><|video_pad|><|vision_end|>
53
+ {%- elif 'text' in content %}
54
+ {{- content.text }}
55
+ {%- endif %}
56
+ {%- endfor %}
57
+ {%- endif %}
58
+ {{- '<|im_end|>\n' }}
59
+ {%- elif message.role == "assistant" %}
60
+ {{- '<|im_start|>' + message.role + '\n' }}
61
+ {%- if message.content is string %}
62
+ {{- message.content }}
63
+ {%- else %}
64
+ {%- for content_item in message.content %}
65
+ {%- if 'text' in content_item %}
66
+ {{- content_item.text }}
67
+ {%- endif %}
68
+ {%- endfor %}
69
+ {%- endif %}
70
+ {%- if message.tool_calls %}
71
+ {%- for tool_call in message.tool_calls %}
72
+ {%- if (loop.first and message.content) or (not loop.first) %}
73
+ {{- '\n' }}
74
+ {%- endif %}
75
+ {%- if tool_call.function %}
76
+ {%- set tool_call = tool_call.function %}
77
+ {%- endif %}
78
+ {{- '<tool_call>\n{"name": "' }}
79
+ {{- tool_call.name }}
80
+ {{- '", "arguments": ' }}
81
+ {%- if tool_call.arguments is string %}
82
+ {{- tool_call.arguments }}
83
+ {%- else %}
84
+ {{- tool_call.arguments | tojson }}
85
+ {%- endif %}
86
+ {{- '}\n</tool_call>' }}
87
+ {%- endfor %}
88
+ {%- endif %}
89
+ {{- '<|im_end|>\n' }}
90
+ {%- elif message.role == "tool" %}
91
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
92
+ {{- '<|im_start|>user' }}
93
+ {%- endif %}
94
+ {{- '\n<tool_response>\n' }}
95
+ {%- if message.content is string %}
96
+ {{- message.content }}
97
+ {%- else %}
98
+ {%- for content in message.content %}
99
+ {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
100
+ {%- set image_count.value = image_count.value + 1 %}
101
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
102
+ <|vision_start|><|image_pad|><|vision_end|>
103
+ {%- elif content.type == 'video' or 'video' in content %}
104
+ {%- set video_count.value = video_count.value + 1 %}
105
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
106
+ <|vision_start|><|video_pad|><|vision_end|>
107
+ {%- elif 'text' in content %}
108
+ {{- content.text }}
109
+ {%- endif %}
110
+ {%- endfor %}
111
+ {%- endif %}
112
+ {{- '\n</tool_response>' }}
113
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
114
+ {{- '<|im_end|>\n' }}
115
+ {%- endif %}
116
+ {%- endif %}
117
+ {%- endfor %}
118
+ {%- if add_generation_prompt %}
119
+ {{- '<|im_start|>assistant\n' }}
120
+ {%- endif %}
llm/config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "qwen3_vl_text",
3
+ "spec_decode_type": "none",
4
+ "engine_role": "llm",
5
+ "edgellm_version": "0.10.0",
6
+ "vocab_size": 151936,
7
+ "hidden_size": 2560,
8
+ "intermediate_size": 9728,
9
+ "num_hidden_layers": 36,
10
+ "num_attention_heads": 32,
11
+ "num_key_value_heads": 8,
12
+ "head_dim": 128,
13
+ "max_position_embeddings": 262144,
14
+ "rope_theta": 5000000.0,
15
+ "rope_scaling": {
16
+ "mrope_interleaved": true,
17
+ "mrope_section": [
18
+ 24,
19
+ 20,
20
+ 20
21
+ ],
22
+ "rope_theta": 5000000,
23
+ "rope_type": "default",
24
+ "type": "default"
25
+ },
26
+ "partial_rotary_factor": 1.0,
27
+ "num_deepstack_features": 3,
28
+ "use_vision_bidirectional_attention": false,
29
+ "rms_norm_eps": 1e-06,
30
+ "attention_scaling": 0.08838834764831843,
31
+ "ple_enabled": false,
32
+ "num_ple_inputs": 0,
33
+ "ple_hidden_size": 0,
34
+ "kv_cache_dtype": "fp16",
35
+ "vision_config": {
36
+ "deepstack_visual_indexes": [
37
+ 5,
38
+ 11,
39
+ 17
40
+ ],
41
+ "depth": 24,
42
+ "dtype": "float16",
43
+ "hidden_act": "gelu_pytorch_tanh",
44
+ "hidden_size": 1024,
45
+ "in_channels": 3,
46
+ "initializer_range": 0.02,
47
+ "intermediate_size": 4096,
48
+ "model_type": "qwen3_vl_vision",
49
+ "num_heads": 16,
50
+ "num_position_embeddings": 2304,
51
+ "out_hidden_size": 2560,
52
+ "patch_size": 16,
53
+ "spatial_merge_size": 2,
54
+ "temporal_patch_size": 2
55
+ },
56
+ "eos_token_id": [
57
+ 151645,
58
+ 151643
59
+ ],
60
+ "image_token_id": 151655,
61
+ "video_token_id": 151656,
62
+ "vision_start_token_id": 151652,
63
+ "vision_end_token_id": 151653
64
+ }
llm/embedding.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:457e1e4d7746de09055ab0f39c3e9041523c47d36bb93cee2eb6b5101336dbe3
3
+ size 777912408
llm/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18d80299bc752e844b94e276973d10d7c5d8f4d17762386d39ef7e7858e342ad
3
+ size 3723297
llm/model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5aa19f2cce29914c61e7c3db3eddc33d1a74fe25c376b9de19ac8da5cca2e687
3
+ size 2653683712
llm/processed_chat_template.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_path": "/data/users/Sakthi/Qwen3-VL-4B-Instruct-model",
3
+ "roles": {
4
+ "system": {
5
+ "prefix": "<|im_start|>system\n",
6
+ "suffix": "<|im_end|>\n"
7
+ },
8
+ "user": {
9
+ "prefix": "<|im_start|>user\n",
10
+ "suffix": "<|im_end|>\n"
11
+ },
12
+ "assistant": {
13
+ "prefix": "<|im_start|>assistant\n",
14
+ "suffix": "<|im_end|>\n"
15
+ }
16
+ },
17
+ "content_types": {
18
+ "image": {
19
+ "format": "<|vision_start|><|image_pad|><|vision_end|>"
20
+ },
21
+ "video": {
22
+ "format": "<|vision_start|><|video_pad|><|vision_end|>"
23
+ }
24
+ },
25
+ "generation_prompt": "<|im_start|>assistant\n",
26
+ "default_system_prompt": ""
27
+ }
llm/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506
3
+ size 11422650
llm/tokenizer_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|im_start|>",
10
+ "<|im_end|>",
11
+ "<|object_ref_start|>",
12
+ "<|object_ref_end|>",
13
+ "<|box_start|>",
14
+ "<|box_end|>",
15
+ "<|quad_start|>",
16
+ "<|quad_end|>",
17
+ "<|vision_start|>",
18
+ "<|vision_end|>",
19
+ "<|vision_pad|>",
20
+ "<|image_pad|>",
21
+ "<|video_pad|>"
22
+ ],
23
+ "is_local": false,
24
+ "local_files_only": false,
25
+ "max_pixels": 2097152,
26
+ "min_pixels": 100352,
27
+ "model_max_length": 262144,
28
+ "pad_token": "<|endoftext|>",
29
+ "processor_class": "Qwen3VLProcessor",
30
+ "split_special_tokens": false,
31
+ "tokenizer_class": "Qwen2Tokenizer",
32
+ "unk_token": null
33
+ }
visual/config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "qwen3_vl",
3
+ "vision_config": {
4
+ "deepstack_visual_indexes": [
5
+ 5,
6
+ 11,
7
+ 17
8
+ ],
9
+ "depth": 24,
10
+ "dtype": "float16",
11
+ "hidden_act": "gelu_pytorch_tanh",
12
+ "hidden_size": 1024,
13
+ "in_channels": 3,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 4096,
16
+ "model_type": "qwen3_vl_vision",
17
+ "num_heads": 16,
18
+ "num_position_embeddings": 2304,
19
+ "out_hidden_size": 2560,
20
+ "patch_size": 16,
21
+ "spatial_merge_size": 2,
22
+ "temporal_patch_size": 2
23
+ },
24
+ "vision_start_token_id": 151652,
25
+ "vision_end_token_id": 151653,
26
+ "image_token_id": 151655,
27
+ "video_token_id": 151656,
28
+ "vocab_size": 151936,
29
+ "rope_theta": 5000000,
30
+ "rope_scaling": {
31
+ "mrope_interleaved": true,
32
+ "mrope_section": [
33
+ 24,
34
+ 20,
35
+ 20
36
+ ],
37
+ "rope_theta": 5000000,
38
+ "rope_type": "default",
39
+ "type": "default"
40
+ }
41
+ }
visual/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3bb7b638910c9d316ece10c1d47e10298cf2d3e242c0b619c235f261ee2722e
3
+ size 2108339
visual/model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a80a5f1e4a0b36fca9722dc500b96acdc8a42b3bf6c3a96703fca63201f42ec
3
+ size 830996480
visual/preprocessor_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": true,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "Qwen2VLImageProcessor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "merge_size": 2,
18
+ "patch_size": 16,
19
+ "resample": 3,
20
+ "rescale_factor": 0.00392156862745098,
21
+ "size": {
22
+ "longest_edge": 2097152,
23
+ "shortest_edge": 100352
24
+ },
25
+ "temporal_patch_size": 2
26
+ }