sanchit-gandhi HF staff commited on
Commit
3e36a27
1 Parent(s): 0b4a108

Upload MusicgenForConditionalGeneration

Browse files
Files changed (3) hide show
  1. config.json +299 -0
  2. generation_config.json +7 -0
  3. pytorch_model.bin +3 -0
config.json ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_commit_hash": null,
3
+ "architectures": [
4
+ "MusicgenForConditionalGeneration"
5
+ ],
6
+ "audio_encoder": {
7
+ "_name_or_path": "facebook/encodec_32khz",
8
+ "add_cross_attention": false,
9
+ "architectures": [
10
+ "EncodecModel"
11
+ ],
12
+ "audio_channels": 1,
13
+ "bad_words_ids": null,
14
+ "begin_suppress_tokens": null,
15
+ "bos_token_id": null,
16
+ "chunk_length_s": null,
17
+ "chunk_size_feed_forward": 0,
18
+ "codebook_dim": 128,
19
+ "codebook_size": 2048,
20
+ "compress": 2,
21
+ "cross_attention_hidden_size": null,
22
+ "decoder_start_token_id": null,
23
+ "dilation_growth_rate": 2,
24
+ "diversity_penalty": 0.0,
25
+ "do_sample": false,
26
+ "early_stopping": false,
27
+ "encoder_no_repeat_ngram_size": 0,
28
+ "eos_token_id": null,
29
+ "exponential_decay_length_penalty": null,
30
+ "finetuning_task": null,
31
+ "forced_bos_token_id": null,
32
+ "forced_eos_token_id": null,
33
+ "hidden_size": 128,
34
+ "id2label": {
35
+ "0": "LABEL_0",
36
+ "1": "LABEL_1"
37
+ },
38
+ "is_decoder": false,
39
+ "is_encoder_decoder": false,
40
+ "kernel_size": 7,
41
+ "label2id": {
42
+ "LABEL_0": 0,
43
+ "LABEL_1": 1
44
+ },
45
+ "last_kernel_size": 7,
46
+ "length_penalty": 1.0,
47
+ "max_length": 20,
48
+ "min_length": 0,
49
+ "model_type": "encodec",
50
+ "no_repeat_ngram_size": 0,
51
+ "norm_type": "weight_norm",
52
+ "normalize": false,
53
+ "num_beam_groups": 1,
54
+ "num_beams": 1,
55
+ "num_filters": 64,
56
+ "num_lstm_layers": 2,
57
+ "num_residual_layers": 1,
58
+ "num_return_sequences": 1,
59
+ "output_attentions": false,
60
+ "output_hidden_states": false,
61
+ "output_scores": false,
62
+ "overlap": null,
63
+ "pad_mode": "reflect",
64
+ "pad_token_id": null,
65
+ "prefix": null,
66
+ "problem_type": null,
67
+ "pruned_heads": {},
68
+ "remove_invalid_values": false,
69
+ "repetition_penalty": 1.0,
70
+ "residual_kernel_size": 3,
71
+ "return_dict": true,
72
+ "return_dict_in_generate": false,
73
+ "sampling_rate": 32000,
74
+ "sep_token_id": null,
75
+ "suppress_tokens": null,
76
+ "target_bandwidths": [
77
+ 2.2
78
+ ],
79
+ "task_specific_params": null,
80
+ "temperature": 1.0,
81
+ "tf_legacy_loss": false,
82
+ "tie_encoder_decoder": false,
83
+ "tie_word_embeddings": true,
84
+ "tokenizer_class": null,
85
+ "top_k": 50,
86
+ "top_p": 1.0,
87
+ "torch_dtype": "float32",
88
+ "torchscript": false,
89
+ "transformers_version": "4.31.0.dev0",
90
+ "trim_right_ratio": 1.0,
91
+ "typical_p": 1.0,
92
+ "upsampling_ratios": [
93
+ 8,
94
+ 5,
95
+ 4,
96
+ 4
97
+ ],
98
+ "use_bfloat16": false,
99
+ "use_causal_conv": false,
100
+ "use_conv_shortcut": false
101
+ },
102
+ "decoder": {
103
+ "_name_or_path": "",
104
+ "activation_dropout": 0.0,
105
+ "activation_function": "gelu",
106
+ "add_cross_attention": false,
107
+ "architectures": null,
108
+ "attention_dropout": 0.0,
109
+ "bad_words_ids": null,
110
+ "begin_suppress_tokens": null,
111
+ "bos_token_id": 2048,
112
+ "chunk_size_feed_forward": 0,
113
+ "classifier_dropout": 0.0,
114
+ "cross_attention_hidden_size": null,
115
+ "d_model": 1024,
116
+ "decoder_start_token_id": null,
117
+ "diversity_penalty": 0.0,
118
+ "do_sample": false,
119
+ "dropout": 0.1,
120
+ "early_stopping": false,
121
+ "encoder_no_repeat_ngram_size": 0,
122
+ "eos_token_id": null,
123
+ "exponential_decay_length_penalty": null,
124
+ "ffn_dim": 4096,
125
+ "finetuning_task": null,
126
+ "forced_bos_token_id": null,
127
+ "forced_eos_token_id": null,
128
+ "hidden_size": 1024,
129
+ "id2label": {
130
+ "0": "LABEL_0",
131
+ "1": "LABEL_1"
132
+ },
133
+ "initializer_factor": 0.02,
134
+ "is_decoder": false,
135
+ "is_encoder_decoder": false,
136
+ "label2id": {
137
+ "LABEL_0": 0,
138
+ "LABEL_1": 1
139
+ },
140
+ "layerdrop": 0.0,
141
+ "length_penalty": 1.0,
142
+ "max_length": 20,
143
+ "max_position_embeddings": 1024,
144
+ "min_length": 0,
145
+ "model_type": "musicgen_decoder",
146
+ "no_repeat_ngram_size": 0,
147
+ "num_attention_heads": 16,
148
+ "num_beam_groups": 1,
149
+ "num_beams": 1,
150
+ "num_codebooks": 4,
151
+ "num_hidden_layers": 24,
152
+ "num_return_sequences": 1,
153
+ "output_attentions": false,
154
+ "output_hidden_states": false,
155
+ "output_scores": false,
156
+ "pad_token_id": 2048,
157
+ "prefix": null,
158
+ "problem_type": null,
159
+ "pruned_heads": {},
160
+ "remove_invalid_values": false,
161
+ "repetition_penalty": 1.0,
162
+ "return_dict": true,
163
+ "return_dict_in_generate": false,
164
+ "scale_embedding": false,
165
+ "sep_token_id": null,
166
+ "suppress_tokens": null,
167
+ "task_specific_params": null,
168
+ "temperature": 1.0,
169
+ "tf_legacy_loss": false,
170
+ "tie_encoder_decoder": false,
171
+ "tie_word_embeddings": false,
172
+ "tokenizer_class": null,
173
+ "top_k": 50,
174
+ "top_p": 1.0,
175
+ "torch_dtype": null,
176
+ "torchscript": false,
177
+ "transformers_version": "4.31.0.dev0",
178
+ "typical_p": 1.0,
179
+ "use_bfloat16": false,
180
+ "use_cache": true,
181
+ "vocab_size": 2048
182
+ },
183
+ "is_encoder_decoder": true,
184
+ "model_type": "musicgen",
185
+ "text_encoder": {
186
+ "_name_or_path": "t5-base",
187
+ "add_cross_attention": false,
188
+ "architectures": [
189
+ "T5ForConditionalGeneration"
190
+ ],
191
+ "bad_words_ids": null,
192
+ "begin_suppress_tokens": null,
193
+ "bos_token_id": null,
194
+ "chunk_size_feed_forward": 0,
195
+ "cross_attention_hidden_size": null,
196
+ "d_ff": 3072,
197
+ "d_kv": 64,
198
+ "d_model": 768,
199
+ "decoder_start_token_id": 0,
200
+ "dense_act_fn": "relu",
201
+ "diversity_penalty": 0.0,
202
+ "do_sample": false,
203
+ "dropout_rate": 0.1,
204
+ "early_stopping": false,
205
+ "encoder_no_repeat_ngram_size": 0,
206
+ "eos_token_id": 1,
207
+ "exponential_decay_length_penalty": null,
208
+ "feed_forward_proj": "relu",
209
+ "finetuning_task": null,
210
+ "forced_bos_token_id": null,
211
+ "forced_eos_token_id": null,
212
+ "id2label": {
213
+ "0": "LABEL_0",
214
+ "1": "LABEL_1"
215
+ },
216
+ "initializer_factor": 1.0,
217
+ "is_decoder": false,
218
+ "is_encoder_decoder": true,
219
+ "is_gated_act": false,
220
+ "label2id": {
221
+ "LABEL_0": 0,
222
+ "LABEL_1": 1
223
+ },
224
+ "layer_norm_epsilon": 1e-06,
225
+ "length_penalty": 1.0,
226
+ "max_length": 20,
227
+ "min_length": 0,
228
+ "model_type": "t5",
229
+ "n_positions": 512,
230
+ "no_repeat_ngram_size": 0,
231
+ "num_beam_groups": 1,
232
+ "num_beams": 1,
233
+ "num_decoder_layers": 12,
234
+ "num_heads": 12,
235
+ "num_layers": 12,
236
+ "num_return_sequences": 1,
237
+ "output_attentions": false,
238
+ "output_hidden_states": false,
239
+ "output_past": true,
240
+ "output_scores": false,
241
+ "pad_token_id": 0,
242
+ "prefix": null,
243
+ "problem_type": null,
244
+ "pruned_heads": {},
245
+ "relative_attention_max_distance": 128,
246
+ "relative_attention_num_buckets": 32,
247
+ "remove_invalid_values": false,
248
+ "repetition_penalty": 1.0,
249
+ "return_dict": true,
250
+ "return_dict_in_generate": false,
251
+ "sep_token_id": null,
252
+ "suppress_tokens": null,
253
+ "task_specific_params": {
254
+ "summarization": {
255
+ "early_stopping": true,
256
+ "length_penalty": 2.0,
257
+ "max_length": 200,
258
+ "min_length": 30,
259
+ "no_repeat_ngram_size": 3,
260
+ "num_beams": 4,
261
+ "prefix": "summarize: "
262
+ },
263
+ "translation_en_to_de": {
264
+ "early_stopping": true,
265
+ "max_length": 300,
266
+ "num_beams": 4,
267
+ "prefix": "translate English to German: "
268
+ },
269
+ "translation_en_to_fr": {
270
+ "early_stopping": true,
271
+ "max_length": 300,
272
+ "num_beams": 4,
273
+ "prefix": "translate English to French: "
274
+ },
275
+ "translation_en_to_ro": {
276
+ "early_stopping": true,
277
+ "max_length": 300,
278
+ "num_beams": 4,
279
+ "prefix": "translate English to Romanian: "
280
+ }
281
+ },
282
+ "temperature": 1.0,
283
+ "tf_legacy_loss": false,
284
+ "tie_encoder_decoder": false,
285
+ "tie_word_embeddings": true,
286
+ "tokenizer_class": null,
287
+ "top_k": 50,
288
+ "top_p": 1.0,
289
+ "torch_dtype": null,
290
+ "torchscript": false,
291
+ "transformers_version": "4.31.0.dev0",
292
+ "typical_p": 1.0,
293
+ "use_bfloat16": false,
294
+ "use_cache": true,
295
+ "vocab_size": 32128
296
+ },
297
+ "torch_dtype": "float32",
298
+ "transformers_version": null
299
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 2048,
4
+ "decoder_start_token_id": 2048,
5
+ "pad_token_id": 2048,
6
+ "transformers_version": "4.31.0.dev0"
7
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:037f98ba34df0891480c5c97ebf1c436ceb6594f8283d19ca344b3027c4b2ff1
3
+ size 2360361373