Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- gemma-3-1b-it/README.md +18 -0
- gemma-3-1b-it/gguf/gemma-3-1b-it.Q4_K_M.gguf +3 -0
- gemma-3-1b-it/onnx-webgpu/added_tokens.json +3 -0
- gemma-3-1b-it/onnx-webgpu/chat_template.jinja +47 -0
- gemma-3-1b-it/onnx-webgpu/genai_config.json +59 -0
- gemma-3-1b-it/onnx-webgpu/model.onnx +3 -0
- gemma-3-1b-it/onnx-webgpu/model.onnx.data +3 -0
- gemma-3-1b-it/onnx-webgpu/special_tokens_map.json +33 -0
- gemma-3-1b-it/onnx-webgpu/tokenizer.json +3 -0
- gemma-3-1b-it/onnx-webgpu/tokenizer.model +3 -0
- gemma-3-1b-it/onnx-webgpu/tokenizer_config.json +0 -0
.gitattributes
CHANGED
|
@@ -43,3 +43,4 @@ DeepSeek-R1-Distill-Qwen-7B/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge
|
|
| 43 |
gemma-2-2b-it/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 44 |
gemma-2-9b-it/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 45 |
gemma-2b-it/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 43 |
gemma-2-2b-it/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 44 |
gemma-2-9b-it/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 45 |
gemma-2b-it/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
gemma-3-1b-it/onnx-webgpu/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
gemma-3-1b-it/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# gemma-3-1b-it
|
| 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 google/gemma-3-1b-it -o E:\ai-models\gemma-3-1b-it\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/gemma-3-1b-it-GGUF](https://huggingface.co/MaziyarPanahi/gemma-3-1b-it-GGUF)
|
gemma-3-1b-it/gguf/gemma-3-1b-it.Q4_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e4304281685198621755dac1851c040ff86b071e997cc214bfb9e8aca7f8dec2
|
| 3 |
+
size 806058272
|
gemma-3-1b-it/onnx-webgpu/added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<image_soft_token>": 262144
|
| 3 |
+
}
|
gemma-3-1b-it/onnx-webgpu/chat_template.jinja
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{{ bos_token }}
|
| 2 |
+
{%- if messages[0]['role'] == 'system' -%}
|
| 3 |
+
{%- if messages[0]['content'] is string -%}
|
| 4 |
+
{%- set first_user_prefix = messages[0]['content'] + '
|
| 5 |
+
|
| 6 |
+
' -%}
|
| 7 |
+
{%- else -%}
|
| 8 |
+
{%- set first_user_prefix = messages[0]['content'][0]['text'] + '
|
| 9 |
+
|
| 10 |
+
' -%}
|
| 11 |
+
{%- endif -%}
|
| 12 |
+
{%- set loop_messages = messages[1:] -%}
|
| 13 |
+
{%- else -%}
|
| 14 |
+
{%- set first_user_prefix = "" -%}
|
| 15 |
+
{%- set loop_messages = messages -%}
|
| 16 |
+
{%- endif -%}
|
| 17 |
+
{%- for message in loop_messages -%}
|
| 18 |
+
{%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}
|
| 19 |
+
{{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }}
|
| 20 |
+
{%- endif -%}
|
| 21 |
+
{%- if (message['role'] == 'assistant') -%}
|
| 22 |
+
{%- set role = "model" -%}
|
| 23 |
+
{%- else -%}
|
| 24 |
+
{%- set role = message['role'] -%}
|
| 25 |
+
{%- endif -%}
|
| 26 |
+
{{ '<start_of_turn>' + role + '
|
| 27 |
+
' + (first_user_prefix if loop.first else "") }}
|
| 28 |
+
{%- if message['content'] is string -%}
|
| 29 |
+
{{ message['content'] | trim }}
|
| 30 |
+
{%- elif message['content'] is iterable -%}
|
| 31 |
+
{%- for item in message['content'] -%}
|
| 32 |
+
{%- if item['type'] == 'image' -%}
|
| 33 |
+
{{ '<start_of_image>' }}
|
| 34 |
+
{%- elif item['type'] == 'text' -%}
|
| 35 |
+
{{ item['text'] | trim }}
|
| 36 |
+
{%- endif -%}
|
| 37 |
+
{%- endfor -%}
|
| 38 |
+
{%- else -%}
|
| 39 |
+
{{ raise_exception("Invalid content type") }}
|
| 40 |
+
{%- endif -%}
|
| 41 |
+
{{ '<end_of_turn>
|
| 42 |
+
' }}
|
| 43 |
+
{%- endfor -%}
|
| 44 |
+
{%- if add_generation_prompt -%}
|
| 45 |
+
{{'<start_of_turn>model
|
| 46 |
+
'}}
|
| 47 |
+
{%- endif -%}
|
gemma-3-1b-it/onnx-webgpu/genai_config.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": {
|
| 3 |
+
"bos_token_id": 2,
|
| 4 |
+
"context_length": 32768,
|
| 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": 256,
|
| 19 |
+
"hidden_size": 1152,
|
| 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": 4,
|
| 32 |
+
"num_hidden_layers": 26,
|
| 33 |
+
"num_key_value_heads": 1
|
| 34 |
+
},
|
| 35 |
+
"eos_token_id": [
|
| 36 |
+
1,
|
| 37 |
+
106
|
| 38 |
+
],
|
| 39 |
+
"pad_token_id": 0,
|
| 40 |
+
"type": "gemma3_text",
|
| 41 |
+
"vocab_size": 262144
|
| 42 |
+
},
|
| 43 |
+
"search": {
|
| 44 |
+
"diversity_penalty": 0,
|
| 45 |
+
"do_sample": true,
|
| 46 |
+
"early_stopping": true,
|
| 47 |
+
"length_penalty": 1,
|
| 48 |
+
"max_length": 32768,
|
| 49 |
+
"min_length": 0,
|
| 50 |
+
"no_repeat_ngram_size": 0,
|
| 51 |
+
"num_beams": 1,
|
| 52 |
+
"num_return_sequences": 1,
|
| 53 |
+
"past_present_share_buffer": true,
|
| 54 |
+
"repetition_penalty": 1,
|
| 55 |
+
"temperature": 1,
|
| 56 |
+
"top_k": 64,
|
| 57 |
+
"top_p": 0.95
|
| 58 |
+
}
|
| 59 |
+
}
|
gemma-3-1b-it/onnx-webgpu/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f5056c1750aef80b7e976ed58a815f7dfa16180196f5786441b8dbb1d9eed0d
|
| 3 |
+
size 411904
|
gemma-3-1b-it/onnx-webgpu/model.onnx.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:974032f0c9d99216eb93d0c224d2c205036b299ed6a42cd7c7dabc72cb2c4202
|
| 3 |
+
size 748748800
|
gemma-3-1b-it/onnx-webgpu/special_tokens_map.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"boi_token": "<start_of_image>",
|
| 3 |
+
"bos_token": {
|
| 4 |
+
"content": "<bos>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
"eoi_token": "<end_of_image>",
|
| 11 |
+
"eos_token": {
|
| 12 |
+
"content": "<eos>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false
|
| 17 |
+
},
|
| 18 |
+
"image_token": "<image_soft_token>",
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
gemma-3-1b-it/onnx-webgpu/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4667f2089529e8e7657cfb6d1c19910ae71ff5f28aa7ab2ff2763330affad795
|
| 3 |
+
size 33384568
|
gemma-3-1b-it/onnx-webgpu/tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79c
|
| 3 |
+
size 4689074
|
gemma-3-1b-it/onnx-webgpu/tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|