Skip to content

parakeet: Add Koyal 120M (Conformer striding subsampling) - #309

Open
kavyamanohar wants to merge 2 commits into
handy-computer:mainfrom
adalat-ai-tech:koyal-120m
Open

kavyamanohar wants to merge 2 commits into
handy-computer:mainfrom
adalat-ai-tech:koyal-120m

Conversation

@kavyamanohar

@kavyamanohar kavyamanohar commented Dec 2, 2026 •

Copy link
Copy Markdown

Summary

Adds Koyal 120M: four small models from Adalat AI, one each for Hindi, Kannada, Malayalam and Telugu. Fixes #308.

They are classic NeMo Conformer, not FastConformer, so their subsampling block is striding (4x) where parakeet only had dw_striding (8x). This PR adds that block. Everything after it (Conformer layers, TDT decoder, tokenizer) is the existing parakeet code, so the models stay in the parakeet family.

Two commits on current main (v0.5.2):

  1. Striding subsampling, on its own. It is selected by an optional GGUF key that existing models don't have, so they load and convert as before.
  2. The four models: converter profiles, golden manifests, sample clips, intake files and docs.

FLEURS test, WER, Q8_0:

Language Koyal 120M (149 MB) Best model in transcribe.cpp today
Hindi 5.35% 7.40%, Voxtral Small 24B (25.81 GB)
Kannada 5.86% 31.99%, Whisper large-v3 (1.67 GB)
Malayalam 5.58% 98.75%, Whisper large-v3-turbo (886 MB)
Telugu 7.35% 63.03%, Whisper large-v3-turbo (886 MB)

Each model takes one language. No streaming, translation or language detection.

Scope

  • src/conformer, src/arch/parakeet: the striding block, the optional stt.parakeet.encoder.subsampling key (absent means dw_striding), and a 512-frame long-form window at 4x so it still covers 20.5 s. Striding with chunked_limited attention is rejected, since causal striding is not implemented.
  • scripts/convert-parakeet.py: writes the subsampling kind; four Koyal profiles; a drop_aux_ctc profile flag, because Koyal is hybrid TDT+CTC but its names don't contain tdt_ctc.
  • tests/golden/parakeet/koyal-*.manifest.json: one per model, each on an 11 s FLEURS clip in its language, with the shared parakeet tolerances.
  • samples/{hi,kn,ml,te}-{short,long}.wav: FLEURS test clips, listed in samples/README.md.
  • reports/porting/parakeet/koyal-*/intake.json.
  • Docs: docs/models/koyal-120m.md, a line in docs/models/parakeet.md, and a short section in docs/porting/families/parakeet.md and the forward map.

No catalog record, HF card or benchmark rows.

AI Assistance

I used Claude Code for the implementation, the docs and the validation runs. I reviewed the changes and the results, and I own them.

Validation

  • Numerical: validate.py all passes for all four models: 16/16 tensors within the shared parakeet tolerances, and transcripts exactly match NeMo. The golden clips avoid frame counts that are a multiple of 4, because there the NeMo dumper keeps a masked padding frame and its encoder dump is one frame longer.
  • Existing models: parakeet-tdt_ctc-110m converts to a byte-identical GGUF and gives identical transcripts to a main build on 22 clips, single and batched.
  • WER: full FLEURS test split (hi 418, kn 838, ml 958, te 472 utterances) on an NVIDIA A100 with CUDA, batch size 1, scored with scripts/wer/score.py. F32, Q8_0, Q5_K_M and Q4_K_M are in docs/models/koyal-120m.md; the quantized models stay within 0.2 points of F32. As a check on the setup, I re-ran three published Hindi rows on the same machine and got within 0.11 points of each: Nemotron 3.5 8.57% (page 8.61%), Whisper large-v3 17.17% (17.06%), large-v3-turbo 18.87% (18.85%). The pages were measured at batch size 8 and I used batch size 1.
  • Repo checks: ctest passes, clang-format is clean, catalog check and render check are clean. preflight.py gate B passes for all four.

Not tested: Metal, Vulkan and CPU-only WER. The WER numbers are from CUDA only, so those backends would need a check.

kavyamanohar and others added 2 commits December 1, 2026 22:12
Classic NeMo Conformer models, such as Koyal 120M, use the `striding`
pre_encode: one 3x3 conv, then one more full 3x3 stride-2 conv,
making the audio 4x shorter in time. transcribe.cpp only supports
`dw_striding` (FastConformer): one conv, then two depthwise-separable
pairs, 8x. The rest of the encoder and the decoders are already
supported, so this adds striding and nothing else.

Changes:

- convert-parakeet.py reads encoder.subsampling. A missing key means
  dw_striding, because the safetensors path (parakeet-ultra) builds
  its config without it.
- It writes stt.parakeet.encoder.subsampling only for striding, so
  existing models convert to the same bytes as before.
- It skips conv.3, conv.5 and conv.6 for striding; striding
  checkpoints don't have them.
- It resolves subsampling_conv_channels = -1 to d_model, as NeMo
  does. Koyal's config uses -1.
- weights.{h,cpp} read the new key (absent = dw_striding, so existing
  GGUFs load unchanged), load conv2 as a full conv instead of a
  depthwise one, and use two stride-2 stages instead of three when
  sizing the projection.
- The long-audio attention window is 512 frames for striding instead
  of 256. Frames are 40 ms instead of 80 ms, so it still covers 20.5 s.
- conformer.cpp builds the striding stack: conv0, conv2, then the
  same flatten and projection as dw_striding. That last step moves
  into a shared helper (pre_encode_flatten_project), unchanged.
- encoder.cpp expects factor 4 for striding and 8 for dw_striding,
  and rejects striding with chunked_limited attention, since causal
  striding is not implemented.
- model.cpp uses two stages for striding when computing valid
  lengths, so the padding masks match the shorter stack.

Existing models are unaffected: parakeet-tdt_ctc-110m converts to the
same bytes as main and gives the same transcripts on 22 clips, single
and batched.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Koyal 120M are small dictation models from Adalat AI, one per
language, that write punctuation and numerals. With striding support
from the previous commit they convert and run as they are; this adds
the profiles, tests, samples and docs.

- convert-parakeet.py: one profile per language. Koyal is hybrid
  TDT+CTC, shipped TDT-only like parakeet-tdt_ctc-110m. The converter
  decides that from "tdt_ctc" in the name, which Koyal's names don't
  have, so a drop_aux_ctc profile flag does the same.
- tests/golden/parakeet/koyal-*.manifest.json: one per model, so
  validate.py checks each against NeMo. The shared parakeet
  tolerances are enough; no new tolerance file.
- samples/{hi,kn,ml,te}-{short,long}.wav: no clips in these languages
  existed. The short ones back the golden manifests; the long ones
  are for benchmarking, like the other per-language pairs. All from
  the FLEURS test split, listed in samples/README.md.
- reports/porting/parakeet/koyal-*/intake.json: the pinned upstream
  facts for each model (revision, config, frontend, tokenizer,
  capabilities, model-card scores), as the other parakeet variants
  have. preflight.py and the catalog tooling read them.
- docs/models/koyal-120m.md, plus a line in parakeet.md so it shows
  up when choosing a parakeet variant.
- docs/porting/families/parakeet.md and the parakeet forward map: a
  short section each, because Koyal is a classic Conformer and every
  other variant in the family is a FastConformer. They say what
  differs (the subsampling block) and why it runs on the parakeet
  path.
@kavyamanohar
kavyamanohar requested a review from cjpais as a code owner December 2, 2026 07:55

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Koyal 120M support (Hindi, Kannada, Malayalam, Telugu)

1 participant