Instructions to use pytorch/gemma-3-27b-it-INT4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pytorch/gemma-3-27b-it-INT4 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("pytorch/gemma-3-27b-it-INT4", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload Gemma3ForConditionalGeneration
Browse files- config.json +17 -20
- generation_config.json +1 -1
- model.safetensors +3 -0
config.json
CHANGED
|
@@ -23,20 +23,7 @@
|
|
| 23 |
"group_size": 128,
|
| 24 |
"int4_choose_qparams_algorithm": "hqq",
|
| 25 |
"int4_packing_format": "tile_packed_to_4d",
|
| 26 |
-
"
|
| 27 |
-
"_data": {
|
| 28 |
-
"inner_k_tiles": 8
|
| 29 |
-
},
|
| 30 |
-
"_type": "TensorCoreTiledLayout",
|
| 31 |
-
"_version": 1
|
| 32 |
-
},
|
| 33 |
-
"preserve_zero": null,
|
| 34 |
-
"set_inductor_config": true,
|
| 35 |
-
"use_hqq": false,
|
| 36 |
-
"zero_point_domain": {
|
| 37 |
-
"_data": "NONE",
|
| 38 |
-
"_type": "ZeroPointDomain"
|
| 39 |
-
}
|
| 40 |
},
|
| 41 |
"_type": "Int4WeightOnlyConfig",
|
| 42 |
"_version": 2
|
|
@@ -50,7 +37,9 @@
|
|
| 50 |
"attention_bias": false,
|
| 51 |
"attention_dropout": 0.0,
|
| 52 |
"attn_logit_softcapping": null,
|
|
|
|
| 53 |
"dtype": "bfloat16",
|
|
|
|
| 54 |
"final_logit_softcapping": null,
|
| 55 |
"head_dim": 128,
|
| 56 |
"hidden_activation": "gelu_pytorch_tanh",
|
|
@@ -126,20 +115,28 @@
|
|
| 126 |
"num_attention_heads": 32,
|
| 127 |
"num_hidden_layers": 62,
|
| 128 |
"num_key_value_heads": 16,
|
|
|
|
| 129 |
"query_pre_attn_scalar": 168,
|
| 130 |
"rms_norm_eps": 1e-06,
|
| 131 |
-
"
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
},
|
| 136 |
-
"rope_theta": 1000000.0,
|
| 137 |
"sliding_window": 1024,
|
|
|
|
| 138 |
"use_bidirectional_attention": false,
|
| 139 |
"use_cache": true,
|
| 140 |
"vocab_size": 262208
|
| 141 |
},
|
| 142 |
-
"
|
|
|
|
| 143 |
"vision_config": {
|
| 144 |
"attention_dropout": 0.0,
|
| 145 |
"dtype": "bfloat16",
|
|
|
|
| 23 |
"group_size": 128,
|
| 24 |
"int4_choose_qparams_algorithm": "hqq",
|
| 25 |
"int4_packing_format": "tile_packed_to_4d",
|
| 26 |
+
"set_inductor_config": true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
},
|
| 28 |
"_type": "Int4WeightOnlyConfig",
|
| 29 |
"_version": 2
|
|
|
|
| 37 |
"attention_bias": false,
|
| 38 |
"attention_dropout": 0.0,
|
| 39 |
"attn_logit_softcapping": null,
|
| 40 |
+
"bos_token_id": 2,
|
| 41 |
"dtype": "bfloat16",
|
| 42 |
+
"eos_token_id": 1,
|
| 43 |
"final_logit_softcapping": null,
|
| 44 |
"head_dim": 128,
|
| 45 |
"hidden_activation": "gelu_pytorch_tanh",
|
|
|
|
| 115 |
"num_attention_heads": 32,
|
| 116 |
"num_hidden_layers": 62,
|
| 117 |
"num_key_value_heads": 16,
|
| 118 |
+
"pad_token_id": 0,
|
| 119 |
"query_pre_attn_scalar": 168,
|
| 120 |
"rms_norm_eps": 1e-06,
|
| 121 |
+
"rope_parameters": {
|
| 122 |
+
"full_attention": {
|
| 123 |
+
"factor": 8.0,
|
| 124 |
+
"rope_theta": 1000000.0,
|
| 125 |
+
"rope_type": "linear"
|
| 126 |
+
},
|
| 127 |
+
"sliding_attention": {
|
| 128 |
+
"rope_theta": 10000.0,
|
| 129 |
+
"rope_type": "default"
|
| 130 |
+
}
|
| 131 |
},
|
|
|
|
| 132 |
"sliding_window": 1024,
|
| 133 |
+
"tie_word_embeddings": true,
|
| 134 |
"use_bidirectional_attention": false,
|
| 135 |
"use_cache": true,
|
| 136 |
"vocab_size": 262208
|
| 137 |
},
|
| 138 |
+
"tie_word_embeddings": true,
|
| 139 |
+
"transformers_version": "5.3.0.dev0",
|
| 140 |
"vision_config": {
|
| 141 |
"attention_dropout": 0.0,
|
| 142 |
"dtype": "bfloat16",
|
generation_config.json
CHANGED
|
@@ -9,5 +9,5 @@
|
|
| 9 |
"pad_token_id": 0,
|
| 10 |
"top_k": 64,
|
| 11 |
"top_p": 0.95,
|
| 12 |
-
"transformers_version": "
|
| 13 |
}
|
|
|
|
| 9 |
"pad_token_id": 0,
|
| 10 |
"top_k": 64,
|
| 11 |
"top_p": 0.95,
|
| 12 |
+
"transformers_version": "5.3.0.dev0"
|
| 13 |
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f3eaeb78a03ce2f09090ef1114f65e1113ff57b5b7030ecb4aff3cfd424db21f
|
| 3 |
+
size 18270308104
|