Skip to content

Minor Parakeet graph and resource lifecycle cleanup - #1155

Merged
0xShug0 merged 1 commit into
mainfrom
perf/parakeet-optimizations
Nov 1, 2026
Merged

0xShug0 merged 1 commit into
mainfrom
perf/parakeet-optimizations

Conversation

@0xShug0

@0xShug0 0xShug0 commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Summary

Minor cleanup of Parakeet encoder/decoder graph allocations and resource lifetimes. Changes are confined to the model implementation; no framework, GGML, model-spec or precision changes.

  • Write positional projections directly into the persistent encoder inputs, avoiding duplicate producer outputs and a separate copy loop. Release the one-shot producer workspace after use.
  • Size encoder graph metadata by layer count instead of reserving over two million nodes.
  • Reuse the CPU graph execution plan and release obsolete graph resources before replacing their allocations.
  • Upload the common attention key-mask row and expand it on the backend instead of filling and uploading a square host matrix. The resulting mask values are identical.
  • Release decoder execution plans and backend graph resources before freeing their allocations.

Validation

Compared with main (ad14f0c4) using the published Parakeet-TDT 0.6B v3 Q8 and F16 packages, a Debug build, eight CPU threads, and sequential runs. The request sequence is a 3.5-second warmup, 14-second input, 28-second input, 178-second input, then repeated 14- and 178-second inputs. No evaluation-dataset clips or artificial generation caps were used.

CUDA, Vulkan and CPU transcripts and word timestamps match main exactly across both packages and the complete sequence (36 requests total). Direct encoder-tensor parity was not measured.

Preliminary measurements

RTF is the mean of the two 178-second request wall times divided by audio duration, including normal graph rebuilding. Peak VRAM covers model loading and the full request sequence on an RTX 5090.

Backend Weights Main RTF PR RTF Main peak VRAM PR peak VRAM
CUDA Q8 0.001190 0.001155 3,878 MiB 3,892 MiB
CUDA F16 0.001185 0.001184 4,404 MiB 4,186 MiB
Vulkan Q8 0.002205 0.002237 3,703 MiB 3,285 MiB
Vulkan F16 0.001977 0.001746 3,804 MiB 3,350 MiB

These are preliminary observations, not a general speedup claim. Baseline VRAM sampling was 100 ms versus 20 ms for these PR runs, and CUDA allocation peaks vary between runs. In particular, zero peak-VRAM regression has not been established for CUDA Q8. Metal has not been run.

@0xShug0
0xShug0 merged commit d96accc into main Nov 1, 2026
8 of 10 checks passed
@0xShug0
0xShug0 deleted the perf/parakeet-optimizations branch November 1, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant