Repository navigation
Optimize Drama 3 output head for speech token candidates - #931
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Compute only EOS and the 4,096 semantic-token logits that Drama 3 already samples, rather than projecting the full 252,288-token vocabulary and discarding the other results.
Validation
CUDA RTX 5090, Debug build, existing Q4_K_S GGUF, eight threads, 256-character text chunks. Offload uses eight pinned expert slots and a GPU codec. Measurements were sequential with logging and 25 ms peak-VRAM sampling. Warm RTF averages the four requests after warmup in the standard five-request session; timing uses
session.wall_msand actual WAV duration.Resident is 1.08x faster, with all four warm requests improving. Accumulated head time is 5.53x faster in resident mode and 6.51-7.07x faster in offload mode. These are head-level gains, not whole-model speedups.
Offload end-to-end improvement is not established: the first pair was 1.69% slower, while the recheck was effectively flat. Strict zero-performance-regression for offload is not claimed.
The full head remains loaded; this is not a weight-memory optimization. No observed peak-VRAM increase across the regression group.
Correctness checks:
Identical WAVs preserve the previously validated offload ASR results, including the existing seed-42
excitingtoeasysubstitution; no correction of that pre-existing error is claimed. CPU testing is component-level, not full-model inference.