You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adopt features from NeMo fork PR #13 into the omi parakeet server. PR #13 was well-tested with benchmark evidence (WER 1.84%, 174x RTFx sustained, zero failures at c=64).
We already adopted bug #1 (batch=1 collapse) as PR #8666, but with a simpler approach. PR #13 has a better fix plus 8 additional gpu_worker lifecycle bugs.
What to adopt
batch_engine.py — Better batch=1 fix
_batches_inflight counter — replaces our PR Fix parakeet batch=1 throughput collapse from flush_pending early reset #8666 approach. NeMo keeps the early _flush_pending reset but adds _batches_inflight counter so the flush loop only fires when no GPU work is inflight. This is better because it allows full-batch dispatches to use the second inflight slot while blocking timer-triggered partial flushes.
gpu_worker.py — 8 lifecycle bugs
#
Bug
Fix
2
_drain_queues crashes on cancelled futures
Use _safe_set_exception
3
stop()/submit() race — futures to dead queues
Shared _submit_lock
4
Pool readiness race — request before workers started
Start pool workers before _ready.set()
5
Pool shutdown skips queue drain — futures hang
Drain all queues after worker join
6
Prefetch shutdown misses _prefetch_queue
Drain + join prefetch thread
7
Prefetch in-flight item leak — invisible to drain
owned_item tracking with finally
8
_gc_counter shared across pool threads
Per-thread local counter
9
start() requires args — breaks pod migration
Optional args with defaults
New: AudioDurationExceededError
Dedicated exception class for duration guard violations.
Applicability to omi parakeet
Our gpu_worker.py doesn't have pool or prefetch modes, so bugs #4-8 don't apply. Applicable:
Bug Client #1 upgrade (_batches_inflight in batch_engine.py)
PR #8688 implements both features from NeMo PR #13:
_batches_inflight counter — flush timer only fires when counter is 0, preventing batch=1 spam while allowing full-batch dispatches to use the second inflight slot
_submit_lock — prevents stop/submit race condition across all submit methods
Verification:
37 unit tests pass (12 new covering counter lifecycle, OOM reset, concurrent races)
CODEx reviewer: PR_APPROVED_LGTM
CODEx tester: TESTS_APPROVED
GPU live test on L4: 100 requests at concurrency 1–16, zero failures, batching confirmed (101 reqs → 63 batches)
Urgency note: T+8h monitoring of PR #8666 showed a 504 incident during peak (35 min, ~1,460 504s) caused by the exact _flush_pending serialization that PR #8688 fixes. The GPU sat idle for 4-minute stretches while 900+ requests queued.
Activity
beastoin commentedon Jun 30, 2026
Implementation Complete — PR #8688 Ready
PR #8688 implements both features from NeMo PR #13:
_batches_inflightcounter — flush timer only fires when counter is 0, preventing batch=1 spam while allowing full-batch dispatches to use the second inflight slot_submit_lock— prevents stop/submit race condition across all submit methodsVerification:
Urgency note: T+8h monitoring of PR #8666 showed a 504 incident during peak (35 min, ~1,460 504s) caused by the exact
_flush_pendingserialization that PR #8688 fixes. The GPU sat idle for 4-minute stretches while 900+ requests queued.by AI for @beastoin
Add _batches_inflight counter to prevent timer-triggered batch=1 duri…
Add _submit_lock to GPUWorker to prevent stop/submit race