Skip to content

QVAC-22367 fix[transcription-parakeet]: bound long-audio memory via windowed encoder#3379

Open
Zbig9000 wants to merge 8 commits into
tetherto:mainfrom
Zbig9000:QVAC-22367-parakeet-long-audio
Open

QVAC-22367 fix[transcription-parakeet]: bound long-audio memory via windowed encoder#3379
Zbig9000 wants to merge 8 commits into
tetherto:mainfrom
Zbig9000:QVAC-22367-parakeet-long-audio

Conversation

@Zbig9000

@Zbig9000 Zbig9000 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

QVAC-22367 — fix Parakeet crash / high memory on long audio

Problem

The batch transcribe() API (parakeet-tdt-filesystem.ts and any transcribe
consumer) flows through the addon's offline path, which runs the Parakeet encoder
over the entire input at once. Self-attention is O(T_enc²), so multi-hour audio
exhausts memory — a ~90 min file peaked at ~100 GB and the Bare worker was
SIGKILLed (WORKER_CRASHED). transcribeStream was already bounded.

Fix

Consume parakeet-cpp 2026-07-21#0, which slides the offline conformer encoder
over long inputs in overlapping windows with the shared context trimmed at the
seams — bounded memory, no mid-word cuts. No addon code change is needed: the
engine auto-selects the windowed path once the input exceeds one window, so
short/typical files keep the identical single-pass output.

Changes

  • vcpkg.jsonparakeet-cpp version>= floors → 2026-07-21, exact pin via
    overrides.
  • vcpkg-configuration.json + vcpkg-overlays/parakeet-cpp/ — WIP overlay that
    mirrors the registry port so CI validates the fix before the registry merges.
  • CHANGELOG.md[Unreleased] entry.

Test plan

  • Prebuild CI green on every triplet (Android arm64, Linux x64/arm64, macOS
    arm64/x64, iOS variants, Windows x64).
  • transcription-parakeet integration suite green.
  • Manual: bun run examples/transcription/parakeet-tdt-filesystem.ts <long.wav>
    completes on a >30-min file without the WORKER_CRASHED / SIGKILL.
  • Upstream parakeet-cpp adds test-long-form-windows (planner unit test) and
    test-long-form (windowed-vs-single-pass parity).

Merge order (WIP)

Overlay must stay byte-identical to the registry port. Land the source PR, then
the registry PR, then drop the overlay here and switch to the plain
overrides + version>= pin.

Companion PRs


…indowed encoder

Consume parakeet-cpp 2026-07-21#0, which slides the offline conformer
encoder over long inputs in overlapping windows instead of running the
whole file through a single O(T_enc^2) attention graph. The batch
`transcribe` path previously exhausted memory on multi-hour audio (a
~90 min file peaked at ~100 GB and was SIGKILLed); `transcribeStream` was
already bounded and is unchanged. No addon code change is needed -- the
engine auto-selects the windowed path once the input exceeds one window,
so short/typical files keep the identical single-pass output.

WIP validation wiring (drop once the registry port merges):
- vcpkg-overlays/parakeet-cpp mirrors the registry PR's port verbatim
  (fork REF + real fork-tarball SHA512);
- vcpkg-configuration.json lists the overlay;
- vcpkg.json bumps the parakeet-cpp version>= floors to 2026-07-21 and
  pins the exact version via overrides.
@Zbig9000
Zbig9000 requested review from a team as code owners July 21, 2026 16:19
@github-actions

Copy link
Copy Markdown
Contributor

Review Status

Current Status: ❌ PENDING
Approvals so far: none

Pending reviews: Needs 1 Management or Team Lead, and 1 more from Management, Team Lead, or Member.

@Zbig9000 Zbig9000 added tier1 verified Authorize secrets / label-gate in PR workflows labels Jul 22, 2026
Comment thread packages/transcription-parakeet/CHANGELOG.md Outdated
…G entry

Address review: remove the trailing "(QVAC-22367)" from the [Unreleased]
entry. The CHANGELOG documents consumer-facing changes only, not tracker
ticket ids.
…ur fork registry (CI)

Point the addon's default-registry at the Zbig9000 fork of qvac-registry-vcpkg
(branch QVAC-22367-bump-parakeet-cpp @ 9838379), whose parakeet-cpp port pins
our qvac-ext-lib-whisper.cpp fork branch (engines/parakeet @ e58ff4b0). This is
what makes the addon CI actually build and test our long-audio lib changes --
the default tetherto registry (and a local overlay) resolves the unmodified
upstream lib, so CI wouldn't exercise our fix.

Drops the WIP vcpkg-overlays/parakeet-cpp (the fork registry now provides the
port). WIP wiring: on upstream merge of the source + registry PRs, revert
default-registry to tetherto and keep the version>= / overrides pin.
Zbig9000 added 3 commits July 22, 2026 18:17
…n Bare-safe

The teardown used `delete process.env[key]`, which throws on Bare's
process.env proxy (deleteProperty trap returns false) and aborts the whole
integration process (exit 134) whenever QVAC_TEST_GGUF_SORTFORMERSTREAMING
isn't already set in the environment. Wrap the unset in try/catch so cleanup
is best-effort; the test assertions are unchanged.
…e at merged-upstream port

Follow the registry PR after it was repointed to the merged upstream commit
(tetherto/qvac-ext-lib-whisper.cpp#101, engines/parakeet). default-registry
baseline -> 5a4aa57, whose parakeet-cpp 2026-07-21#0 port now builds from the
merged upstream master (88b690c0) instead of the fork branch. Still resolving
from the fork registry until the registry PR merges; once it does, switch
default-registry back to tetherto and keep the version>= / overrides pin.
…7-21#0 from tetherto registry

Registry PR tetherto#254 merged, so drop the WIP fork registry and go back to the
canonical tetherto registry:
- default-registry -> tetherto/qvac-registry-vcpkg @ 7c3dde3 (the tetherto#254 merge
  commit; minimal baseline that carries parakeet-cpp 2026-07-21#0).
- pin qvac-lib-inference-addon-cpp to 1.2.4 via overrides so the baseline bump
  (needed only to expose the new parakeet-cpp) does not incidentally pull the
  1.3.0 that tetherto#256 made the new default; keeps this PR's dep set equal to main
  plus the parakeet fix.

parakeet-cpp resolves to 2026-07-21#0 (version>= + override), which builds from
the merged upstream engines/parakeet (tetherto whisper tetherto#101).
bundled `parakeet-cpp` (bumped to `2026-07-21#0`) now slides the encoder over
long inputs in overlapping windows with bounded memory; short inputs keep the
identical single-pass path. `transcribeStream` was already bounded and is
unchanged.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is wrongly removing 0.10.1. Should sit above it

!CMakeLists.txt
!cmake/*.cmake
!vcpkg/**/*.cmake
!vcpkg-overlays/**/*.cmake

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add this

"name": "qvac-lib-inference-addon-cpp",
"version": "1.2.4"
}
],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add these overrides

"default-registry": {
"kind": "git",
"baseline": "74d2dfd03d1c2c0767bac6d892ec43a2a0e29c10",
"baseline": "7c3dde3bb2d5707b6c3bb1faa3717749194f5671",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont update baseline

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

Labels

tier1 verified Authorize secrets / label-gate in PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants