Implementation:Speechbrain Speechbrain Hparams Switchboard Transformer LM
| Knowledge Sources | |
|---|---|
| Domains | ASR, Configuration |
| Last Updated | 2026-02-09 00:00 GMT |
Overview
Hyperparameter configuration for Transformer ASR with finetuned language model on the Switchboard dataset.
Description
HyperPyYAML configuration file that defines the model architecture, training schedule, and data processing pipeline for end-to-end ASR with a Transformer encoder-decoder and a finetuned Transformer language model on Switchboard conversational telephone speech. This configuration is similar to the base Transformer configuration but is designed for finetuning with a language model, using a reduced learning rate (lr_adam: 0.001), fewer epochs (60), and smaller batch size (32). The model uses CTC + KLdiv (label smoothing) losses with unigram tokenization.
Usage
Pass this YAML file as the first argument to the corresponding training script.
Code Reference
Source Location
- Repository: SpeechBrain
- File: recipes/Switchboard/ASR/transformer/hparams/transformer_finetuned_LM.yaml
Key Parameters
seed: 1312
number_of_epochs: 60
batch_size: 32
ctc_weight: 0.3
grad_accumulation_factor: 2
max_grad_norm: 5.0
loss_reduction: batchmean
sorting: random
avg_checkpoints: 5
lr_adam: 0.001
# Transcript normalization
normalize_words: True
max_utt: 300
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| --data_folder | str | Yes | Path to Switchboard dataset |
| --pretrained_lm_tokenizer_path | str | Yes | Path to pre-trained finetuned LM and tokenizer |
Outputs
| Name | Type | Description |
|---|---|---|
| Instantiated objects | Python objects | Model, optimizer, scheduler, etc. |
Usage Examples
python train.py hparams/transformer_finetuned_LM.yaml --data_folder /path/to/Switchboard