vpermilp commited on
Commit
0b0f3b1
Β·
verified Β·
1 Parent(s): 7f1b612

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +91 -0
  2. firered_vad.safetensors +3 -0
  3. golden.safetensors +3 -0
README.md CHANGED
@@ -1,3 +1,94 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ base_model: FireRedTeam/FireRedVAD
4
+ pipeline_tag: voice-activity-detection
5
+ tags:
6
+ - voice-activity-detection
7
+ - vad
8
+ - dfsmn
9
+ - audio
10
+ - speech
11
+ - safetensors
12
+ - svod
13
  ---
14
+
15
+ # FireRedVAD (non-streaming) β€” safetensors for Svod
16
+
17
+ The non-streaming voice-activity-detection checkpoint of
18
+ [FireRedVAD](https://github.com/FireRedTeam/FireRedVAD)
19
+ ([FireRedASR2S technical report, arXiv:2603.10420](https://arxiv.org/abs/2603.10420)),
20
+ converted from the original `model.pth.tar` + `cmvn.ark` to a single
21
+ safetensors file for the [Svod](https://github.com/npatsakula/svod) inference
22
+ runtime. Weights are unmodified f32 β€” only renamed, reshaped, and bundled with
23
+ the CMVN statistics.
24
+
25
+ FireRedVAD is a feed-forward DFSMN (no recurrence): 8 FSMN layers with
26
+ depthwise lookback/lookahead temporal filters, 588k parameters, operating on
27
+ 80-bin kaldi log-mel fbank at 16 kHz (25 ms window / 10 ms hop). It detects
28
+ speech in 100+ languages; upstream reports 97.57 F1 on FLEURS-VAD-102.
29
+
30
+ ## Files
31
+
32
+ | file | contents |
33
+ |---|---|
34
+ | `firered_vad.safetensors` | 45 model tensors + `cmvn_means`/`cmvn_istd` `[80]` (global CMVN derived from `cmvn.ark`: variance floored at 1e-20, inverse std precomputed) |
35
+ | `golden.safetensors` | parity-test reference for `assets/hello_zh.wav`: `samples` (16 kHz mono, `[-1, 1]` f32), `feat` (pre-CMVN `kaldi-native-fbank` output `[230, 80]`), `probs` (PyTorch `DetectModel` output `[230]`) |
36
+
37
+ ## Architecture / config
38
+
39
+ `idim=80, R=8, M=1, H=256, P=128, N1=20, S1=1, N2=20, S2=1, odim=1`
40
+ (read from the checkpoint's embedded args).
41
+
42
+ Tensor schema: `fc1.{weight,bias}` (80β†’256), `fc2.{weight,bias}` (256β†’128),
43
+ `fsmn1.{lookback,lookahead}.weight` `[128, 1, 1, 20]`,
44
+ `blocks.{0..6}.{fc1.weight,fc1.bias,fc2.weight,lookback.weight,lookahead.weight}`,
45
+ `dnn.{weight,bias}` (128β†’256), `out.{weight,bias}` (256β†’1),
46
+ `cmvn_means`/`cmvn_istd` `[80]`. FSMN filters are reshaped from PyTorch's
47
+ `[P, 1, 20]` to `[P, 1, 1, 20]` for 2-D depthwise convolution.
48
+
49
+ ## Provenance & verification
50
+
51
+ Produced by [`scripts/convert_firered_vad.py`](https://github.com/npatsakula/svod/blob/main/scripts/convert_firered_vad.py):
52
+
53
+ ```bash
54
+ uv run scripts/convert_firered_vad.py \
55
+ --checkpoint model.pth.tar \
56
+ --cmvn cmvn.ark \
57
+ --selfcheck \
58
+ --golden hello_zh.wav
59
+ ```
60
+
61
+ Verified against the PyTorch reference (CPU, f32):
62
+
63
+ - FSMN asymmetric-padding formulation vs reference symmetric-pad-then-slice:
64
+ bit-identical (`--selfcheck`, max |Ξ”| = 0).
65
+ - Svod device model on golden features vs `DetectModel` probs: max |Ξ”| β‰ˆ 1.2e-7.
66
+ - End-to-end (Svod fbank β†’ model) vs reference probs: max |Ξ”| β‰ˆ 1.8e-7.
67
+
68
+ ## Usage (Svod)
69
+
70
+ ```rust
71
+ use svod_model::firered_vad::{FireRedVad, FireRedVadSplitter};
72
+
73
+ // Downloads firered_vad.safetensors from this repo:
74
+ let splitter = FireRedVadSplitter::from_hub()?;
75
+ // Or from a local file:
76
+ let model = FireRedVad::from_safetensors(path)?;
77
+ ```
78
+
79
+ `golden.safetensors` is consumed by Svod's parity tests
80
+ (`cargo test -p svod-model firered -- --ignored`).
81
+
82
+ ## License & citation
83
+
84
+ Apache-2.0, matching the upstream
85
+ [FireRedVAD](https://github.com/FireRedTeam/FireRedVAD) release by Xiaohongshu.
86
+
87
+ ```bibtex
88
+ @article{xu2026fireredasr2s,
89
+ title={FireRedASR2S: A State-of-the-Art Industrial-Grade All-in-One Automatic Speech Recognition System},
90
+ author={Xu, Kaituo and Jia, Yan and Huang, Kai and Chen, Junjie and Li, Wenpeng and Liu, Kun and Xie, Feng-Long and Tang, Xu and Hu, Yao},
91
+ journal={arXiv preprint arXiv:2603.10420},
92
+ year={2026}
93
+ }
94
+ ```
firered_vad.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b2b9577b77d85bac630535021dca88d56d618876070bce54850dcef4d7c09dc
3
+ size 2358420
golden.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:973d2580dc755004383fa5c6f3a5d3c1d0e41dd558a8d2ccebbf1e31971f3d6a
3
+ size 223216