Repository navigation
Conversation
Auto attention mode disables torch.compile, which increases VRAM per batch item ~3x vs compiled mode. The default max_batch_size=32 allowed a burst of 12 concurrent files to exhaust VRAM (93%) and OOM at T+22m post-deploy. Capping at 8 keeps estimated VRAM under 70%. Co-Authored-By: Claude Opus 4.6 <[email protected]>
zen's VRAM analysis — static cap=8 is a bandaidzen validated the 3x VRAM ratio empirically on L4:
The VRAM math matches prod almost exactly: predicted 20,973 MiB vs observed 20,430 MiB for 12 files at ~250s avg. Problem with static cap=8: At B=8 with 300s files (just under auto threshold), estimated VRAM = ~20.3 GiB — marginal OOM territory. Static cap either OOMs on long files or wastes throughput on short files where B=32 is safe. Proper fix: VRAM-aware dynamic batch sizing:
This PR remains valid as an immediate hotfix — most prod traffic is short files where B=8 is fine. VRAM-aware admission should follow as a proper solution. by AI for @beastoin |
OOM Root Cause Confirmed — Audio Duration AnalysisGrafana data from ops (mon) confirms the exact failure mode: No files ≥300s were processed — auto attention switching is working correctly and was never triggered. The OOM was caused by a burst of files in the 120-300s danger zone: long enough for massive O(T²) softmax attention matrices, but just under the 300s threshold to trigger local attention.
Key finding: p99 hit 296s during the OOM — a burst of 23 files in the 120-300s range arrived in one minute. These files use full attention (quadratic VRAM scaling) because they're under the 300s auto threshold. With batch_size=12 and ~250s avg duration, the full attention softmax exhausted VRAM. Implications for the fix:
by AI for @beastoin |
|
Verified the change — This is a sound, minimal hotfix for the post-#8486 OOM: capping the uncompiled auto-attention path at batch size 8 is conservative — worst case is marginally lower throughput, not a safety regression. Checks are green. One thing worth noting: #8535 proposes VRAM-aware dynamic batch sizing as a more comprehensive follow-up. The two approaches are complementary rather than conflicting — this PR stops the bleeding now, and #8535 could refine it later if the static cap proves too conservative. Recommend merging this as the immediate fix. (Omi PR monitor review · glm-5.2) |
kodjima33
left a comment
There was a problem hiding this comment.
Reviewed — looks good for this area; approving (not merging per area policy).
|
Hey @beastoin 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! 💜 |
Summary
PARAKEET_MAX_BATCH_SIZE=8to prod parakeet Helm valuesContext
Follow-up to PR #8486 (auto attention + 1h duration guard). Post-deploy monitoring detected a CUDA OOM at T+22min when a batch of 12 concurrent files exhausted ~93% VRAM. Auto mode disables torch.compile, which increases VRAM per batch item ~3x vs compiled mode. The default
max_batch_size=32is too high for the uncompiled path.OOM event: Single burst at 03:13 UTC, pod self-recovered in ~35s (0 restarts), 200+ successful requests after recovery. Batch size cap at 8 keeps estimated VRAM under ~70%.
Test plan
helm template)gcp_parakeet.ymlwith Helm upgradePARAKEET_MAX_BATCH_SIZE=8env varFixes OOM observed in #8486 post-deploy monitoring.
🤖 Generated with Claude Code