• Stefy Lanza (nextime / spora )'s avatar
    reserve what a transcription costs, and let the card be taken back · f738df2c
    Stefy Lanza (nextime / spora ) authored
    Three CrisperWhisper models were configured and they stacked: each is a resident
    Whisper-large in its own process, so the card held two of them plus the server's
    text and embedding models until one OOMed inside the encoder's softmax. Nothing
    here was the model's fault.
    
    The reservation taken before a load was a hard-coded 3 GB -- roughly the fp16
    weights, and about a third of what a verbatim word-timestamp pass peaks at, since
    that holds the encoder's attention for a whole 30s window. The worker now reports
    its own peak and the figure is recorded as a high-water mark, so the next
    reservation is measured rather than guessed.
    
    The eviction ladder had no way to reach a worker's VRAM: it lives in another
    process, and acquire_stt_backend pops the model pool, so the manager's busy
    signal cannot see a transcription either. There is an external releaser now --
    idle workers go at once, a busy one is waited out to the drain budget and only
    then taken -- and asking for one model stops its idle siblings.
    
    A cold start was invisible while it lasted. Free VRAM comes from the driver, so a
    worker downloading its shards looks like room; live traffic loaded into it and the
    transcription OOMed on a card nobody over-committed on purpose. The load window
    holds a reservation now.
    
    whisper-server already evicts and knows when it is idle, but it sized itself at
    file size x 1.1, which counts the weights and not whisper.cpp's compute buffers.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_014T3rZnLhydX9QqUcfBbqLu
    f738df2c