bovod-sjtu commited on
Commit
2699c7b
·
verified ·
1 Parent(s): bbbf0b5

Upload 1.5B branch checkpoint without frozen LLM

Browse files
README.md ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: pytorch
4
+ tags:
5
+ - audio
6
+ - speech
7
+ - frozen-llm
8
+ - prealignslm
9
+ ---
10
+
11
+ # Audio-align 1.5B Branch Checkpoint
12
+
13
+ This repository stores the non-main-LLM branches for the PreAlignSLM 1.5B
14
+ checkpoint `phase2_3_chat_step5000`. The Qwen2.5-1.5B-Instruct backbone was frozen
15
+ throughout training and is intentionally not included.
16
+
17
+ ## Files
18
+
19
+ | File | Contents |
20
+ | --- | --- |
21
+ | `semantic_branch.safetensors` | SenseVoice semantic branch, CTC layer, TASU projector, semantic projector |
22
+ | `acoustic_branch.safetensors` | ArCap acoustic branch and acoustic recognition projector |
23
+ | `router.safetensors` | BERT-small instruction router |
24
+ | `manifest.json` | Export metadata, tensor counts, SHA256 checksums |
25
+ | `config/` | Training and base config snapshots |
26
+
27
+ Total exported parameters: `1,795,187,472`.
28
+
29
+ ## Loading
30
+
31
+ Instantiate the matching PreAlignSLM architecture from this codebase, load the
32
+ frozen Qwen2.5-1.5B-Instruct backbone separately, then merge the branch files:
33
+
34
+ ```python
35
+ from safetensors.torch import load_file
36
+
37
+ state = {}
38
+ for filename in [
39
+ "semantic_branch.safetensors",
40
+ "acoustic_branch.safetensors",
41
+ "router.safetensors",
42
+ ]:
43
+ state.update(load_file(filename, device="cpu"))
44
+
45
+ missing, unexpected = model.load_state_dict(state, strict=False)
46
+ assert not unexpected
47
+ ```
48
+
49
+ `module.llm.*` keys are expected to be missing from these files because the
50
+ main LLM is loaded from its original Qwen checkpoint.
51
+
52
+ ## Reported Metrics
53
+
54
+ Best open-ended 1.5B checkpoint (`phase2_3_chat/model-5000.pt`):
55
+
56
+ | Metric | Result |
57
+ | --- | --- |
58
+ | ASR test-clean / test-other / combined WER | 3.50% / 7.22% / 5.36% |
59
+ | AIR-Bench Chat overall, Qwen3.5-27B judge | 2.365 / 10 |
60
+ | VoiceBench direct alpacaeval / commoneval / wildvoice | 1.62 / 1.61 / 1.33 |
61
+ | VoiceBench direct sd-qa | 21.8% |
62
+ | VoiceBench frozen-LLM agent alpacaeval / commoneval / wildvoice | 2.414 / 2.346 / 1.978 |
63
+ | VoiceBench frozen-LLM agent sd-qa | 28.9% |
acoustic_branch.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b4c6d9e5aa9c0132ab559fcc50198f197896e274a66da5cc57ac5ed50aeac87
3
+ size 5599602652
config/slm_multitask_base.json ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ // Base config for PreAlignSLM multi-task training (SenseVoice semantic encoder)
3
+ // Override with experiment-specific configs for LoRA/finetune/frozen variants
4
+ "trainer_type": "ARCaptionTrainer",
5
+ "datasets_type": "parquet_list_dataset_multitask_slm",
6
+ "synthesizer_type": "SLMSynthesizer",
7
+ "data": {
8
+ "audio": {
9
+ "sample_rate": 16000
10
+ },
11
+ // data.path supports dict format for multi-task:
12
+ // {"asr": ["path/to/ASR.list"], "ser": ["path/to/SER.list"], ...}
13
+ // or list format (task auto-inferred from filename):
14
+ // ["path/to/ASR_LibriSpeech.list", "path/to/SER_IEMOCAP.list", ...]
15
+ //
16
+ // After running Phase 0.5 caption generation (generate_captions.sh),
17
+ // use the captioned list files below. The captioned parquets contain
18
+ // an `acoustic_caption` field per segment, enabling speech+text joint
19
+ // input for the ArCap acoustic branch (Scenario 1: fast forced-alignment).
20
+ //
21
+ // Original (no acoustic captions — acoustic branch receives empty text):
22
+ // "asr": ["/cpfs/user/lianshi/data/datalist/all/ASR_LibriSpeech.list"],
23
+ // "ser": ["/cpfs/user/lianshi/data/datalist/all/SER_IEMOCAP.list",
24
+ // "/cpfs/user/lianshi/data/datalist/all/SER_ESD.list"],
25
+ // "gr": ["external_data/GR_combined.list"],
26
+ // "st": ["external_data/ST_MuST-C.list"]
27
+ "path": {
28
+ "asr": ["/cpfs/user/bohanli/workspace/Alalm/external_data/captioned/ASR_LibriSpeech_captioned.list"],
29
+ "ser": ["/cpfs/user/bohanli/workspace/Alalm/external_data/captioned/SER_combined_captioned.list"],
30
+ "gr": ["/cpfs/user/bohanli/workspace/Alalm/external_data/captioned/GR_combined_captioned.list"],
31
+ "st": ["/cpfs/user/bohanli/workspace/Alalm/external_data/captioned/ST_MuST-C_captioned.list"]
32
+ },
33
+ "splits": "999,1",
34
+ "dataset_conf": {
35
+ "parse_conf": {
36
+ "sample_rate": 16000,
37
+ "high_order_resample": false,
38
+ "seed": 1234,
39
+ "use_audio": true,
40
+ "row_group_batch_size": 256
41
+ },
42
+ "filter_conf": {
43
+ "max_duration": 30.0,
44
+ "min_duration": 0.2
45
+ },
46
+ "pad_multiple": true,
47
+ "pad_multiple_conf": {
48
+ "multiple_of": 3840
49
+ },
50
+ "shuffle": true,
51
+ "shuffle_conf": {
52
+ "shuffle_size": 2000
53
+ },
54
+ "sort": true,
55
+ "sort_conf": {
56
+ "sort_size": 500
57
+ },
58
+ "batch_conf": {
59
+ "batch_type": "static",
60
+ "batch_size": 4
61
+ }
62
+ },
63
+ "num_workers": 8,
64
+ "persistent_workers": true,
65
+ "pin_memory": true,
66
+ "prefetch_factor": 32
67
+ },
68
+ "model": {
69
+ "type": "PreAlignSLM",
70
+ "semantic_encoder_type": "sensevoice",
71
+ "semantic_model_path": "/root/.cache/modelscope/hub/models/iic/SenseVoiceSmall",
72
+ "stage0_projector_ckpt": "/cpfs/user/bohanli/workspace/Alalm/egs/arcap_slm/stage0_asr_projector/checkpoints/model-170000.pt",
73
+ // Text-only noise params
74
+ "drop_prob": 0.05,
75
+ "insert_prob": 0.0,
76
+ "smooth_low": 0.0,
77
+ "smooth_high": 0.1,
78
+ // LLM config (override llm_model_path for 0.5B vs 1.5B)
79
+ "LLM": {
80
+ "llm_model_path": "/cpfs/user/lianshi/pretrained_models/llms/Qwen2.5-1.5B"
81
+ },
82
+ // Finetune defaults: frozen LLM (override in exp configs)
83
+ "finetune_llm": false,
84
+ "use_lora": false,
85
+ // Acoustic encoder (CLSPArCap for paralinguistic features)
86
+ "acoustic_recog_encoder": {
87
+ "type": "arcap",
88
+ "clsp_model_path": "yfyeung/CLSP",
89
+ "llm_model_path": "/cpfs/user/lianshi/pretrained_models/llms/Qwen2.5-0.5B",
90
+ "pretrained_ckpt": "/cpfs/user/bohanli/workspace/Alalm/egs/arcap/arcap_prefix10_reg1.0_textprob0.5/checkpoints/model-900000.pt",
91
+ "load_strict": false,
92
+ "caption_token": "<caption>",
93
+ "prefix_length": 10,
94
+ "finetune_llm": false,
95
+ "reg_loss_weight": 1.0,
96
+ "use_text_prob": 1.0,
97
+ "mapper_hidden_dim": 2048,
98
+ "mapper_dropout": 0.1
99
+ },
100
+ // Instruction masking separator
101
+ "answer_separator": "\nAnswer:"
102
+ },
103
+ "train": {
104
+ "ddp": true,
105
+ "find_unused_parameters": true,
106
+ "static_graph": true,
107
+ "random_seed": 250929,
108
+ "valid_batch_size": 1,
109
+ "optimizer_type": "AdamW",
110
+ "optimizer_params": {
111
+ "lr": 0.0001,
112
+ "betas": [0.9, 0.99],
113
+ "eps": 1e-06,
114
+ "weight_decay": 0.01
115
+ },
116
+ "scheduler_type": "CosineScheduler",
117
+ "scheduler_params": {
118
+ "lr_batches": 500000,
119
+ "min_lr": 1e-05,
120
+ "warmup_batches": 5000,
121
+ "warmup_start": 0.5
122
+ },
123
+ "gradclip_value": 2,
124
+ "epochs": 1000,
125
+ "max_steps": 500000,
126
+ "save_summary_steps": 100,
127
+ "save_checkpoints_steps": 5000,
128
+ "valid_interval": 10000,
129
+ "keep_checkpoint_max": 10,
130
+ "num_visualization": 10,
131
+ "dtype": "bf16"
132
+ }
133
+ }
config/sv_frozen_v3_phase2_3_chat.json ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ // Phase 2.3 Chat: TQA Chat low-LR continual training from Phase 2.2 best
3
+ // Goal: Improve AIR-Bench Chat speech score and VoiceBench open-ended scores
4
+ //
5
+ // Continue from Phase 2.2 best: --base_model sv_frozen_v3_phase2_2_textonly/checkpoints/model-24000.pt
6
+ // Architecture identical to Phase 2 (router, TASU, ArCap)
7
+ // Trainable: ctc_linear + semantic_projector + tasu_projector + acoustic_projector + router = ~155M params
8
+ //
9
+ // Data: ONLY TQA Chat (~120K samples, text-only, speech domain)
10
+ // 5 modes aligned with AIR-Bench Chat speech sub-tasks:
11
+ // speech_content_qa (25%) — single-speaker content QA
12
+ // speech_emotion_qa (15%) — emotion/mood/feeling QA
13
+ // speech_speaker_qa (10%) — gender/age/accent attribute QA
14
+ // dialogue_casual_qa (25%) — casual conversation comprehension
15
+ // dialogue_task_qa (25%) — task-oriented dialogue QA
16
+ //
17
+ // Training: ~1875 steps/epoch × 3 epochs = ~5625 total steps
18
+ // Low LR (1e-5) to preserve Phase 2.2 gains (GR 93.6%, MCQ fail 8-9%)
19
+ // max_steps = lr_batches to avoid overshoot (Finding #14)
20
+ //
21
+ // Start: --base_model sv_frozen_v3_phase2_2_textonly/checkpoints/model-24000.pt
22
+ "model": {
23
+ "finetune_llm": false,
24
+ "use_lora": false,
25
+ "use_prompt_tags": true,
26
+ "prompt_format": "chat_template_hybrid",
27
+ // BERT-small instruction router with softmax activation
28
+ "use_router": true,
29
+ "router_type": "bert",
30
+ "router_bert_model": "prajjwal1/bert-small",
31
+ "router_activation": "softmax",
32
+ // TASU projector architecture (must match Stages 1-3)
33
+ "use_semantic_mlp": "tasu",
34
+ "tasu_use_layernorm": true,
35
+ "semantic_mlp_bottleneck": 2048,
36
+ // ps-slm projector init (overwritten by --base_model, but ensures correct architecture)
37
+ "psslm_projector_ckpt": "/root/.cache/huggingface/hub/models--yyy1421129--ps-slm/snapshots/f97224d020ebb9c51fb71f3c4c1c70beff2cd90a/half_audio_finetuned/pytorch_model.bin",
38
+ // ArCap checkpoint with EOS fix
39
+ "acoustic_recog_encoder": {
40
+ "pretrained_ckpt": "/cpfs/user/bohanli/workspace/Alalm/egs/arcap/arcap_eos_finetune/checkpoints/model-280000.pt"
41
+ },
42
+ // LLM: Qwen2.5-1.5B-Instruct (must match Stages 1-3)
43
+ "LLM": {
44
+ "llm_model_path": "/cpfs/user/lianshi/pretrained_models/llms/Qwen2.5-1.5B-Instruct"
45
+ }
46
+ },
47
+ "data": {
48
+ "path": {
49
+ "tqa_chat": ["/cpfs/user/bohanli/workspace/Alalm/external_data/text_qa_chat/TQA_chat.list"]
50
+ },
51
+ "dataset_conf": {
52
+ "batch_conf": {
53
+ "batch_type": "static",
54
+ "batch_size": 8
55
+ }
56
+ }
57
+ },
58
+ "train": {
59
+ "epochs": 3,
60
+ "max_steps": 5625,
61
+ "save_checkpoints_steps": 1000,
62
+ "valid_interval": 1000,
63
+ // Router gets 10x LR via lr_scale_patterns (1e-5 * 10 = 1e-4)
64
+ "lr_scale_patterns": {"router": 10.0},
65
+ "scheduler_params": {
66
+ // 3 epochs × ~1875 steps = ~5625 steps for cosine schedule
67
+ "lr_batches": 5625,
68
+ "min_lr": 1e-06,
69
+ "warmup_batches": 200,
70
+ "warmup_start": 0.5
71
+ },
72
+ "optimizer_params": {
73
+ "lr": 1e-05,
74
+ "betas": [0.9, 0.99],
75
+ "eps": 1e-06,
76
+ "weight_decay": 0.01
77
+ }
78
+ }
79
+ }
manifest.json ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "format_version": 1,
3
+ "checkpoint_id": "phase2_3_chat_step5000",
4
+ "source_checkpoint": "egs/arcap_slm_exp/sv_frozen_v3_phase2_3_chat/checkpoints/model-5000.pt",
5
+ "exported_at_utc": "2026-06-08T12:56:21.103134+00:00",
6
+ "dtype": "preserve",
7
+ "excluded_prefixes": [
8
+ "module.llm."
9
+ ],
10
+ "checkpoint_metadata": {
11
+ "global_step": 5000,
12
+ "global_epoch": -1,
13
+ "top_level_keys": [
14
+ "global_epoch",
15
+ "global_step",
16
+ "model",
17
+ "optimizer",
18
+ "scheduler"
19
+ ]
20
+ },
21
+ "branches": {
22
+ "semantic": {
23
+ "num_tensors": 927,
24
+ "num_parameters": 366567257,
25
+ "tensor_bytes": 1466269028,
26
+ "dtype_counts": {
27
+ "float32": 927
28
+ },
29
+ "first_keys": [
30
+ "module.semantic_encoder.encoder.encoders0.0.self_attn.linear_out.weight",
31
+ "module.semantic_encoder.encoder.encoders0.0.self_attn.linear_out.bias",
32
+ "module.semantic_encoder.encoder.encoders0.0.self_attn.linear_q_k_v.weight",
33
+ "module.semantic_encoder.encoder.encoders0.0.self_attn.linear_q_k_v.bias",
34
+ "module.semantic_encoder.encoder.encoders0.0.self_attn.fsmn_block.weight",
35
+ "module.semantic_encoder.encoder.encoders0.0.feed_forward.w_1.weight",
36
+ "module.semantic_encoder.encoder.encoders0.0.feed_forward.w_1.bias",
37
+ "module.semantic_encoder.encoder.encoders0.0.feed_forward.w_2.weight"
38
+ ],
39
+ "file": "semantic_branch.safetensors",
40
+ "prefixes": [
41
+ "module.semantic_encoder.",
42
+ "module.ctc_linear.",
43
+ "module.semantic_projector.",
44
+ "module.tasu_projector."
45
+ ],
46
+ "file_bytes": 1466395508,
47
+ "sha256": "ab957297075eb45bfe27bf8619c998da32fdd62d3e743a895838b8175a5bc000"
48
+ },
49
+ "acoustic": {
50
+ "num_tensors": 1118,
51
+ "num_parameters": 1399854517,
52
+ "tensor_bytes": 5599418068,
53
+ "dtype_counts": {
54
+ "float32": 1118
55
+ },
56
+ "first_keys": [
57
+ "module.acoustic_recog_encoder.clsp.model.logit_scale",
58
+ "module.acoustic_recog_encoder.clsp.model.encoder_embed.conv.0.weight",
59
+ "module.acoustic_recog_encoder.clsp.model.encoder_embed.conv.0.bias",
60
+ "module.acoustic_recog_encoder.clsp.model.encoder_embed.conv.4.weight",
61
+ "module.acoustic_recog_encoder.clsp.model.encoder_embed.conv.4.bias",
62
+ "module.acoustic_recog_encoder.clsp.model.encoder_embed.conv.7.weight",
63
+ "module.acoustic_recog_encoder.clsp.model.encoder_embed.conv.7.bias",
64
+ "module.acoustic_recog_encoder.clsp.model.encoder_embed.convnext.depthwise_conv.weight"
65
+ ],
66
+ "file": "acoustic_branch.safetensors",
67
+ "prefixes": [
68
+ "module.acoustic_recog_encoder.",
69
+ "module.acoustic_recog_projector."
70
+ ],
71
+ "file_bytes": 5599602652,
72
+ "sha256": "4b4c6d9e5aa9c0132ab559fcc50198f197896e274a66da5cc57ac5ed50aeac87"
73
+ },
74
+ "router": {
75
+ "num_tensors": 75,
76
+ "num_parameters": 28765698,
77
+ "tensor_bytes": 115062792,
78
+ "dtype_counts": {
79
+ "float32": 75
80
+ },
81
+ "first_keys": [
82
+ "module.router.bert.embeddings.word_embeddings.weight",
83
+ "module.router.bert.embeddings.position_embeddings.weight",
84
+ "module.router.bert.embeddings.token_type_embeddings.weight",
85
+ "module.router.bert.embeddings.LayerNorm.weight",
86
+ "module.router.bert.embeddings.LayerNorm.bias",
87
+ "module.router.bert.encoder.layer.0.attention.self.query.weight",
88
+ "module.router.bert.encoder.layer.0.attention.self.query.bias",
89
+ "module.router.bert.encoder.layer.0.attention.self.key.weight"
90
+ ],
91
+ "file": "router.safetensors",
92
+ "prefixes": [
93
+ "module.router."
94
+ ],
95
+ "file_bytes": 115072320,
96
+ "sha256": "802113d2ed27cefe6042625c65ea5b829155571138dfd39181a8e5f33b7f3463"
97
+ }
98
+ },
99
+ "copied_configs": {
100
+ "basic_config": true,
101
+ "exp_config": true
102
+ }
103
+ }
router.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:802113d2ed27cefe6042625c65ea5b829155571138dfd39181a8e5f33b7f3463
3
+ size 115072320
semantic_branch.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab957297075eb45bfe27bf8619c998da32fdd62d3e743a895838b8175a5bc000
3
+ size 1466395508
verification.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "semantic": {
3
+ "file": "semantic_branch.safetensors",
4
+ "num_tensors": 927,
5
+ "num_parameters": 366567257,
6
+ "dtype_counts": {
7
+ "float32": 927
8
+ }
9
+ },
10
+ "acoustic": {
11
+ "file": "acoustic_branch.safetensors",
12
+ "num_tensors": 1118,
13
+ "num_parameters": 1399854517,
14
+ "dtype_counts": {
15
+ "float32": 1118
16
+ }
17
+ },
18
+ "router": {
19
+ "file": "router.safetensors",
20
+ "num_tensors": 75,
21
+ "num_parameters": 28765698,
22
+ "dtype_counts": {
23
+ "float32": 75
24
+ }
25
+ }
26
+ }