File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ """
2+ NeMo ASR Model Profiler
3+
4+ This script performs a forward pass on an NeMo ASR models and measures its real-time factor (RTF).
5+ RTF is a metric used to evaluate the processing speed of ASR models.
6+
7+ Parameters:
8+ --model: ASR model name or path to the model checkpoint file.
9+ --decoding_type: Type of decoding to use (ctc or rnnt).
10+ --gpu: GPU device to use.
11+ --batch_size: Batch size to use for inference.
12+ --nbatches: Total number of batches to process.
13+ --warmup_batches: Number of batches to skip as warmup.
14+ --audio: Path to the input audio file for ASR.
15+ --audio_maxlen: Maximum duration of audio to process (in seconds).
16+ --precision: Model precision (16, 32, or bf16).
17+ --cudnn_benchmark: Enable cuDNN benchmarking.
18+ --log: Enable logging.
19+
20+ Example:
21+ python calculate_rtf.py --model stt_en_conformer_ctc_large --decoding_type ctc --gpu 0 --batch_size 1 --nbatches 5 --warmup_batches 5 --audio /path/to/audio.wav --audio_maxlen 600 --precision bf16 --cudnn_benchmark
22+ """
23+
124import time
225import argparse
326from tqdm import tqdm
You can’t perform that action at this time.
0 commit comments