Instructions to use KrorngAI/TrorYongASR2-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KrorngAI/TrorYongASR2-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="KrorngAI/TrorYongASR2-small")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("KrorngAI/TrorYongASR2-small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -60,12 +60,15 @@ Finally, the auditory-lingual decoder adopts point-wise dynamic rescaled Gaussia
|
|
| 60 |
[Figure 1](#fig-archit)] provides an overview of the TrorYongASR2's architecture.
|
| 61 |
|
| 62 |
<figure>
|
| 63 |
-
<div style="text-align: center;"><a name='fig-archit' ><img src="https://kimang18.github.io/krorngai-blog/TrorYongASR2/figures/architecture6.png" width="
|
| 64 |
-
<figcaption> TrorYongASR2 architecture.
|
| 65 |
This figure presents the case having 16 distinct target prediction positions.
|
| 66 |
All projections in attention layers are explicitly shown here because specific to TrorYongASR2, the single position basis \\( \boldsymbol{p} \\) is used for each position to directly form query vectors (differently from the standard decoder, the linear layer for query projection is not required) while context vectors are the token embeddings multiplied by the position basis and are projected into key and value vectors.
|
| 67 |
With gated mechanism, masked multi-head attention (Masked MHA) generates gate score from context vectors while MHA for speech-text alignment computes gate score from the hidden state, the output of Masked MHA.
|
| 68 |
-
Inspired by QK-normalization, dynamic
|
|
|
|
|
|
|
|
|
|
| 69 |
</figure>
|
| 70 |
|
| 71 |
- **Developed by:** KHUN Kimang (Ph.D.)
|
|
|
|
| 60 |
[Figure 1](#fig-archit)] provides an overview of the TrorYongASR2's architecture.
|
| 61 |
|
| 62 |
<figure>
|
| 63 |
+
<div style="text-align: center;"><a name='fig-archit' ><img src="https://kimang18.github.io/krorngai-blog/TrorYongASR2/figures/architecture6.png" width="1000" /></a></div>
|
| 64 |
+
<figcaption> TrorYongASR2 architecture. Dropout layers are omitted due to space constraints, [B], [L], [T], [E], and [P] are begin-of-sequence, language, task, end-of-sequence, and pad tokens respectively.
|
| 65 |
This figure presents the case having 16 distinct target prediction positions.
|
| 66 |
All projections in attention layers are explicitly shown here because specific to TrorYongASR2, the single position basis \\( \boldsymbol{p} \\) is used for each position to directly form query vectors (differently from the standard decoder, the linear layer for query projection is not required) while context vectors are the token embeddings multiplied by the position basis and are projected into key and value vectors.
|
| 67 |
With gated mechanism, masked multi-head attention (Masked MHA) generates gate score from context vectors while MHA for speech-text alignment computes gate score from the hidden state, the output of Masked MHA.
|
| 68 |
+
Inspired by QK-normalization, dynamic rescaled Gaussian cumulative distribution function (Derf), a drop-in replacement for normalization layers, and \\( p \\)-RoPE are applied to the query and key vectors of Masked MHA right before the attention computation. For the cross-attention layer, the query and key vectors are transformed by Derf and \\( p \\)-LARoPE. Attention masks are generated from randomly chosen permutations and are used only for the context-position attention.
|
| 69 |
+
The last linear layer outputs logits over the vocabulary set.
|
| 70 |
+
These logits are then used to compute cross-entropy loss.
|
| 71 |
+
The audio encoder is simply Whisper's Audio Encoder, but it can process audio of arbitrary length that is shorter than 30 seconds.</figcaption>
|
| 72 |
</figure>
|
| 73 |
|
| 74 |
- **Developed by:** KHUN Kimang (Ph.D.)
|