Repository navigation
Studio: stop one audio chat from blocking every other chat - #11483
Conversation
Review + reproduction evidencePinned head: I checked the 25 embeddings/second bound against every audio projector in llama.cpp's current GitHub Actions A/B. The same workflow and probe ran on two branches that differ only in
End-to-end in the Studio UI. Modal L4,
The "before" run queued B even though three slots were free: the only thing holding it back was A's KV reservation. Conclusion: the bug reproduces on |
|
Confirmed against main that inference.py still charges audio_base64 by base64 length, so one recording reserves the whole KV pool and every other chat queues behind it, and the duration path with the byte-count fallback looks right; note this overlaps #10120 in the same admission code, so please keep an eye on that while I get this reviewed. |
… receives Admission read the duration off the uploaded recording's header, which only wav and mp3 state, so ogg, webm, m4a and flac uploads still fell back to the byte charge and reserved the whole cache. The GGUF path has already converted the upload to the wav/mp3 it forwards by then, so charge that instead.
_wav_seconds trusted nBlockAlign for byte-aligned PCM, which miniaudio ignores, so an inflated value made a ten-minute file read as 0.6 s. That let it past the 30-minute passthrough cap and undercharged its KV admission by about 15K tokens.
Staging review + CI for
|
Lyxot
left a comment
There was a problem hiding this comment.
LGTM. Codex converged on 6a8919815b. The CI failures are the same ones already failing on main, and none of them involve this change.
…#11483) Charge a recording's KV admission by its duration, not its base64 length, so one audio chat no longer reserves the whole cache. Admission charges the wav/mp3 forwarded to llama-server, so ogg, webm, m4a and flac uploads are measured too, and _wav_seconds sizes PCM frames the way llama.cpp's decoder does.


When audio is sent to a GGUF model, Studio treats it as far longer than it is and reserves all of the model's memory for it. Every other chat then waits until the audio reply finishes. In testing, a 20 second recording made a simple "Say hi" wait 32 seconds.
Studio now works out the audio's real length from the file and reserves memory for that length. If the length can't be read, it charges the same as before, so it never reserves too little. Video is unchanged. Tested with two browser tabs on Qwen2.5-Omni-3B: on main the second chat waited, on this branch it answered while the audio was still being processed. This will clash with #10120, which changes the same code.