BenjaminB HF Staff commited on
Commit
87719b7
·
verified ·
1 Parent(s): 42534d7

Upload Gemma4ForConditionalGeneration

Browse files
Files changed (3) hide show
  1. config.json +156 -0
  2. generation_config.json +10 -0
  3. model.safetensors +3 -0
config.json ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Gemma4ForConditionalGeneration"
4
+ ],
5
+ "audio_config": {
6
+ "_name_or_path": "",
7
+ "architectures": null,
8
+ "attention_chunk_size": 12,
9
+ "attention_context_left": 13,
10
+ "attention_context_right": 0,
11
+ "attention_invalid_logits_value": -1000000000.0,
12
+ "attention_logit_cap": 50.0,
13
+ "chunk_size_feed_forward": 0,
14
+ "conv_kernel_size": 5,
15
+ "dtype": "bfloat16",
16
+ "gradient_clipping": 10000000000.0,
17
+ "hidden_act": "silu",
18
+ "hidden_size": 64,
19
+ "id2label": {
20
+ "0": "LABEL_0",
21
+ "1": "LABEL_1"
22
+ },
23
+ "initializer_range": 0.02,
24
+ "is_encoder_decoder": false,
25
+ "label2id": {
26
+ "LABEL_0": 0,
27
+ "LABEL_1": 1
28
+ },
29
+ "model_type": "gemma4_audio",
30
+ "num_attention_heads": 2,
31
+ "num_hidden_layers": 2,
32
+ "output_attentions": false,
33
+ "output_hidden_states": false,
34
+ "output_proj_dims": 32,
35
+ "problem_type": null,
36
+ "residual_weight": 0.5,
37
+ "return_dict": true,
38
+ "rms_norm_eps": 1e-06,
39
+ "subsampling_conv_channels": [
40
+ 128,
41
+ 32
42
+ ],
43
+ "use_clipped_linears": true
44
+ },
45
+ "audio_token_id": 258881,
46
+ "boa_token_id": 256000,
47
+ "boi_token_id": 255999,
48
+ "dtype": "bfloat16",
49
+ "eoa_token_id": 258883,
50
+ "eoa_token_index": 258883,
51
+ "eoi_token_id": 258882,
52
+ "image_token_id": 258880,
53
+ "initializer_range": 0.02,
54
+ "model_type": "gemma4",
55
+ "text_config": {
56
+ "attention_bias": false,
57
+ "attention_dropout": 0.0,
58
+ "attention_k_eq_v": false,
59
+ "bos_token_id": 2,
60
+ "dtype": "bfloat16",
61
+ "enable_moe_block": false,
62
+ "eos_token_id": 1,
63
+ "expert_intermediate_size": null,
64
+ "final_logit_softcapping": 30.0,
65
+ "global_head_dim": 64,
66
+ "head_dim": 32,
67
+ "hidden_activation": "gelu_pytorch_tanh",
68
+ "hidden_size": 8,
69
+ "hidden_size_per_layer_input": 2,
70
+ "initializer_range": 0.02,
71
+ "intermediate_size": 64,
72
+ "layer_types": [
73
+ "sliding_attention",
74
+ "full_attention",
75
+ "sliding_attention",
76
+ "full_attention"
77
+ ],
78
+ "max_position_embeddings": 131072,
79
+ "model_type": "gemma4_text",
80
+ "moe_intermediate_size": null,
81
+ "num_attention_heads": 8,
82
+ "num_experts": null,
83
+ "num_global_key_value_heads": null,
84
+ "num_hidden_layers": 4,
85
+ "num_key_value_heads": 4,
86
+ "num_kv_shared_layers": 2,
87
+ "pad_token_id": 0,
88
+ "rms_norm_eps": 1e-06,
89
+ "rope_parameters": {
90
+ "full_attention": {
91
+ "partial_rotary_factor": 0.25,
92
+ "rope_theta": 1000000.0,
93
+ "rope_type": "proportional"
94
+ },
95
+ "sliding_attention": {
96
+ "rope_theta": 10000.0,
97
+ "rope_type": "default"
98
+ }
99
+ },
100
+ "sliding_window": 512,
101
+ "tie_word_embeddings": true,
102
+ "top_k_experts": null,
103
+ "use_bidirectional_attention": null,
104
+ "use_cache": true,
105
+ "use_double_wide_mlp": false,
106
+ "vocab_size": 262144,
107
+ "vocab_size_per_layer_input": 262144
108
+ },
109
+ "tie_word_embeddings": true,
110
+ "transformers_version": "5.7.0.dev0",
111
+ "video_token_id": 258884,
112
+ "vision_config": {
113
+ "_name_or_path": "",
114
+ "architectures": null,
115
+ "attention_bias": false,
116
+ "attention_dropout": 0.0,
117
+ "chunk_size_feed_forward": 0,
118
+ "default_output_length": 280,
119
+ "dtype": "bfloat16",
120
+ "global_head_dim": 32,
121
+ "head_dim": 32,
122
+ "hidden_activation": "gelu_pytorch_tanh",
123
+ "hidden_size": 8,
124
+ "id2label": {
125
+ "0": "LABEL_0",
126
+ "1": "LABEL_1"
127
+ },
128
+ "initializer_range": 0.02,
129
+ "intermediate_size": 64,
130
+ "is_encoder_decoder": false,
131
+ "label2id": {
132
+ "LABEL_0": 0,
133
+ "LABEL_1": 1
134
+ },
135
+ "max_position_embeddings": 131072,
136
+ "model_type": "gemma4_vision",
137
+ "num_attention_heads": 4,
138
+ "num_hidden_layers": 2,
139
+ "num_key_value_heads": 4,
140
+ "output_attentions": false,
141
+ "output_hidden_states": false,
142
+ "patch_size": 16,
143
+ "pooling_kernel_size": 3,
144
+ "position_embedding_size": 10240,
145
+ "problem_type": null,
146
+ "return_dict": true,
147
+ "rms_norm_eps": 1e-06,
148
+ "rope_parameters": {
149
+ "rope_theta": 100.0,
150
+ "rope_type": "default"
151
+ },
152
+ "standardize": false,
153
+ "use_clipped_linears": true
154
+ },
155
+ "vision_soft_tokens_per_image": 280
156
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 2,
4
+ "eos_token_id": 1,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "pad_token_id": 0,
8
+ "transformers_version": "5.7.0.dev0",
9
+ "use_cache": true
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:032cdee368a3cf233b3ec293cff59bdbcf7d39a836d66b34f44337151da85fe0
3
+ size 9470740