oddadmix commited on
Commit
bee68f7
·
verified ·
1 Parent(s): b775831

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: ar
3
+ license: apache-2.0
4
+ library_name: transformers
5
+ pipeline_tag: automatic-speech-recognition
6
+ base_model: Qwen/Qwen3-ASR-0.6B-hf
7
+ datasets:
8
+ - oddadmix/lahgtna-v3-small
9
+ tags:
10
+ - automatic-speech-recognition
11
+ - arabic
12
+ - dialectal-arabic
13
+ - whisper
14
+ metrics:
15
+ - wer
16
+ - cer
17
+ ---
18
+
19
+ # qwen3-asr-0.6b-arabic-dialectal-v2
20
+
21
+ **v2** — [`Qwen/Qwen3-ASR-0.6B-hf`](https://huggingface.co/Qwen/Qwen3-ASR-0.6B-hf) (0.6B) fine-tuned for
22
+ multi-dialect Arabic on the **dialect-balanced** dataset
23
+ [`oddadmix/lahgtna-v3-small`](https://huggingface.co/datasets/oddadmix/lahgtna-v3-small) (52k train / 2.6k test, **seed 42**,
24
+ undiacritized output).
25
+
26
+ > **Private / internal.** This is v2, trained on the *balanced, leakage-reduced*
27
+ > data. v1 (trained on the earlier augmentation-expanded set, with the full
28
+ > cross-model comparison + bundled fine-tuning scripts) is at
29
+ > [`oddadmix/qwen3-asr-0.6b-arabic-dialectal`](https://huggingface.co/oddadmix/qwen3-asr-0.6b-arabic-dialectal).
30
+
31
+ ## Results (2,445-clip balanced test set, `clean_text` WER/CER)
32
+
33
+ | | WER | CER |
34
+ |---|---|---|
35
+ | **This model (v2)** | **0.695** | 0.4244 |
36
+
37
+ Full fine-tuning code, dependencies, and lessons are in the
38
+ [v1 repo]( https://huggingface.co/oddadmix/qwen3-asr-0.6b-arabic-dialectal) (`train.py`, `normalize.py`,
39
+ `FINETUNE.md`). This v2 uses the same recipe on the balanced dataset.
chat_template.jinja ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set ns = namespace(system_text="") -%}
2
+ {%- for m in messages -%}
3
+ {%- if m.role == 'system' -%}
4
+ {%- if m.content is string -%}
5
+ {%- set ns.system_text = ns.system_text + m.content -%}
6
+ {%- else -%}
7
+ {%- for c in m.content -%}
8
+ {%- if c.type == 'text' and (c.text is defined) -%}
9
+ {%- set ns.system_text = ns.system_text + c.text -%}
10
+ {%- endif -%}
11
+ {%- endfor -%}
12
+ {%- endif -%}
13
+ {%- endif -%}
14
+ {%- endfor -%}
15
+
16
+ {%- set ns2 = namespace(audio_tokens="") -%}
17
+ {%- for m in messages -%}
18
+ {%- if m.content is not string -%}
19
+ {%- for c in m.content -%}
20
+ {%- if c.type == 'audio' or ('audio' in c) or ('audio_url' in c) -%}
21
+ {%- set ns2.audio_tokens = ns2.audio_tokens + "<|audio_start|><|audio_pad|><|audio_end|>" -%}
22
+ {%- endif -%}
23
+ {%- endfor -%}
24
+ {%- endif -%}
25
+ {%- endfor -%}
26
+
27
+ {{- '<|im_start|>system\n' + (ns.system_text if ns.system_text is string else '') + '<|im_end|>\n' -}}
28
+ {{- '<|im_start|>user\n' + ns2.audio_tokens + '<|im_end|>\n' -}}
29
+ {%- if add_generation_prompt -%}
30
+ {{- '<|im_start|>assistant\n' -}}
31
+ {%- endif -%}
config.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3ASRForConditionalGeneration"
4
+ ],
5
+ "audio_config": {
6
+ "activation_dropout": 0,
7
+ "activation_function": "gelu",
8
+ "attention_dropout": 0,
9
+ "conv_chunksize": 500,
10
+ "d_model": 896,
11
+ "downsample_hidden_size": 480,
12
+ "dropout": 0,
13
+ "dtype": "bfloat16",
14
+ "encoder_attention_heads": 14,
15
+ "encoder_ffn_dim": 3584,
16
+ "encoder_layers": 18,
17
+ "initializer_range": 0.02,
18
+ "max_position_embeddings": 13,
19
+ "model_type": "qwen3_asr_encoder",
20
+ "n_window": 50,
21
+ "n_window_infer": 800,
22
+ "num_key_value_heads": 14,
23
+ "num_mel_bins": 128,
24
+ "output_dim": 1024,
25
+ "scale_embedding": false
26
+ },
27
+ "audio_token_id": 151676,
28
+ "dtype": "bfloat16",
29
+ "eos_token_id": [
30
+ 151643,
31
+ 151645
32
+ ],
33
+ "initializer_range": 0.02,
34
+ "model_type": "qwen3_asr",
35
+ "pad_token_id": 151645,
36
+ "text_config": {
37
+ "attention_bias": false,
38
+ "attention_dropout": 0.0,
39
+ "bos_token_id": null,
40
+ "dtype": "bfloat16",
41
+ "eos_token_id": null,
42
+ "head_dim": 128,
43
+ "hidden_act": "silu",
44
+ "hidden_size": 1024,
45
+ "initializer_range": 0.02,
46
+ "intermediate_size": 3072,
47
+ "layer_types": [
48
+ "full_attention",
49
+ "full_attention",
50
+ "full_attention",
51
+ "full_attention",
52
+ "full_attention",
53
+ "full_attention",
54
+ "full_attention",
55
+ "full_attention",
56
+ "full_attention",
57
+ "full_attention",
58
+ "full_attention",
59
+ "full_attention",
60
+ "full_attention",
61
+ "full_attention",
62
+ "full_attention",
63
+ "full_attention",
64
+ "full_attention",
65
+ "full_attention",
66
+ "full_attention",
67
+ "full_attention",
68
+ "full_attention",
69
+ "full_attention",
70
+ "full_attention",
71
+ "full_attention",
72
+ "full_attention",
73
+ "full_attention",
74
+ "full_attention",
75
+ "full_attention"
76
+ ],
77
+ "max_position_embeddings": 65536,
78
+ "max_window_layers": 28,
79
+ "model_type": "qwen3",
80
+ "num_attention_heads": 16,
81
+ "num_hidden_layers": 28,
82
+ "num_key_value_heads": 8,
83
+ "pad_token_id": null,
84
+ "rms_norm_eps": 1e-06,
85
+ "rope_parameters": {
86
+ "rope_theta": 1000000,
87
+ "rope_type": "default"
88
+ },
89
+ "sliding_window": null,
90
+ "tie_word_embeddings": true,
91
+ "use_cache": true,
92
+ "use_sliding_window": false,
93
+ "vocab_size": 151936
94
+ },
95
+ "tie_word_embeddings": true,
96
+ "timestamp_token_id": 151705,
97
+ "token_classification_bias": false,
98
+ "transformers_version": "5.14.0.dev0",
99
+ "use_cache": false
100
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_sample": false,
3
+ "eos_token_id": [
4
+ 151643,
5
+ 151645
6
+ ],
7
+ "max_new_tokens": 512,
8
+ "pad_token_id": 151645,
9
+ "transformers_version": "5.14.0.dev0"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8b3dabb550e4681fee7a578ac41942e00bd8a793afe426e747ef299e334008ac
3
+ size 1564928088
processor_config.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "feature_extractor": {
3
+ "chunk_length": 30,
4
+ "dither": 0.0,
5
+ "feature_extractor_type": "Qwen3ASRFeatureExtractor",
6
+ "feature_size": 128,
7
+ "hop_length": 160,
8
+ "min_length": 8000,
9
+ "n_fft": 400,
10
+ "n_samples": 480000,
11
+ "n_window": 50,
12
+ "nb_max_frames": 3000,
13
+ "padding_side": "right",
14
+ "padding_value": 0.0,
15
+ "return_attention_mask": true,
16
+ "sampling_rate": 16000
17
+ },
18
+ "processor_class": "Qwen3ASRProcessor",
19
+ "timestamp_segment_time": 80
20
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe1fad59be22a41ee293363fcf95fdedbc7c93f3b49270b1d2e18bd1399a7a05
3
+ size 11429653
tokenizer_config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "audio_bos_token": "<|audio_start|>",
4
+ "audio_eos_token": "<|audio_end|>",
5
+ "audio_token": "<|audio_pad|>",
6
+ "backend": "tokenizers",
7
+ "bos_token": null,
8
+ "clean_up_tokenization_spaces": false,
9
+ "eos_token": "<|im_end|>",
10
+ "errors": "replace",
11
+ "image_token": "<|image_pad|>",
12
+ "is_local": false,
13
+ "local_files_only": false,
14
+ "model_max_length": 131072,
15
+ "model_specific_special_tokens": {
16
+ "audio_bos_token": "<|audio_start|>",
17
+ "audio_eos_token": "<|audio_end|>",
18
+ "audio_token": "<|audio_pad|>",
19
+ "image_token": "<|image_pad|>",
20
+ "video_token": "<|video_pad|>",
21
+ "vision_bos_token": "<|vision_start|>",
22
+ "vision_eos_token": "<|vision_end|>"
23
+ },
24
+ "pad_token": "<|endoftext|>",
25
+ "processor_class": "Qwen3ASRProcessor",
26
+ "split_special_tokens": false,
27
+ "tokenizer_class": "Qwen2Tokenizer",
28
+ "unk_token": null,
29
+ "video_token": "<|video_pad|>",
30
+ "vision_bos_token": "<|vision_start|>",
31
+ "vision_eos_token": "<|vision_end|>"
32
+ }