Modifying "kv_cache_dtype" now conforms to Q4/Q4f16. The original model's dtype is now "float16".
Browse filesFixed a bug in Q4 that caused issues with the dialogue.
OrtRun(). ERROR_CODE: 2, ERROR_MESSAGE: Unexpected input data type. Actual: (tensor(float)) , expected: (tensor(float16))
- config.json +86 -88
config.json
CHANGED
|
@@ -1,88 +1,86 @@
|
|
| 1 |
-
{
|
| 2 |
-
"_sliding_window_pattern": 6,
|
| 3 |
-
"architectures": [
|
| 4 |
-
"Gemma3ForCausalLM"
|
| 5 |
-
],
|
| 6 |
-
"attention_bias": false,
|
| 7 |
-
"attention_dropout": 0.0,
|
| 8 |
-
"attn_logit_softcapping": null,
|
| 9 |
-
"bos_token_id": 2,
|
| 10 |
-
"dtype": "float16",
|
| 11 |
-
"eos_token_id": 1,
|
| 12 |
-
"final_logit_softcapping": null,
|
| 13 |
-
"head_dim": 256,
|
| 14 |
-
"hidden_activation": "gelu_pytorch_tanh",
|
| 15 |
-
"hidden_size": 2560,
|
| 16 |
-
"initializer_range": 0.02,
|
| 17 |
-
"intermediate_size": 10240,
|
| 18 |
-
"layer_types": [
|
| 19 |
-
"sliding_attention",
|
| 20 |
-
"sliding_attention",
|
| 21 |
-
"sliding_attention",
|
| 22 |
-
"sliding_attention",
|
| 23 |
-
"sliding_attention",
|
| 24 |
-
"full_attention",
|
| 25 |
-
"sliding_attention",
|
| 26 |
-
"sliding_attention",
|
| 27 |
-
"sliding_attention",
|
| 28 |
-
"sliding_attention",
|
| 29 |
-
"sliding_attention",
|
| 30 |
-
"full_attention",
|
| 31 |
-
"sliding_attention",
|
| 32 |
-
"sliding_attention",
|
| 33 |
-
"sliding_attention",
|
| 34 |
-
"sliding_attention",
|
| 35 |
-
"sliding_attention",
|
| 36 |
-
"full_attention",
|
| 37 |
-
"sliding_attention",
|
| 38 |
-
"sliding_attention",
|
| 39 |
-
"sliding_attention",
|
| 40 |
-
"sliding_attention",
|
| 41 |
-
"sliding_attention",
|
| 42 |
-
"full_attention",
|
| 43 |
-
"sliding_attention",
|
| 44 |
-
"sliding_attention",
|
| 45 |
-
"sliding_attention",
|
| 46 |
-
"sliding_attention",
|
| 47 |
-
"sliding_attention",
|
| 48 |
-
"full_attention",
|
| 49 |
-
"sliding_attention",
|
| 50 |
-
"sliding_attention",
|
| 51 |
-
"sliding_attention",
|
| 52 |
-
"sliding_attention"
|
| 53 |
-
],
|
| 54 |
-
"max_position_embeddings": 131072,
|
| 55 |
-
"model_type": "gemma3_text",
|
| 56 |
-
"num_attention_heads": 8,
|
| 57 |
-
"num_hidden_layers": 34,
|
| 58 |
-
"num_key_value_heads": 4,
|
| 59 |
-
"pad_token_id": 0,
|
| 60 |
-
"query_pre_attn_scalar": 256,
|
| 61 |
-
"rms_norm_eps": 1e-06,
|
| 62 |
-
"rope_local_base_freq": 10000,
|
| 63 |
-
"rope_parameters": {
|
| 64 |
-
"full_attention": {
|
| 65 |
-
"factor": 8.0,
|
| 66 |
-
"rope_type": "linear"
|
| 67 |
-
},
|
| 68 |
-
"sliding_attention": {
|
| 69 |
-
"rope_type": "default"
|
| 70 |
-
}
|
| 71 |
-
},
|
| 72 |
-
"rope_scaling": null,
|
| 73 |
-
"rope_theta": 1000000,
|
| 74 |
-
"sliding_window": 1024,
|
| 75 |
-
"transformers_version": "4.57.3",
|
| 76 |
-
"use_bidirectional_attention": false,
|
| 77 |
-
"use_cache": true,
|
| 78 |
-
"vocab_size": 262208,
|
| 79 |
-
"transformers.js_config": {
|
| 80 |
-
"kv_cache_dtype":
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
}
|
| 88 |
-
}
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_sliding_window_pattern": 6,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Gemma3ForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"attn_logit_softcapping": null,
|
| 9 |
+
"bos_token_id": 2,
|
| 10 |
+
"dtype": "float16",
|
| 11 |
+
"eos_token_id": 1,
|
| 12 |
+
"final_logit_softcapping": null,
|
| 13 |
+
"head_dim": 256,
|
| 14 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 15 |
+
"hidden_size": 2560,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 10240,
|
| 18 |
+
"layer_types": [
|
| 19 |
+
"sliding_attention",
|
| 20 |
+
"sliding_attention",
|
| 21 |
+
"sliding_attention",
|
| 22 |
+
"sliding_attention",
|
| 23 |
+
"sliding_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"sliding_attention",
|
| 26 |
+
"sliding_attention",
|
| 27 |
+
"sliding_attention",
|
| 28 |
+
"sliding_attention",
|
| 29 |
+
"sliding_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"sliding_attention",
|
| 32 |
+
"sliding_attention",
|
| 33 |
+
"sliding_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"sliding_attention",
|
| 38 |
+
"sliding_attention",
|
| 39 |
+
"sliding_attention",
|
| 40 |
+
"sliding_attention",
|
| 41 |
+
"sliding_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"sliding_attention",
|
| 44 |
+
"sliding_attention",
|
| 45 |
+
"sliding_attention",
|
| 46 |
+
"sliding_attention",
|
| 47 |
+
"sliding_attention",
|
| 48 |
+
"full_attention",
|
| 49 |
+
"sliding_attention",
|
| 50 |
+
"sliding_attention",
|
| 51 |
+
"sliding_attention",
|
| 52 |
+
"sliding_attention"
|
| 53 |
+
],
|
| 54 |
+
"max_position_embeddings": 131072,
|
| 55 |
+
"model_type": "gemma3_text",
|
| 56 |
+
"num_attention_heads": 8,
|
| 57 |
+
"num_hidden_layers": 34,
|
| 58 |
+
"num_key_value_heads": 4,
|
| 59 |
+
"pad_token_id": 0,
|
| 60 |
+
"query_pre_attn_scalar": 256,
|
| 61 |
+
"rms_norm_eps": 1e-06,
|
| 62 |
+
"rope_local_base_freq": 10000,
|
| 63 |
+
"rope_parameters": {
|
| 64 |
+
"full_attention": {
|
| 65 |
+
"factor": 8.0,
|
| 66 |
+
"rope_type": "linear"
|
| 67 |
+
},
|
| 68 |
+
"sliding_attention": {
|
| 69 |
+
"rope_type": "default"
|
| 70 |
+
}
|
| 71 |
+
},
|
| 72 |
+
"rope_scaling": null,
|
| 73 |
+
"rope_theta": 1000000,
|
| 74 |
+
"sliding_window": 1024,
|
| 75 |
+
"transformers_version": "4.57.3",
|
| 76 |
+
"use_bidirectional_attention": false,
|
| 77 |
+
"use_cache": true,
|
| 78 |
+
"vocab_size": 262208,
|
| 79 |
+
"transformers.js_config": {
|
| 80 |
+
"kv_cache_dtype": "float16",
|
| 81 |
+
"use_external_data_format": {
|
| 82 |
+
"model_q4.onnx": 3,
|
| 83 |
+
"model_q4f16.onnx": 3
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
}
|
|
|
|
|
|