Repository navigation
Commit 948bf56
Populate AudioConfig from sensevoice encoder_conf in _extract_audio_config
The arch_validation tests for sensevoice_small failed because the
HuggingFace config for SenseVoice (model_type=sensevoice) keeps every
encoder field nested under encoder_conf (output_size, attention_heads,
num_blocks, tp_blocks, linear_units, kernel_size) plus an
input_size/vocab_size at the top level and num_mels under
frontend_conf. _extract_audio_config did not know about this layout,
so config.audio came back None and the SenseVoiceSmallModel ctor
hit 'assert audio is not None'.
The L1 path with the tiny synthetic config still worked because that
fixture sets config.audio directly; only the real HF config (L2) was
broken.
Add a sensevoice branch that maps encoder_conf.{output_size,
attention_heads, num_blocks, tp_blocks, linear_units, kernel_size},
top-level input_size, and frontend_conf.n_mels into AudioConfig.
pytest tests/arch_validation_test.py -k sensevoice_small -v
test_config_downloads_and_parses PASSED
test_full_graph_builds PASSED
test_graph_shapes_consistent PASSED
Full src/ + build_graph: 2753 passed, 41 skipped.
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Justin Chu <[email protected]>1 parent c289382 commit 948bf56
1 file changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
777 | 796 | | |
778 | 797 | | |
779 | 798 | | |
| |||
0 commit comments