Larynx Attention Study
Kernel running – T4
Edited just now AF

Larynx Attention Study

Welcome to Kelvin Notebooks!

This notebook stands up Sonora's Larynx speech-recognition model. Alongside running Larynx, it charts how attention shifts frame by frame in PyTorch, adapted from this teardown.

We booted the session on an Nvidia T4 GPU, which you can swap in the Kernel panel on the left rail. Nothing to babysit — you only pay while the notebook is awake, and it parks itself once you stop typing. Check your usage whenever you want.

Every Kelvin account carries $24 of compute credit each month. Let's dig in.

1
!apt install -y -qq ffmpeg
OK
Output hidden
1
%uv pip install sonora-larynx dtw-python
OK
Using Python 3.12.6 environment at: /usr/local
Audited 2 packages in 16ms
Note: you may need to restart the kernel to use updated packages.
12345678910
import string
from pathlib import Path

import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import numpy as np
import pandas as pd
import torch
import larynx
from dtw import dtw
CPU: 0.14 cores RAM: 1.28 GiB GPU memory: 0.42 GiB GPU utilization: 3.8%