Maximum2000 commited on
Commit
9fb1a94
·
verified ·
1 Parent(s): c4be67f

Upload 19 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,10 @@ 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
+ phi-4-mm-embedding.onnx.data filter=lfs diff=lfs merge=lfs -text
37
+ phi-4-mm-speech.onnx_adapter filter=lfs diff=lfs merge=lfs -text
38
+ phi-4-mm-speech.onnx.data filter=lfs diff=lfs merge=lfs -text
39
+ phi-4-mm-text.onnx.data filter=lfs diff=lfs merge=lfs -text
40
+ phi-4-mm-vision.onnx_adapter filter=lfs diff=lfs merge=lfs -text
41
+ phi-4-mm-vision.onnx.data filter=lfs diff=lfs merge=lfs -text
42
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
added_tokens.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "<|/tool_call|>": 200026,
3
+ "<|/tool|>": 200024,
4
+ "<|assistant|>": 200019,
5
+ "<|end|>": 200020,
6
+ "<|system|>": 200022,
7
+ "<|tag|>": 200028,
8
+ "<|tool_call|>": 200025,
9
+ "<|tool_response|>": 200027,
10
+ "<|tool|>": 200023,
11
+ "<|user|>": 200021
12
+ }
genai_config.json ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": {
3
+ "bos_token_id": 199999,
4
+ "context_length": 131072,
5
+ "decoder": {
6
+ "session_options": {
7
+ "log_id": "onnxruntime-genai",
8
+ "provider_options": []
9
+ },
10
+ "filename": "phi-4-mm-text.onnx",
11
+ "head_size": 128,
12
+ "hidden_size": 3072,
13
+ "inputs": {
14
+ "inputs_embeds": "inputs_embeds",
15
+ "attention_mask": "attention_mask",
16
+ "past_key_names": "past_key_values.%d.key",
17
+ "past_value_names": "past_key_values.%d.value"
18
+ },
19
+ "outputs": {
20
+ "logits": "logits",
21
+ "present_key_names": "present.%d.key",
22
+ "present_value_names": "present.%d.value"
23
+ },
24
+ "num_attention_heads": 24,
25
+ "num_hidden_layers": 32,
26
+ "num_key_value_heads": 8
27
+ },
28
+ "vision": {
29
+ "filename": "phi-4-mm-vision.onnx",
30
+ "config_filename": "vision_processor.json",
31
+ "adapter_filename": "phi-4-mm-vision.onnx_adapter",
32
+ "inputs": {
33
+ "pixel_values": "pixel_values",
34
+ "attention_mask": "image_attention_mask",
35
+ "image_sizes": "image_sizes"
36
+ },
37
+ "outputs": {
38
+ "image_features": "image_features"
39
+ }
40
+ },
41
+ "speech": {
42
+ "filename": "phi-4-mm-speech.onnx",
43
+ "config_filename": "speech_processor.json",
44
+ "adapter_filename": "phi-4-mm-speech.onnx_adapter",
45
+ "inputs": {
46
+ "audio_embeds": "audio_embeds",
47
+ "attention_mask": "audio_attention_mask",
48
+ "audio_sizes": "audio_sizes",
49
+ "audio_projection_mode": "audio_projection_mode"
50
+ },
51
+ "outputs": {
52
+ "audio_features": "audio_features"
53
+ }
54
+ },
55
+ "embedding": {
56
+ "filename": "phi-4-mm-embedding.onnx",
57
+ "inputs": {
58
+ "input_ids": "input_ids",
59
+ "image_features": "image_features",
60
+ "audio_features": "audio_features"
61
+ },
62
+ "outputs": {
63
+ "inputs_embeds": "inputs_embeds"
64
+ }
65
+ },
66
+ "eos_token_id": [
67
+ 200020,
68
+ 199999
69
+ ],
70
+ "pad_token_id": 199999,
71
+ "type": "phi4mm",
72
+ "vocab_size": 200064
73
+ },
74
+ "search": {
75
+ "diversity_penalty": 0.0,
76
+ "do_sample": false,
77
+ "early_stopping": true,
78
+ "length_penalty": 1.0,
79
+ "max_length": 131072,
80
+ "min_length": 0,
81
+ "no_repeat_ngram_size": 0,
82
+ "num_beams": 1,
83
+ "num_return_sequences": 1,
84
+ "past_present_share_buffer": true,
85
+ "repetition_penalty": 1.0,
86
+ "temperature": 1.0,
87
+ "top_k": 1,
88
+ "top_p": 1.0
89
+ }
90
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
phi-4-mm-embedding.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e201c5981608c06f93b15860993bf6029cfc3f60401290926c404ab84946dddd
3
+ size 12008
phi-4-mm-embedding.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85e0389fd112f00584016e1429588410e07f548cbedc5111c84bafabb14c825b
3
+ size 1229193216
phi-4-mm-speech.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:716d5b322e623e85e3051fd8e384d9c19efb335b1d2813077f91b03a067e400f
3
+ size 392720
phi-4-mm-speech.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b88f9973d4882f50c34a3356678488e27bca2c986e053099356feed8f5f4060
3
+ size 932832512
phi-4-mm-speech.onnx_adapter ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:55b8ff5adb3d30e696617fc1d1b306dd93c30bfee61a98ac1833210ce5a4d18b
3
+ size 1111538200
phi-4-mm-text.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff1c7af0c0dbada3e05ac194158aadcfd6e9ae536f36443165dd213c925c6a6e
3
+ size 471015871
phi-4-mm-text.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dad7c5ab3dd37e47a8163d00e0796580ca23860455ec58d29b8652e5011f53da
3
+ size 7672043520
phi-4-mm-vision.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:586dc996160c16b438f2249606b104c2e87a9269ce88c3f72804f0d9fa91b127
3
+ size 358656
phi-4-mm-vision.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db9415c47e96318fbaf65352e14487c7b7a2454b4e71d57ae1bafe19e1368716
3
+ size 822139712
phi-4-mm-vision.onnx_adapter ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e333ae744261958e83dbeda556d8860760b732bc9a00892c8988e69a2f20094e
3
+ size 889240088
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|endoftext|>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<|endoftext|>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<|endoftext|>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
speech_processor.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "feature_extraction": {
3
+ "sequence": [
4
+ {
5
+ "operation": {
6
+ "name": "audio_decoder",
7
+ "type": "AudioDecoderEx",
8
+ "attrs": {
9
+ "target_sample_rates": [
10
+ 8000,
11
+ 16000
12
+ ]
13
+ }
14
+ }
15
+ },
16
+ {
17
+ "operation": {
18
+ "name": "phi_4_audio_embed",
19
+ "type": "Phi4AudioEmbed",
20
+ "attrs": {
21
+ "audio_compression_rate": 8,
22
+ "stft_normal/n_fft": 512,
23
+ "stft_normal/frame_length": 400,
24
+ "stft_normal/hop_length": 160,
25
+ "stft_normal/win_fn": "hamming",
26
+ "logmel/chunk_size": 30,
27
+ "logmel/hop_length": 160,
28
+ "logmel/n_fft": 512,
29
+ "logmel/n_mel": 80,
30
+ "logmel/feature_first": 0,
31
+ "logmel/no_padding": 1,
32
+ "stft_normal_8k/n_fft": 256,
33
+ "stft_normal_8k/frame_length": 200,
34
+ "stft_normal_8k/hop_length": 80,
35
+ "stft_normal_8k/win_fn": "hamming",
36
+ "logmel_8k/chunk_size": 30,
37
+ "logmel_8k/hop_length": 80,
38
+ "logmel_8k/n_fft": 512,
39
+ "logmel_8k/n_mel": 80,
40
+ "logmel_8k/feature_first": 0,
41
+ "logmel_8k/no_padding": 1
42
+ }
43
+ }
44
+ }
45
+ ],
46
+ "output_aligner": "phi4-audio-aligner"
47
+ }
48
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c1b9f641d4f8b7247b8d5007dd3b6a9f6a87cb5123134fe0d326f14d10c0585
3
+ size 15524479
tokenizer_config.json ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "199999": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "200010": {
13
+ "content": "<|endoftext10|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "200011": {
21
+ "content": "<|endoftext11|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "200018": {
29
+ "content": "<|endofprompt|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "200019": {
37
+ "content": "<|assistant|>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": true,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "200020": {
45
+ "content": "<|end|>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": true,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "200021": {
53
+ "content": "<|user|>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": true,
57
+ "single_word": false,
58
+ "special": true
59
+ },
60
+ "200022": {
61
+ "content": "<|system|>",
62
+ "lstrip": false,
63
+ "normalized": false,
64
+ "rstrip": true,
65
+ "single_word": false,
66
+ "special": true
67
+ },
68
+ "200023": {
69
+ "content": "<|tool|>",
70
+ "lstrip": false,
71
+ "normalized": false,
72
+ "rstrip": true,
73
+ "single_word": false,
74
+ "special": false
75
+ },
76
+ "200024": {
77
+ "content": "<|/tool|>",
78
+ "lstrip": false,
79
+ "normalized": false,
80
+ "rstrip": true,
81
+ "single_word": false,
82
+ "special": false
83
+ },
84
+ "200025": {
85
+ "content": "<|tool_call|>",
86
+ "lstrip": false,
87
+ "normalized": false,
88
+ "rstrip": true,
89
+ "single_word": false,
90
+ "special": false
91
+ },
92
+ "200026": {
93
+ "content": "<|/tool_call|>",
94
+ "lstrip": false,
95
+ "normalized": false,
96
+ "rstrip": true,
97
+ "single_word": false,
98
+ "special": false
99
+ },
100
+ "200027": {
101
+ "content": "<|tool_response|>",
102
+ "lstrip": false,
103
+ "normalized": false,
104
+ "rstrip": true,
105
+ "single_word": false,
106
+ "special": false
107
+ },
108
+ "200028": {
109
+ "content": "<|tag|>",
110
+ "lstrip": false,
111
+ "normalized": false,
112
+ "rstrip": true,
113
+ "single_word": false,
114
+ "special": true
115
+ }
116
+ },
117
+ "bos_token": "<|endoftext|>",
118
+ "chat_template": "{% for message in messages %}{% if message['role'] == 'system' and 'tools' in message and message['tools'] is not none %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|tool|>' + message['tools'] + '<|/tool|>' + '<|end|>' }}{% else %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|end|>' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>' }}{% else %}{{ eos_token }}{% endif %}",
119
+ "clean_up_tokenization_spaces": false,
120
+ "eos_token": "<|endoftext|>",
121
+ "extra_special_tokens": {},
122
+ "model_max_length": 131072,
123
+ "pad_token": "<|endoftext|>",
124
+ "tokenizer_class": "GPT2Tokenizer",
125
+ "unk_token": "<|endoftext|>"
126
+ }
vision_processor.json ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "processor": {
3
+ "name": "phi_4_vision_processor",
4
+ "transforms": [
5
+ {
6
+ "operation": {
7
+ "name": "decode_image",
8
+ "type": "DecodeImage",
9
+ "attrs": {
10
+ "color_space": "RGB"
11
+ }
12
+ }
13
+ },
14
+ {
15
+ "operation": {
16
+ "name": "phi4_vision_dynamic_preprocess",
17
+ "type": "Phi4VisionDynamicPreprocess",
18
+ "attrs": {
19
+ "dynamic_hd": 36,
20
+ "dyhd_base_resolution": 448
21
+ }
22
+ }
23
+ },
24
+ {
25
+ "operation": {
26
+ "name": "rescale",
27
+ "type": "Rescale",
28
+ "inputs": [
29
+ ":0"
30
+ ]
31
+ }
32
+ },
33
+ {
34
+ "operation": {
35
+ "name": "normalize",
36
+ "type": "Normalize",
37
+ "attrs": {
38
+ "mean": [
39
+ 0.5,
40
+ 0.5,
41
+ 0.5
42
+ ],
43
+ "std": [
44
+ 0.5,
45
+ 0.5,
46
+ 0.5
47
+ ]
48
+ }
49
+ }
50
+ },
51
+ {
52
+ "operation": {
53
+ "name": "phi4_vision_processor",
54
+ "type": "Phi4VisionProcessor",
55
+ "inputs": [
56
+ ":0",
57
+ "phi4_vision_dynamic_preprocess:1"
58
+ ],
59
+ "attrs": {
60
+ "dyhd_base_resolution": 448,
61
+ "interpolation": "CUBIC"
62
+ }
63
+ }
64
+ }
65
+ ],
66
+ "output_aligner": "phi4-vision-aligner"
67
+ }
68
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff