nsa01n commited on
Commit
fc3095f
·
verified ·
1 Parent(s): 5b94d22

decoder-only fine-tune (middle)

Browse files
config.json ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CohereAsrForConditionalGeneration"
4
+ ],
5
+ "attention_bias": true,
6
+ "attention_dropout": 0.0,
7
+ "batch_size": 128,
8
+ "bos_token_id": 4,
9
+ "decoder_start_token_id": 13764,
10
+ "decoding": {
11
+ "beam": {
12
+ "beam_size": 1,
13
+ "len_pen": 0.0,
14
+ "max_generation_delta": -256
15
+ },
16
+ "return_best_hypothesis": true,
17
+ "strategy": "beam"
18
+ },
19
+ "dtype": "bfloat16",
20
+ "encoder": {
21
+ "att_context_size": [
22
+ -1,
23
+ -1
24
+ ],
25
+ "causal_downsampling": false,
26
+ "conv_context_size": null,
27
+ "conv_kernel_size": 9,
28
+ "conv_norm_type": "batch_norm",
29
+ "d_model": 1280,
30
+ "dropout": 0,
31
+ "dropout_att": 0,
32
+ "dropout_emb": 0,
33
+ "dropout_pre_encoder": 0,
34
+ "feat_in": 128,
35
+ "feat_out": -1,
36
+ "ff_expansion_factor": 4,
37
+ "n_heads": 8,
38
+ "n_layers": 48,
39
+ "pos_emb_max_len": 5000,
40
+ "reduction": null,
41
+ "reduction_factor": 1,
42
+ "reduction_position": null,
43
+ "self_attention_model": "rel_pos",
44
+ "subsampling": "dw_striding",
45
+ "subsampling_conv_channels": 256,
46
+ "subsampling_factor": 8,
47
+ "untie_biases": true,
48
+ "xscaling": false
49
+ },
50
+ "encoder_config": {
51
+ "activation_dropout": 0.0,
52
+ "attention_bias": true,
53
+ "attention_dropout": 0.0,
54
+ "conv_kernel_size": 9,
55
+ "convolution_bias": true,
56
+ "dropout": 0.0,
57
+ "dropout_positions": 0.0,
58
+ "dtype": "bfloat16",
59
+ "hidden_act": "silu",
60
+ "hidden_size": 1280,
61
+ "initializer_range": 0.02,
62
+ "intermediate_size": 5120,
63
+ "layerdrop": 0.0,
64
+ "max_position_embeddings": 5000,
65
+ "model_type": "parakeet_encoder",
66
+ "num_attention_heads": 8,
67
+ "num_hidden_layers": 48,
68
+ "num_key_value_heads": 8,
69
+ "num_mel_bins": 128,
70
+ "scale_input": false,
71
+ "subsampling_conv_channels": 256,
72
+ "subsampling_conv_kernel_size": 3,
73
+ "subsampling_conv_stride": 2,
74
+ "subsampling_factor": 8
75
+ },
76
+ "eos_token_id": 3,
77
+ "head": {
78
+ "activation": "relu",
79
+ "dropout": 0,
80
+ "hidden_size": 1024,
81
+ "log_softmax": true,
82
+ "num_classes": 16384,
83
+ "num_layers": 1,
84
+ "use_transformer_init": true
85
+ },
86
+ "head_dim": 128,
87
+ "hidden_act": "relu",
88
+ "hidden_size": 1024,
89
+ "initializer_range": 0.02,
90
+ "intermediate_size": 4096,
91
+ "is_encoder_decoder": true,
92
+ "log_batch_stats": false,
93
+ "log_prediction": true,
94
+ "max_audio_clip_s": 35,
95
+ "max_position_embeddings": 1024,
96
+ "max_seq_len": 1024,
97
+ "model_defaults": {
98
+ "asr_enc_hidden": 1280,
99
+ "lm_dec_hidden": 1024,
100
+ "lm_enc_hidden": 1024
101
+ },
102
+ "model_type": "cohere_asr",
103
+ "multitask_metrics_cfg": {
104
+ "log_predictions": true,
105
+ "metrics": {
106
+ "wer": {
107
+ "constraint": ".source_lang==.target_lang"
108
+ }
109
+ }
110
+ },
111
+ "num_attention_heads": 8,
112
+ "num_hidden_layers": 8,
113
+ "num_key_value_heads": 8,
114
+ "overlap_chunk_second": 5.0,
115
+ "pad_token_id": 2,
116
+ "preprocessor": {
117
+ "dither": 1e-05,
118
+ "features": 128,
119
+ "frame_splicing": 1,
120
+ "log": true,
121
+ "n_fft": 512,
122
+ "normalize": "per_feature",
123
+ "pad_to": 0,
124
+ "pad_value": 0.0,
125
+ "sample_rate": 16000,
126
+ "window": "hann",
127
+ "window_size": 0.025,
128
+ "window_stride": 0.01
129
+ },
130
+ "prompt_defaults": [
131
+ {
132
+ "role": "user",
133
+ "slots": {
134
+ "decodercontext": "",
135
+ "diarize": "<|nodiarize|>",
136
+ "emotion": "<|emo:undefined|>",
137
+ "itn": "<|noitn|>",
138
+ "pnc": "<|pnc|>",
139
+ "source_lang": "<|en|>",
140
+ "target_lang": "<|en|>",
141
+ "timestamp": "<|notimestamp|>"
142
+ }
143
+ },
144
+ {
145
+ "role": "user_partial",
146
+ "slots": {
147
+ "decodercontext": ""
148
+ }
149
+ }
150
+ ],
151
+ "prompt_format": "cohere_asr",
152
+ "sample_rate": 16000,
153
+ "supported_languages": [
154
+ "en",
155
+ "ar"
156
+ ],
157
+ "tie_word_embeddings": false,
158
+ "transf_decoder": {
159
+ "config_dict": {
160
+ "attn_layer_dropout": 0,
161
+ "attn_score_dropout": 0,
162
+ "embedding_dropout": 0,
163
+ "ffn_dropout": 0,
164
+ "hidden_act": "relu",
165
+ "hidden_size": 1024,
166
+ "inner_size": 4096,
167
+ "learn_positional_encodings": false,
168
+ "lm_dec_hidden": 1280,
169
+ "max_sequence_length": 1024,
170
+ "num_attention_heads": 8,
171
+ "num_layers": 8,
172
+ "num_token_types": 0,
173
+ "pre_ln": true,
174
+ "vocab_size": "None"
175
+ },
176
+ "encoder": null,
177
+ "model_name": null,
178
+ "pre_ln_final_layer_norm": true,
179
+ "pretrained": false
180
+ },
181
+ "transf_encoder": {
182
+ "attn_layer_dropout": 0,
183
+ "attn_score_dropout": 0,
184
+ "ffn_dropout": 0,
185
+ "hidden_size": 1024,
186
+ "inner_size": 4096,
187
+ "mask_future": false,
188
+ "num_attention_heads": 8,
189
+ "num_layers": 0,
190
+ "pre_ln": true,
191
+ "pre_ln_final_layer_norm": true
192
+ },
193
+ "transformers_version": "5.17.0",
194
+ "use_cache": false,
195
+ "use_loss_mask_for_prompt": false,
196
+ "vocab_size": 16384
197
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 4,
4
+ "decoder_start_token_id": 13764,
5
+ "eos_token_id": 3,
6
+ "output_attentions": false,
7
+ "output_hidden_states": false,
8
+ "pad_token_id": 2,
9
+ "transformers_version": "5.17.0"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aca7ba9fa08c8b45922c7e25081c1d669bdb765cb485e2e13cfc98474ba4204e
3
+ size 4131809192
processor_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "feature_extractor": {
3
+ "auto_map": {
4
+ "AutoProcessor": "processing_cohere_asr.CohereAsrProcessor"
5
+ },
6
+ "dither": 1e-05,
7
+ "feature_extractor_type": "CohereAsrFeatureExtractor",
8
+ "feature_size": 128,
9
+ "hop_length": 160,
10
+ "max_audio_clip_s": 35.0,
11
+ "min_energy_window_samples": 1600,
12
+ "n_fft": 512,
13
+ "overlap_chunk_second": 5.0,
14
+ "padding_side": "right",
15
+ "padding_value": 0.0,
16
+ "preemphasis": 0.97,
17
+ "return_attention_mask": true,
18
+ "sampling_rate": 16000,
19
+ "win_length": 400
20
+ },
21
+ "processor_class": "CohereAsrProcessor"
22
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|startoftranscript|>",
4
+ "clean_up_tokenization_spaces": false,
5
+ "eos_token": "<|endoftext|>",
6
+ "is_local": false,
7
+ "local_files_only": false,
8
+ "model_max_length": 1000000000000000019884624838656,
9
+ "pad_token": "<pad>",
10
+ "processor_class": "CohereAsrProcessor",
11
+ "split_special_tokens": false,
12
+ "tokenizer_class": "TokenizersBackend",
13
+ "unk_token": "<unk>"
14
+ }
train_meta.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "base_model": "CohereLabs/cohere-transcribe-arabic-07-2026",
3
+ "variant": "middle",
4
+ "method": "decoder_only_finetune",
5
+ "target_column": "english",
6
+ "dataset": "Ahmed1/cohere-asr-cs",
7
+ "effective_batch_size": 32,
8
+ "seed": 42,
9
+ "bf16": true,
10
+ "train_examples": 2780,
11
+ "val_examples": 454,
12
+ "metrics": {
13
+ "train_runtime": 248.8494,
14
+ "train_samples_per_second": 22.343,
15
+ "train_steps_per_second": 0.699,
16
+ "total_flos": 2.618070162836816e+19,
17
+ "train_loss": 0.19591110910492382,
18
+ "epoch": 2.0
19
+ },
20
+ "freeze": {
21
+ "variant": "middle",
22
+ "decoder_module": "model.decoder",
23
+ "decoder_layers_total": 8,
24
+ "decoder_layers_trained": [
25
+ 3,
26
+ 4
27
+ ],
28
+ "train_decoder_io": true,
29
+ "output_head": "proj_out",
30
+ "io_trainable_params": 35935232,
31
+ "layer_trainable_params": 33593344,
32
+ "encoder_module": "model.encoder",
33
+ "encoder_trainable_params": 0,
34
+ "total_params": 2065647872,
35
+ "trainable_params": 69528576,
36
+ "trainable_pct": 3.366
37
+ },
38
+ "hyperparameters": {
39
+ "learning_rate": 1e-05,
40
+ "num_train_epochs": 2,
41
+ "lr_scheduler_type": "cosine",
42
+ "warmup_ratio": 0.03,
43
+ "per_device_train_batch_size": 16,
44
+ "gradient_accumulation_steps": 2,
45
+ "optim": "adamw_bnb_8bit",
46
+ "weight_decay": 0.01,
47
+ "max_grad_norm": 1.0,
48
+ "save_total_limit": 1
49
+ }
50
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d140316592d314a599dc4f7ad225343b290d08a80b32787018e9a4300ae0e793
3
+ size 5393