CanaryQwenOptions

Options & Configuration · AiDotNet.SpeechRecognition.NeMo

Options for Canary-Qwen: canary-1b-flash’s Fast Conformer encoder, a linear projection and Qwen3-1.7B.

Inheritance: ModelOptions → CanaryQwenOptions

For Beginners

Defaults are the released nvidia/canary-qwen-2.5b: a Fast Conformer encoder of 32 blocks at width 1,024 (8 heads, kernel 9, 8x depthwise-separable subsampling to 80 ms frames over 128 log-mel bands); a linear projection to 2,048; and Qwen3-1.7B (28 layers of width 2,048, 16 query and 8 key-value heads of width 128, SwiGLU 6,144, per-head query and key RMSNorm, a tied 151,936-row vocabulary) with LoRA of rank 128 (alpha 256, dropout 0.01) on the query and value projections.

Constructors

Constructor Summary
CanaryQwenOptions() Initializes a new instance with default values.
CanaryQwenOptions(CanaryQwenOptions other) Initializes a new instance by copying from another instance.

Properties

Property Summary
OnnxModelOptions OnnxOptions { get; set; } Gets or sets the ONNX Runtime settings used when the model is loaded from an ONNX file.
SpeechLlmTrainingScope TrainingScope { get; set; } What training updates: every parameter by default; the release freezes the LLM and trains the encoder, the projection and LoRA (EncoderAdapterAndLora).
double DecoderRmsEpsilon { get; set; } Gets or sets the RMS-normalization stability constant for the decoder.
double DecoderRopeTheta { get; set; } Gets or sets the rotary positional-embedding frequency base for the decoder.
double LoraAlpha { get; set; } Gets or sets the LoRA adapter scaling factor.
double LoraDropout { get; set; } Gets or sets the dropout probability of the LoRA adapter.
int ConvKernel { get; set; } The encoder’s depthwise convolution kernel (9).
int DecoderDim { get; set; } Qwen3-1.7B’s width (2,048), the projection’s output.
int DecoderFeedForwardDim { get; set; } Qwen3-1.7B’s SwiGLU width (6,144).
int DecoderHeadDim { get; set; } Qwen3-1.7B’s head width (128).
int EncoderDim { get; set; } The encoder’s width (1,024).
int FeedForwardMultiplier { get; set; } The encoder’s feed-forward expansion (4).
int LoraRank { get; set; } The LoRA rank on the query and value projections (128).
int MaxAudioLengthSeconds { get; set; } The longest recording transcribed (40 seconds, the longest in training).
int MaxTextLength { get; set; } The longest transcript generated, in tokens.
int NumAttentionHeads { get; set; } The encoder’s attention heads (8).
int NumDecoderHeads { get; set; } Qwen3-1.7B’s query heads (16).
int NumDecoderKvHeads { get; set; } Qwen3-1.7B’s key-value heads (8).
int NumDecoderLayers { get; set; } Qwen3-1.7B’s layers (28).
int NumEncoderLayers { get; set; } The encoder’s Conformer blocks (32).
int NumMels { get; set; } Log-mel bands (128).
int SampleRate { get; set; } Gets or sets the sample rate, in Hz, that input audio is expected at.
int SubsamplingChannels { get; set; } Channels of the encoder’s subsampling convolutions (256).
int VocabSize { get; set; } The vocabulary rows (151,936).
int WarmupSteps { get; set; } The learning-rate warm-up steps (1,000).
string Instruction { get; set; } The ASR instruction before the audio (“Transcribe the following:”, the model card’s).
string Language { get; set; } Gets or sets the language code used for speech processing.
string ModelPath { get; set; } Gets or sets the path of the pretrained ONNX model.
string[] Vocabulary { get; set; } Optional vocabulary mapping token ids to text when the vocabulary is not Qwen’s.