ErazerControl commited on
Commit
9f0432e
·
verified ·
1 Parent(s): 650011c

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -50,3 +50,4 @@ internlm2-chat-1_8b/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -te
50
  internlm2-chat-7b/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
51
  internlm2_5-7b-chat/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
52
  Ministral-8B-Instruct-2410/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
 
 
50
  internlm2-chat-7b/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
51
  internlm2_5-7b-chat/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
52
  Ministral-8B-Instruct-2410/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
53
+ Mistral-Nemo-Instruct-2407/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
Mistral-Nemo-Instruct-2407/README.md ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Mistral-Nemo-Instruct-2407
2
+
3
+ ## GenAI WebGPU Model
4
+
5
+ Generated using `onnxruntime_genai.models.builder`
6
+
7
+ - **onnxruntime-genai commit**: `41c4ce18fec1240c2f848725e31fbe8854010188`
8
+ - **transformers version**: `4.57.0`
9
+ - **Precision**: int4
10
+ - **Execution Provider**: webgpu
11
+
12
+ ```
13
+ python -m onnxruntime_genai.models.builder -p int4 -e webgpu -m mistralai/Mistral-Nemo-Instruct-2407 -o E:\ai-models\Mistral-Nemo-Instruct-2407\onnx-webgpu\ --extra_options int4_algo_config=rtn_last int4_is_symmetric=true prune_lm_head=true enable_webgpu_graph=true
14
+ ```
15
+
16
+ ## GGUF Model
17
+
18
+ Downloaded from: [MaziyarPanahi/Mistral-Nemo-Instruct-2407-GGUF](https://huggingface.co/MaziyarPanahi/Mistral-Nemo-Instruct-2407-GGUF)
Mistral-Nemo-Instruct-2407/gguf/Mistral-Nemo-Instruct-2407.Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5964f3e6d9c17b99e3d2174022048f3ec58b12ee8fefa987888e0562d070d52e
3
+ size 7477204928
Mistral-Nemo-Instruct-2407/onnx-webgpu/chat_template.jinja ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if messages[0]["role"] == "system" %}
2
+ {%- set system_message = messages[0]["content"] %}
3
+ {%- set loop_messages = messages[1:] %}
4
+ {%- else %}
5
+ {%- set loop_messages = messages %}
6
+ {%- endif %}
7
+ {%- if not tools is defined %}
8
+ {%- set tools = none %}
9
+ {%- endif %}
10
+ {%- set user_messages = loop_messages | selectattr("role", "equalto", "user") | list %}
11
+
12
+ {#- This block checks for alternating user/assistant messages, skipping tool calling messages #}
13
+ {%- set ns = namespace() %}
14
+ {%- set ns.index = 0 %}
15
+ {%- for message in loop_messages %}
16
+ {%- if not (message.role == "tool" or message.role == "tool_results" or (message.tool_calls is defined and message.tool_calls is not none)) %}
17
+ {%- if (message["role"] == "user") != (ns.index % 2 == 0) %}
18
+ {{- raise_exception("After the optional system message, conversation roles must alternate user/assistant/user/assistant/...") }}
19
+ {%- endif %}
20
+ {%- set ns.index = ns.index + 1 %}
21
+ {%- endif %}
22
+ {%- endfor %}
23
+
24
+ {{- bos_token }}
25
+ {%- for message in loop_messages %}
26
+ {%- if message["role"] == "user" %}
27
+ {%- if tools is not none and (message == user_messages[-1]) %}
28
+ {{- "[AVAILABLE_TOOLS][" }}
29
+ {%- for tool in tools %}
30
+ {%- set tool = tool.function %}
31
+ {{- '{"type": "function", "function": {' }}
32
+ {%- for key, val in tool.items() if key != "return" %}
33
+ {%- if val is string %}
34
+ {{- '"' + key + '": "' + val + '"' }}
35
+ {%- else %}
36
+ {{- '"' + key + '": ' + val|tojson }}
37
+ {%- endif %}
38
+ {%- if not loop.last %}
39
+ {{- ", " }}
40
+ {%- endif %}
41
+ {%- endfor %}
42
+ {{- "}}" }}
43
+ {%- if not loop.last %}
44
+ {{- ", " }}
45
+ {%- else %}
46
+ {{- "]" }}
47
+ {%- endif %}
48
+ {%- endfor %}
49
+ {{- "[/AVAILABLE_TOOLS]" }}
50
+ {%- endif %}
51
+ {%- if loop.last and system_message is defined %}
52
+ {{- "[INST]" + system_message + "\n\n" + message["content"] + "[/INST]" }}
53
+ {%- else %}
54
+ {{- "[INST]" + message["content"] + "[/INST]" }}
55
+ {%- endif %}
56
+ {%- elif (message.tool_calls is defined and message.tool_calls is not none) %}
57
+ {{- "[TOOL_CALLS][" }}
58
+ {%- for tool_call in message.tool_calls %}
59
+ {%- set out = tool_call.function|tojson %}
60
+ {{- out[:-1] }}
61
+ {%- if not tool_call.id is defined or tool_call.id|length != 9 %}
62
+ {{- raise_exception("Tool call IDs should be alphanumeric strings with length 9!") }}
63
+ {%- endif %}
64
+ {{- ', "id": "' + tool_call.id + '"}' }}
65
+ {%- if not loop.last %}
66
+ {{- ", " }}
67
+ {%- else %}
68
+ {{- "]" + eos_token }}
69
+ {%- endif %}
70
+ {%- endfor %}
71
+ {%- elif message["role"] == "assistant" %}
72
+ {{- message["content"] + eos_token}}
73
+ {%- elif message["role"] == "tool_results" or message["role"] == "tool" %}
74
+ {%- if message.content is defined and message.content.content is defined %}
75
+ {%- set content = message.content.content %}
76
+ {%- else %}
77
+ {%- set content = message.content %}
78
+ {%- endif %}
79
+ {{- '[TOOL_RESULTS]{"content": ' + content|string + ", " }}
80
+ {%- if not message.tool_call_id is defined or message.tool_call_id|length != 9 %}
81
+ {{- raise_exception("Tool call IDs should be alphanumeric strings with length 9!") }}
82
+ {%- endif %}
83
+ {{- '"call_id": "' + message.tool_call_id + '"}[/TOOL_RESULTS]' }}
84
+ {%- else %}
85
+ {{- raise_exception("Only user and assistant roles are supported, with the exception of an initial optional system message!") }}
86
+ {%- endif %}
87
+ {%- endfor %}
Mistral-Nemo-Instruct-2407/onnx-webgpu/genai_config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": {
3
+ "bos_token_id": 1,
4
+ "context_length": 131072,
5
+ "decoder": {
6
+ "session_options": {
7
+ "log_id": "onnxruntime-genai",
8
+ "provider_options": [
9
+ {
10
+ "webgpu": {
11
+ "enableGraphCapture": "0",
12
+ "validationMode": "disabled"
13
+ }
14
+ }
15
+ ]
16
+ },
17
+ "filename": "model.onnx",
18
+ "head_size": 128,
19
+ "hidden_size": 5120,
20
+ "inputs": {
21
+ "input_ids": "input_ids",
22
+ "attention_mask": "attention_mask",
23
+ "past_key_names": "past_key_values.%d.key",
24
+ "past_value_names": "past_key_values.%d.value"
25
+ },
26
+ "outputs": {
27
+ "logits": "logits",
28
+ "present_key_names": "present.%d.key",
29
+ "present_value_names": "present.%d.value"
30
+ },
31
+ "num_attention_heads": 32,
32
+ "num_hidden_layers": 40,
33
+ "num_key_value_heads": 8
34
+ },
35
+ "eos_token_id": 2,
36
+ "pad_token_id": 2,
37
+ "type": "mistral",
38
+ "vocab_size": 131072
39
+ },
40
+ "search": {
41
+ "diversity_penalty": 0,
42
+ "do_sample": false,
43
+ "early_stopping": true,
44
+ "length_penalty": 1,
45
+ "max_length": 131072,
46
+ "min_length": 0,
47
+ "no_repeat_ngram_size": 0,
48
+ "num_beams": 1,
49
+ "num_return_sequences": 1,
50
+ "past_present_share_buffer": true,
51
+ "repetition_penalty": 1,
52
+ "temperature": 1,
53
+ "top_k": 50,
54
+ "top_p": 1
55
+ }
56
+ }
Mistral-Nemo-Instruct-2407/onnx-webgpu/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a4f1a60e2b7687fa48caf1d9baa9f67393234c8346e5392a7fd3056c2ce825d
3
+ size 299352
Mistral-Nemo-Instruct-2407/onnx-webgpu/model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95ef83a849ec0136f10bae0e17cfa0f3e9c0bdbbb8c750c4c16f686c7d3da028
3
+ size 8223784960
Mistral-Nemo-Instruct-2407/onnx-webgpu/special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "unk_token": {
17
+ "content": "<unk>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
Mistral-Nemo-Instruct-2407/onnx-webgpu/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0240ce510f08e6c2041724e9043e33be9d251d1e4a4d94eb68cd47b954b61d2
3
+ size 17078292
Mistral-Nemo-Instruct-2407/onnx-webgpu/tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff