1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! # What `NeMo`'s speech models share
//!
//! NVIDIA's `NeMo` models (Parakeet, the Sortformer diarizers) are built from
//! the same parts. The ones more than one kit here uses live in this module:
//!
//! - [`NemoMelFrontEnd`]: `AudioToMelSpectrogramPreprocessor` at inference,
//! waveforms to log-mels, built from a [`NemoMelFrontEndConfig`] whose
//! presets are the models'
//! ([`parakeet_tdt`](NemoMelFrontEndConfig::parakeet_tdt),
//! [`nemotron_diarization`](NemoMelFrontEndConfig::nemotron_diarization));
//! [`NemoMelFeatures`] streams it.
//! - `NemoArchive` (feature `nemo`): a `.nemo` checkpoint, `NeMo`'s tar of a
//! YAML config and a `PyTorch` state dict; `read_nemo_weights` reads the
//! state dict, and `parse_nemo_yaml` the config, into typed sections
//! (`NemoPreprocessorConfig`, `NemoConformerEncoderConfig`,
//! `NemoTransformerEncoderConfig`) that give the bunsen configs they
//! describe. A section's fields are its YAML keys, spelled as `NeMo` spells
//! them, so a field greps to `NeMo`'s source and to a `.nemo`'s config;
//! bunsen's own names start in the configs a section gives.
//! - `NeMo`'s state-dict names as bunsen's module paths:
//! [`conformer_encoder_rekey`] (a `FastConformer`, with its
//! [`conv_subsampling_rekey`] and [`conformer_layer_rekey`]) and
//! [`transformer_encoder_rekey`] (with its
//! [`transformer_encoder_layer_rekey`]), `Rekey`s for the loaders.
//!
//! The `.nemo` fixture in `testdata/nemo/` is a toy Sortformer v2 that `NeMo`
//! saved itself, written by `tools/gen_nemo_fixtures.py`.
pub use *;
pub use *;
pub use *;
pub use *;